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

Side by Side Diff: LayoutTests/fast/css/invalidation/target-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 :target #match { background-color: green }
5 #target + div { color: pink }
6 </style>
7 <div id="target">
8 <div></div>
9 <div></div>
10 <div>
11 <div></div>
12 <div id="match"></div>
13 </div>
14 <div></div>
15 </div>
16 <div>
17 <div></div>
18 <div></div>
19 <div></div>
20 <div></div>
21 </div>
22 <script>
23 description("Use descendant invalidation set for :target pseudo class.")
24
25 var transparent = "rgba(0, 0, 0, 0)";
26 var green = "rgb(0, 128, 0)";
27
28 shouldBe("getComputedStyle(match, '').backgroundColor", "transparent");
29
30 target.offsetTop; // Force recalc.
31
32 document.location.hash = "#target";
33
34 // Should have checked that internals.updateStyleAndReturnAffectedElementCount()
35 // equals 2 here, but the target style is updated synchronously from where the
36 // target is set.
37
38 shouldBe("getComputedStyle(match, '').backgroundColor", "green");
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698