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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Document/scrollingElement-noLayout-quirks.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 <!-- NOTE: Quirks mode document --> 1 <!-- NOTE: Quirks mode document -->
2 <style> 2 <style>
3 body { 3 body {
4 overflow: scroll; 4 overflow: scroll;
5 height: 500px; 5 height: 500px;
6 width: 500px; 6 width: 500px;
7 } 7 }
8 #spacer { 8 #spacer {
9 height: 10000px; 9 height: 10000px;
10 } 10 }
11 </style> 11 </style>
12 <html> 12 <html>
13 <body> 13 <body>
14 <div id=spacer></div> 14 <div id=spacer></div>
15 </body> 15 </body>
16 </html> 16 </html>
17 <script src="../../../resources/js-test.js"></script> 17 <script src="../../../resources/js-test.js"></script>
18 <script> 18 <script>
19 description('Verify that document.scrollingElement updates style in quirks m ode without triggering layout'); 19 description('Verify that document.scrollingElement updates style in quirks m ode without triggering layout');
20 setPrintTestResultsLazily(); 20 setPrintTestResultsLazily();
21 21
22 document.body.offsetTop; 22 document.body.offsetTop;
23 shouldBe("internals.needsLayoutCount()", "0"); 23 shouldBe("internals.needsLayoutCount()", "0");
24 24
25 document.body.style.padding = "10px"; 25 document.body.style.padding = "10px";
26 shouldBe("document.scrollingElement", "document.body"); 26 shouldBe("document.scrollingElement", "document.body");
27 debug("Verifying layout hasn't been triggered"); 27 debug("Verifying layout hasn't been triggered");
28 shouldBe("internals.needsLayoutCount()", "3"); 28 shouldBe("internals.needsLayoutCount()", "3");
29 debug("But style update was"); 29 debug("But style update was");
30 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); 30 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "0 ");
31 31
32 document.documentElement.style.overflow = "scroll"; 32 document.documentElement.style.overflow = "scroll";
33 33
34 // Workaround crbug.com/486034 to foce body style to be considered dirty 34 // Workaround crbug.com/486034 to foce body style to be considered dirty
35 document.body.style.padding = "8px"; 35 document.body.style.padding = "8px";
36 36
37 debug("Verify style change is reflected - body is now a real scrolling block element"); 37 debug("Verify style change is reflected - body is now a real scrolling block element");
38 shouldBeNull("document.scrollingElement"); 38 shouldBeNull("document.scrollingElement");
39 debug("Verifying layout still hasn't been triggered"); 39 debug("Verifying layout still hasn't been triggered");
40 shouldBe("internals.needsLayoutCount()", "3"); 40 shouldBe("internals.needsLayoutCount()", "3");
41 </script> 41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698