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

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

Issue 921843004: Stop explicit inheritance if LayoutStyle doesn't change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected and documented flag copying/comparisons Created 5 years, 10 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
Index: LayoutTests/fast/css/invalidation/explicit-inheritance-propagation.html
diff --git a/LayoutTests/fast/css/invalidation/explicit-inheritance-propagation.html b/LayoutTests/fast/css/invalidation/explicit-inheritance-propagation.html
new file mode 100644
index 0000000000000000000000000000000000000000..e55174756b22c8c1d604b6b08186951f7fb0ffbf
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/explicit-inheritance-propagation.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+#root { background-color: red }
+.inherit { background-color: inherit }
+</style>
+<div id="root">
+ <div class="inherit">
+ <div class="inherit">
+ <div id="inner" class="inherit"></div>
+ </div>
+ </div>
+ <div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+</div>
+<script>
+description("");
+
+root.offsetTop; // force recalc
+
+root.style.background = "green";
+
+// The #root element, elements with .inherited and their siblings (5 in total) will need a recalc.
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5");
+
+var green = "rgb(0, 128, 0)";
+shouldBe("getComputedStyle(inner).backgroundColor", "green");
+</script>

Powered by Google App Engine
This is Rietveld 408576698