Bug 420254, thunderbird often uses ~10% cpu when idle, r=enn, sr=neil, a=beltzner

This commit is contained in:
Olli.Pettay@helsinki.fi 2008-03-07 05:48:06 -08:00
parent 0d46ac409b
commit eac7a7c58c

View File

@ -74,7 +74,19 @@
var position = isLTR ? 4 : -1;
var interval = setInterval(function nextStep() {
try {
var width = stack.boxObject.width >> 2;
var width = stack.boxObject.width;
if (!width) {
// Maybe we've been removed from the document.
var currentNode = stack;
while (currentNode && currentNode != stack.ownerDocument) {
currentNode = currentNode.parentNode;
}
if (!currentNode) {
clearInterval(interval);
return;
}
}
width = width >> 2;
spacer.height = stack.boxObject.height;
spacer.width = width;
spacer.left = width * position;