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

Unified Diff: LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class.html

Issue 637273003: Corrected insertion point style recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class.html
diff --git a/LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class.html b/LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class.html
new file mode 100644
index 0000000000000000000000000000000000000000..b23165ceba489dd6ceeb48b980a59839833a7149
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<style>
+.square { width: 100px; height: 100px; }
+</style>
+<p>You should see two green squares below.</p>
+<div id="host1">
+ <div class="square"></div>
+</div>
+<br>
+<div id="host2">
+ <div class="square"></div>
+</div>
+<script>
+host1.createShadowRoot().innerHTML = "<style>.c::content .square { background-color: green }</style><content></content>";
+host2.createShadowRoot().innerHTML = "<style>.c::content * { background-color: green }</style><content></content>";
+document.body.offsetTop; // Force style recalc.
+host1.shadowRoot.querySelector("content").className = "c";
+host2.shadowRoot.querySelector("content").className = "c";
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-class-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698