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

Side by Side Diff: LayoutTests/fast/dom/Document/scrollingElement-noLayout-quirks.html

Issue 1216953003: Promote scrollTopLeftInterop mode to experimental (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove fixes moved to other patches Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/scrollingElement-noStyleUpdate-strict.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (window.internals)
22 internals.settings.setScrollTopLeftInteropEnabled(true);
23 21
24 document.body.offsetTop; 22 document.body.offsetTop;
25 shouldBe("internals.needsLayoutCount()", "0"); 23 shouldBe("internals.needsLayoutCount()", "0");
26 24
27 document.body.style.padding = "10px"; 25 document.body.style.padding = "10px";
28 shouldBe("document.scrollingElement", "document.body"); 26 shouldBe("document.scrollingElement", "document.body");
29 debug("Verifying layout hasn't been triggered"); 27 debug("Verifying layout hasn't been triggered");
30 shouldBe("internals.needsLayoutCount()", "3"); 28 shouldBe("internals.needsLayoutCount()", "3");
31 debug("But style update was"); 29 debug("But style update was");
32 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); 30 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
33 31
34 document.documentElement.style.overflow = "scroll"; 32 document.documentElement.style.overflow = "scroll";
35 33
36 // 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
37 document.body.style.padding = "8px"; 35 document.body.style.padding = "8px";
38 36
39 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");
40 shouldBeNull("document.scrollingElement"); 38 shouldBeNull("document.scrollingElement");
41 debug("Verifying layout still hasn't been triggered"); 39 debug("Verifying layout still hasn't been triggered");
42 shouldBe("internals.needsLayoutCount()", "3"); 40 shouldBe("internals.needsLayoutCount()", "3");
43 </script> 41 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/scrollingElement-noStyleUpdate-strict.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698