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

Side by Side Diff: LayoutTests/fast/css/invalidation/fieldset-disabled.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 fieldset:disabled { background-color: green }
5 fieldset + div { color: pink }
6 </style>
7 <fieldset id="fieldset">
8 <legend></legend>
9 <label for="field"></label>
10 <input type="text" name="field" id="field">
11 <div>
12 <div></div>
13 <div></div>
14 <div></div>
15 <div></div>
16 </div>
17 </fieldset>
18 <div>
19 <div></div>
20 <div></div>
21 <div></div>
22 <div></div>
23 </div>
24 <script>
25 description("Use descendant invalidation set for :disabled fieldset.")
26
27 var transparent = "rgba(0, 0, 0, 0)";
28 var green = "rgb(0, 128, 0)";
29
30 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "transparent");
31
32 fieldset.offsetTop; // Force recalc.
33 fieldset.disabled = true;
34
35 if (window.internals) {
36 // There are still instances of SubtreeStyleChange left when updating
37 // disabled state. This count should become lower.
38 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7");
39 }
40
41 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "green");
42 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698