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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/lang-pseudo.html

Issue 1485363002: Use invalidation sets for :lang changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another rebase Created 5 years 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/lang-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 :lang(no), :lang(no) + div > span,
5 :lang(en), :lang(en) + div > span { background-color: green }
6 </style>
7 <div id="norwegian"></div>
8 <div>
9 <div></div>
10 <div></div>
11 <div></div>
12 <span id="nospan"></span>
13 </div>
14 <div id="english"></div>
15 <div>
16 <div></div>
17 <div></div>
18 <div></div>
19 <span id="enspan"></span>
20 </div>
21 <script>
22 description("Use descendant invalidation set for :lang pseudo class.")
23
24 var transparent = "rgba(0, 0, 0, 0)";
25 var green = "rgb(0, 128, 0)";
26
27 shouldBe("getComputedStyle(norwegian).backgroundColor", "transparent");
28 shouldBe("getComputedStyle(nospan).backgroundColor", "transparent");
29 shouldBe("getComputedStyle(english).backgroundColor", "transparent");
30 shouldBe("getComputedStyle(enspan).backgroundColor", "transparent");
31
32 document.documentElement.offsetTop; // Force recalc.
33 norwegian.lang = "no";
34
35 if (window.internals)
36 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
37
38 shouldBe("getComputedStyle(norwegian).backgroundColor", "green");
39 shouldBe("getComputedStyle(nospan).backgroundColor", "green");
40
41 document.documentElement.offsetTop; // Force recalc.
42 english.setAttributeNS("http://www.w3.org/XML/1998/namespace", "lang", "en");
43
44 if (window.internals)
45 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
46
47 shouldBe("getComputedStyle(english).backgroundColor", "green");
48 shouldBe("getComputedStyle(enspan).backgroundColor", "green");
49 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/lang-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698