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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/read-only-write-pseudo.html

Issue 1454003002: Use invalidation sets for :read-only and :read-write. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | third_party/WebKit/LayoutTests/fast/css/invalidation/read-only-write-pseudo-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 input { background: transparent }
5 input + div { color: pink }
6 #i1:read-only { background-color: green }
7 #i2:read-write { background-color: green }
8 </style>
9 <input id="i1" type="text"></input>
10 <div>
11 <div></div>
12 <div></div>
13 <div></div>
14 <div></div>
15 </div>
16 <input id="i2" type="text" readonly></input>
17 <div>
18 <div></div>
19 <div></div>
20 <div></div>
21 <div></div>
22 </div>
23 <script>
24 description("Use descendant invalidation sets for :read-only and :read-write pse udo classes.")
25
26 var transparent = "rgba(0, 0, 0, 0)";
27 var green = "rgb(0, 128, 0)";
28
29 shouldBe("getComputedStyle(i1, '').backgroundColor", "transparent");
30 shouldBe("getComputedStyle(i2, '').backgroundColor", "transparent");
31
32 i1.offsetTop; // Force recalc.
33 i1.setAttribute("readonly", "");
34
35 if (window.internals)
36 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
37
38 shouldBe("getComputedStyle(i1, '').backgroundColor", "green");
39
40 i2.offsetTop; // Force recalc.
41 i2.removeAttribute("readonly");
42
43 if (window.internals)
44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
45
46 shouldBe("getComputedStyle(i2, '').backgroundColor", "green");
47 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/read-only-write-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698