Bug 575336 part 3. Change the reftest harness to do its initial flush on all subframes, not just the root one. r=roc

This commit is contained in:
Boris Zbarsky 2010-08-05 14:39:39 -04:00
parent ddf024831a
commit fcf146ef6f

View File

@ -851,8 +851,17 @@ function OnDocumentLoad(event)
.getInterface(CI.nsIDOMWindowUtils);
function FlushRendering() {
function flushWindow(win) {
try {
win.document.documentElement.getBoundingClientRect();
} catch (e) {}
for (var i = 0; i < win.frames.length; ++i) {
flushWindow(win.frames[i]);
}
}
// Flush pending restyles and reflows
contentRootElement.getBoundingClientRect();
flushWindow(contentRootElement.ownerDocument.defaultView);
// Flush out invalidation
utils.processUpdates();
}