| Index: LayoutTests/fast/repaint/resources/text-based-repaint.js
|
| diff --git a/LayoutTests/fast/repaint/resources/text-based-repaint.js b/LayoutTests/fast/repaint/resources/text-based-repaint.js
|
| index a60a372c88b5d7e06b826e330692d3b244553084..5b3a3eb1c14dfebe5844def361c57640816df4ee 100644
|
| --- a/LayoutTests/fast/repaint/resources/text-based-repaint.js
|
| +++ b/LayoutTests/fast/repaint/resources/text-based-repaint.js
|
| @@ -16,10 +16,7 @@ function runRepaintTest()
|
| if (window.testIsAsync)
|
| testRunner.waitUntilDone();
|
|
|
| - if (document.body)
|
| - document.body.offsetTop;
|
| - else if (document.documentElement)
|
| - document.documentElement.offsetTop;
|
| + forceStyleRecalc();
|
|
|
| window.internals.startTrackingRepaints(document);
|
|
|
| @@ -29,10 +26,18 @@ function runRepaintTest()
|
| finishRepaintTest();
|
| }
|
|
|
| +function forceStyleRecalc()
|
| +{
|
| + if (document.body)
|
| + document.body.offsetTop;
|
| + else if (document.documentElement)
|
| + document.documentElement.offsetTop;
|
| +}
|
| +
|
| function finishRepaintTest()
|
| {
|
| // Force a style recalc.
|
| - var dummy = document.body.offsetTop;
|
| + forceStyleRecalc();
|
|
|
| var repaintRects = window.internals.repaintRectsAsText(document);
|
|
|
|
|