Bug 966579 - Tweaks to mutation observer usage for fix intermittent chat orange. r=mixedpuppy

This commit is contained in:
Mark Hammond 2014-05-10 02:02:00 -04:00
parent c037e812df
commit 3d6a5e08bd

View File

@ -543,17 +543,18 @@ function resizeAndCheckWidths(first, second, third, checks, cb) {
} }
ok(true, count + ": " + "correct number of chats visible"); ok(true, count + ": " + "correct number of chats visible");
info(">> Check " + count); info(">> Check " + count);
executeSoon(function() {
resizeAndCheckWidths(first, second, third, checks, cb); resizeAndCheckWidths(first, second, third, checks, cb);
return true; });
} }
return false;
} }
if (!collapsedObserver()) {
let m = new MutationObserver(collapsedObserver); let m = new MutationObserver(collapsedObserver);
m.observe(first, {attributes: true }); m.observe(first, {attributes: true });
m.observe(second, {attributes: true }); m.observe(second, {attributes: true });
m.observe(third, {attributes: true }); m.observe(third, {attributes: true });
} // and just in case we are already at the right size, explicitly call the
// observer.
collapsedObserver(undefined, m);
}, count); }, count);
} }