From be8b706b89c3287c26151d61a5e3bc407c9b04ac Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 5 Aug 2010 14:39:39 -0400 Subject: [PATCH] Bug 575336 part 3. Change the reftest harness to do its initial flush on all subframes, not just the root one. r=roc --- layout/tools/reftest/reftest.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/layout/tools/reftest/reftest.js b/layout/tools/reftest/reftest.js index 1cbb46dd2c07..eca75f481b14 100644 --- a/layout/tools/reftest/reftest.js +++ b/layout/tools/reftest/reftest.js @@ -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(); }