adium 2765:80187ccccb36: don't call CoalescedHTML.prototype.appe...
commits at adium.im
commits at adium.im
Thu Oct 22 22:01:07 UTC 2009
details: http://hg.adium.im/adium/rev/80187ccccb36
revision: 2765:80187ccccb36
author: Stephen Holt <sholt at adium.im>
date: Thu Oct 22 18:00:50 2009 -0400
don't call CoalescedHTML.prototype.append() from CoalescedHTML.prototype.appendNext(). That's bad juju.
Also, some other cleanup.
diffs (43 lines):
diff -r 3627dfff7c3f -r 80187ccccb36 Plugins/WebKit Message View/Template.html
--- a/Plugins/WebKit Message View/Template.html Thu Oct 22 17:35:06 2009 -0400
+++ b/Plugins/WebKit Message View/Template.html Thu Oct 22 18:00:50 2009 -0400
@@ -30,7 +30,7 @@
function outputHTML() {
var insert = document.getElementById("insert");
- if(insert && self.isConsecutive) {
+ if(!!insert && self.isConsecutive) {
insert.parentNode.replaceChild(self.fragment, insert);
} else {
if(insert)
@@ -98,7 +98,7 @@
this.append = function(html, shouldScroll) {
// if we started this fragment with a consecuative message,
// cancel and output before we continue
- if(undefined === self.isConsecutive || self.isConsecutive) {
+ if(self.isConsecutive) {
self.cancel();
}
self.isConsecutive = false;
@@ -113,16 +113,16 @@
}
this.appendNext = function(html, shouldScroll) {
- self.isConsecutive = self.isConsecutive||true;
+ if(undefined === self.isConsecutive)
+ self.isConsecutive = true;
+ var node = createHTMLNode(html);
var insert = self.fragment.querySelector("#insert");
if(insert) {
- var node = createHTMLNode(html);
insert.parentNode.replaceChild(node, insert);
-
- node = null;
} else {
- self.append(html, shouldScroll);
+ self.fragment.appendChild(node);
}
+ node = null;
if(shouldScroll)
self.shouldScroll = shouldScroll;
self.coalesce();
More information about the commits
mailing list