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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/text-autosizing/style-recalc-no-layout.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/autosizingTest.js"></script> 5 <script src="resources/autosizingTest.js"></script>
6 <style> 6 <style>
7 #autosize { 7 #autosize {
8 font-size: 10px; 8 font-size: 10px;
9 } 9 }
10 </style> 10 </style>
11 </head> 11 </head>
12 <body> 12 <body>
13 <div id="autosize"> 13 <div id="autosize">
14 This test verifies that a style recalc on a block with an autosizing multipl ier does not 14 This test verifies that a style recalc on a block with an autosizing multipl ier does not
15 cause an unnecessary relayout. 15 cause an unnecessary relayout.
16 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tem por incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis n ostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Dui s aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fug iat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culp a qui officia deserunt mollit anim id est laborum. 16 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tem por incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis n ostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Dui s aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fug iat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culp a qui officia deserunt mollit anim id est laborum.
17 </div> 17 </div>
18 <script> 18 <script>
19 // Force style recalc and layout. 19 // Force style recalc and layout.
20 document.body.offsetTop; 20 document.body.offsetTop;
21 21
22 if (window.internals) 22 if (window.internals)
23 shouldBe("window.internals.needsLayoutCount()", "0", true); 23 shouldBe("window.internals.needsLayoutCount()", "0", true);
24 24
25 // Should cause a repaint but no layout. 25 // Should cause a repaint but no layout.
26 document.querySelector('#autosize').style.color = 'green'; 26 document.querySelector('#autosize').style.color = 'green';
27 27
28 if (window.internals) { 28 if (window.internals) {
29 shouldBe("window.internals.updateStyleAndReturnAffectedElementCount()", "1", true); 29 shouldBe("window.internals.updateStyleAndLayoutAndReturnAffectedElementC ount()", "1", true);
30 shouldBe("window.internals.needsLayoutCount()", "0", true); 30 shouldBe("window.internals.needsLayoutCount()", "0", true);
31 } 31 }
32 </script> 32 </script>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698