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

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

Issue 889803003: Use style invalidation for :-webkit-any-link. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 #link { background-color: red }
5 #link:-webkit-any-link { background-color: green }
6 #link + div { color: pink }
7 </style>
8 <a id="link">This link should have a green background.</a>
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 :-webkit-any-link pseudo class. ")
17
18 var red = "rgb(255, 0, 0)";
19 var green = "rgb(0, 128, 0)";
20
21 shouldBe("getComputedStyle(link).backgroundColor", "red");
22
23 link.offsetTop; // Force recalc.
24 link.href = "not-visited.html";
25
26 if (window.internals)
27 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
28
29 shouldBe("getComputedStyle(link).backgroundColor", "green");
30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/any-link-pseudo-expected.txt » ('j') | Source/core/html/HTMLAnchorElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698