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> |