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

Side by Side Diff: LayoutTests/fast/css/invalidation/fullscreen.html

Issue 663023003: Avoid subtree style recalc for fullscreen pseudos. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/fullscreen-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 #full, #ancestor, #doc {
5 background-color: red;
6 }
7
8 .t1 #full:-webkit-full-screen,
9 .t2 #ancestor:-webkit-full-screen-ancestor,
10 .t3 #doc:-webkit-full-screen-document {
11 background-color: green;
12 }
13 </style>
14 <div id="testRoot">
15 <div id="ancestor">
16 <div id="full">
17 <div></div>
18 </div>
19 <div id="doc">
20 <div></div>
21 </div>
22 <div></div>
23 </div>
24 <div></div>
25 <div></div>
26 </div>
27 <script>
28 description("Test that descendant invalidation works with fullscreen pseudo clas ses.");
29
30 window.jsTestIsAsync = true;
31
32 var red = "rgb(255, 0, 0)";
33 var green = "rgb(0, 128, 0)";
34
35 function runTests() {
36
37 shouldBe("getComputedStyle(full).backgroundColor", "red");
38 testRoot.offsetTop; // force recalc
39 testRoot.className = "t1";
40 if (window.internals)
41 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
42 shouldBe("getComputedStyle(full).backgroundColor", "green");
43
44 shouldBe("getComputedStyle(ancestor).backgroundColor", "red");
45 testRoot.offsetTop; // force recalc
46 testRoot.className += " t2";
47 if (window.internals)
48 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
49 shouldBe("getComputedStyle(ancestor).backgroundColor", "green");
50
51 shouldBe("getComputedStyle(doc).backgroundColor", "red");
52 testRoot.offsetTop; // force recalc
53 testRoot.className += " t3";
54 if (window.internals)
55 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
56 shouldBe("getComputedStyle(doc).backgroundColor", "green");
57
58 finishJSTest();
59 }
60
61 if (window.testRunner)
62 testRunner.waitUntilDone();
63
64 document.addEventListener("keypress", function(){
65 document.getElementById("full").webkitRequestFullScreen();
66 });
67
68 document.addEventListener("webkitfullscreenchange", function(){
69 runTests();
70 });
71
72 if (window.eventSender)
73 eventSender.keyDown(" ");
74 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/fullscreen-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698