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

Side by Side Diff: LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators.html

Issue 1349543004: CSS: Avoid invalidating style when only descendants need updating (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: invalidatesSelf Created 5 years, 3 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 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <style> 3 <style>
4 .c5 > .c4 ~ .c3 .c2 + .c1 { background-color: green } 4 .c5 > .c4 ~ .c3 .c2 + .c1 { background-color: green }
5 </style> 5 </style>
6 <!-- 6 <!--
7 Expected sets 7 Expected sets
8 8
9 .c1 { } 9 .c1 { }
10 .c2 { subtree } 10 .c2 { subtree }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 49 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
50 50
51 document.body.offsetTop; // Force style recalc. 51 document.body.offsetTop; // Force style recalc.
52 i2.className = "c2"; 52 i2.className = "c2";
53 if (window.internals) 53 if (window.internals)
54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
55 55
56 document.body.offsetTop; // Force style recalc. 56 document.body.offsetTop; // Force style recalc.
57 i3.className = "c3"; 57 i3.className = "c3";
58 if (window.internals) 58 if (window.internals)
59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
60 60
61 document.body.offsetTop; // Force style recalc. 61 document.body.offsetTop; // Force style recalc.
62 i4.className = "c4"; 62 i4.className = "c4";
63 if (window.internals) 63 if (window.internals)
64 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 64 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
65 65
66 shouldBe("getComputedStyle(i1, null).backgroundColor", "transparent"); 66 shouldBe("getComputedStyle(i1, null).backgroundColor", "transparent");
67 67
68 document.body.offsetLeft; // force style recalc. 68 document.body.offsetLeft; // force style recalc.
69 i5.className = "c5"; 69 i5.className = "c5";
70 if (window.internals) 70 if (window.internals)
71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
72 72
73 shouldBe("getComputedStyle(i1, null).backgroundColor", "green"); 73 shouldBe("getComputedStyle(i1, null).backgroundColor", "green");
74 74
75 </script> 75 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698