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

Unified Diff: LayoutTests/fast/css/invalidation/explicit-inheritance-flag.html

Issue 1133263003: Maintain child dependent ComputedStyle flags if propagation stops. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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/css/invalidation/explicit-inheritance-flag-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/explicit-inheritance-flag.html
diff --git a/LayoutTests/fast/css/invalidation/explicit-inheritance-flag.html b/LayoutTests/fast/css/invalidation/explicit-inheritance-flag.html
new file mode 100644
index 0000000000000000000000000000000000000000..c565fa52e70200a9948bf49648a7eb2faaca2295
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/explicit-inheritance-flag.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.root1, .root2 { max-height: 200px }
+.root3 { max-height: 100px }
+#root span { max-height: inherit }
+</style>
+<div id="root" class="root1">
+ <span></span>
+</div>
+<script>
+description("Explicit inheritance of non-inherited property. Test that the explicitInherit flag in ComputedStyle is maintained correctly.");
+
+root.offsetTop; // force recalc
+root.className = "root2";
+
+// No inheritance neede but explicitlInheritance needs to be set.
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+
+root.offsetTop; // force recalc
+root.className = "root3";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+
+shouldBeEqualToString("getComputedStyle(root.querySelector('span')).maxHeight", "100px");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/explicit-inheritance-flag-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698