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

Side by Side Diff: LayoutTests/fast/css/invalidation/disabled-pseudo.html

Issue 540533004: Use style invalidation for more pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 input { background: transparent }
5 :disabled { background-color: green }
6 input + div { color: pink }
7 </style>
8 <input id="button" type="button"></input>
9 <div>
10 <div></div>
11 <div></div>
12 <div></div>
13 <div></div>
14 </div>
15 <script>
16 description("Use descendant invalidation set for :disabled pseudo class.")
17
18 var transparent = "rgba(0, 0, 0, 0)";
19 var green = "rgb(0, 128, 0)";
20
21 shouldBe("getComputedStyle(button, '').backgroundColor", "transparent");
22
23 button.offsetTop; // Force recalc.
24
25 button.disabled = true;
26
27 if (window.internals)
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
29
30 shouldBe("getComputedStyle(button, '').backgroundColor", "green");
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698