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

Unified Diff: LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html

Issue 793263002: Remove extraneous needsRecalc condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added test Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/getComputedStyle/computed-style-redistribution-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html b/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
new file mode 100644
index 0000000000000000000000000000000000000000..8bfb3e06cbba14f02e8797c34626dfa405840e3c
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.d1, .d2 { color: red }
+</style>
+<custom-element>
+ <div class="d1">A</div>
+ <div class="d2">B</div>
+</custom-element>
+<script>
+description("Check that getComputedStyle causes a shadow re-distribution when necessary.");
+
+var red = "rgb(255, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+var custom = document.querySelector("custom-element");
+var shadowRoot = custom.createShadowRoot();
+shadowRoot.innerHTML = '<style>::content div { color: green; }</style><content select=".d2"><content>'
+
+var d1 = document.querySelector(".d1");
+var d2 = document.querySelector(".d2");
+
+shouldBe("getComputedStyle(d1).color", "red");
+shouldBe("getComputedStyle(d2).color", "green");
+
+document.body.offsetTop;
+
+shadowRoot.querySelector("content").setAttribute("select", ".d1");
+
+shouldBe("getComputedStyle(d1).color", "green");
+shouldBe("getComputedStyle(d2).color", "red");
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/getComputedStyle/computed-style-redistribution-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698