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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.html

Issue 1544893003: Don't add rule features across ::content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused method Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..b3e6cf4da811b1e3ad540e1a9edad2fcaf98050f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<host id="host">
+ <div>
+ <div id="green" class="b">This text should be green</div>
+ </div>
+</host>
+<script>
+description("No need to invalidate for selectors right of ::content as ::content causes subtree invalidation.");
+
+var root = host.createShadowRoot();
+root.innerHTML = '<style>.a ::content .b { color: green }</style><div id="outer"><div class="b"><div class="b"><div class="b"><content/></div></div></div></div>';
+
+shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 0, 0)");
+
+host.offsetTop; // force recalc
+
+root.querySelector("#outer").className = "a";
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+
+shouldBeEqualToString("getComputedStyle(green).color", "rgb(0, 128, 0)");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/content-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698