Index: LayoutTests/fast/css/recalc-direct-adjacent-001.html |
diff --git a/LayoutTests/fast/css/recalc-direct-adjacent-001.html b/LayoutTests/fast/css/recalc-direct-adjacent-001.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3ac6c5f1ddb83255018db51c1140c242246f7a6a |
--- /dev/null |
+++ b/LayoutTests/fast/css/recalc-direct-adjacent-001.html |
@@ -0,0 +1,37 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+ body { color: black; } |
+ .match+div div+div { color: green; } |
+</style> |
+<div> |
+ <div id="top"></div> |
+ <div> |
+ <div></div> |
+ <div id="green"></div> |
+ </div> |
+ <div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ </div> |
+</div> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+description("Check that we don't do unnecessary style recalcs for sibling trees."); |
+ |
+if (window.internals) |
+ internals.updateStyleAndReturnAffectedElementCount(); |
+ |
+document.getElementById("top").className = "match"; |
+ |
+if (window.internals) |
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4"); |
+ |
+shouldBe("getComputedStyle(document.getElementById('green'), null).color", "'rgb(0, 128, 0)'"); |
+ |
+successfullyParsed = true; |
+</script> |