Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: LayoutTests/fast/repaint/resources/text-based-repaint.js

Issue 208583004: Remove repaint.js from svg tests that pass without it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove use-instanceRoot-event-bubbling.xhtml Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/as-background-image/animated-svg-as-background.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | LayoutTests/svg/as-background-image/animated-svg-as-background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698