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

Side by Side Diff: LayoutTests/fast/css/invalidation/targeted-class-type-selectors.html

Issue 224593002: Use invalidation sets when selector contains adjacent combinators. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased with modified expected test results. Created 6 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <style> 3 <style>
4 .a1 span { background-color: green } 4 .a1 span { background-color: green }
5 .a2 span + div { background-color: green } 5 .a2 span + div { background-color: green }
6 .a3 * { background-color: green } 6 .a3 * { background-color: green }
7 </style> 7 </style>
8 <div id="t1"> 8 <div id="t1">
9 <span></span> 9 <span></span>
10 <span></span> 10 <span></span>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); 51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3");
52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green"); 52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green");
53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green"); 53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green");
54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent" ); 54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent" );
55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent" ); 55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent" );
56 56
57 document.body.offsetLeft; // force style recalc. 57 document.body.offsetLeft; // force style recalc.
58 58
59 document.getElementById("t2").className = "a2"; 59 document.getElementById("t2").className = "a2";
60 if (window.internals) 60 if (window.internals)
61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); 61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3");
62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent" ); 62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent" );
63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent" ); 63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent" );
64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green"); 64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green");
65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent" ); 65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent" );
66 66
67 document.body.offsetLeft; // force style recalc. 67 document.body.offsetLeft; // force style recalc.
68 68
69 document.getElementById("t3").className = "a3"; 69 document.getElementById("t3").className = "a3";
70 if (window.internals) 70 if (window.internals)
71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5");
72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green"); 72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green");
73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green"); 73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green");
74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green"); 74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green");
75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green"); 75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green");
76 76
77 </script> 77 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698