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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/resources/text-based-repaint.js

Issue 1405283006: Deprecate SVGElement.offsetParent/offsetTop/offsetLeft/offsetWidth/offsetHeight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests instead Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Asynchronous tests should manually call finishRepaintTest at the appropriate 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate
2 // time. 2 // time.
3 window.testIsAsync = false; 3 window.testIsAsync = false;
4 window.outputRepaintRects = true; 4 window.outputRepaintRects = true;
5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b elow. 5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b elow.
6 6
7 // All repaint tests are asynchronous. 7 // All repaint tests are asynchronous.
8 if (window.testRunner) 8 if (window.testRunner)
9 testRunner.waitUntilDone(); 9 testRunner.waitUntilDone();
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 function runRepaintAndPixelTest() 49 function runRepaintAndPixelTest()
50 { 50 {
51 window.enablePixelTesting = true; 51 window.enablePixelTesting = true;
52 runRepaintTest(); 52 runRepaintTest();
53 } 53 }
54 54
55 function forceStyleRecalc() 55 function forceStyleRecalc()
56 { 56 {
57 if (document.body) 57 if (document.body)
58 document.body.offsetTop; 58 document.body.clientTop;
59 else if (document.documentElement) 59 else if (document.documentElement)
60 document.documentElement.offsetTop; 60 document.documentElement.clientTop;
61 } 61 }
62 62
63 function finishRepaintTest() 63 function finishRepaintTest()
64 { 64 {
65 if (!window.testRunner || !window.internals) 65 if (!window.testRunner || !window.internals)
66 return; 66 return;
67 67
68 // Force a style recalc. 68 // Force a style recalc.
69 forceStyleRecalc(); 69 forceStyleRecalc();
70 70
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } else { 188 } else {
189 var newRect = [xBegin, y, xWidth, 1]; 189 var newRect = [xBegin, y, xWidth, 1];
190 nextRectsMayContinue.push(newRect); 190 nextRectsMayContinue.push(newRect);
191 result.push(newRect); 191 result.push(newRect);
192 } 192 }
193 } 193 }
194 rectsMayContinue = nextRectsMayContinue; 194 rectsMayContinue = nextRectsMayContinue;
195 } 195 }
196 return result; 196 return result;
197 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698