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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html

Issue 2362463004: Missing sibling invalidation across removed element. (Closed)
Patch Set: Rebased Created 4 years, 3 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 | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html
index ec5d1baa032a946f7eb048e69b7d238ec14c8979..47bd7752a6e2d808aba57b6b09195e4882e86e8f 100644
--- a/third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html
@@ -5,8 +5,8 @@
/* Dummy rule for increasing max-direct-adjacent */
.x + .x + .x + .x { color: red }
- span { color: green }
- .a + .d, .b + .c { color: red }
+ span, .p + .r { color: green }
+ .a + .d, .b + .c, .r { color: red }
</style>
<div id="insertTest">
<span class="a"></span>
@@ -16,10 +16,16 @@
</div>
<div id="removeTest">
<span class="a"></span>
+ <span class="a2"></span>
<span class="b"></span>
<span class="c"></span>
<span class="d"></span>
</div>
+<div id="removeTest2">
+ <span class="p"></span>
+ <span class="q"></span>
+ <span class="r"></span>
+</div>
<script>
test(() =>
assert_not_equals(window.internals, undefined, "Check that window.internals is defined.")
@@ -44,4 +50,14 @@
assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Recalc for .c.");
assert_equals(getComputedStyle(c).color, "rgb(0, 128, 0)", "Check that .c is green after .b is removed.");
}, "Check that we don't invalidate too much on sibling removal.");
+
+ test(() => {
+ var r = removeTest2.querySelector(".r");
+ assert_equals(getComputedStyle(r).color, "rgb(255, 0, 0)", "Check that .r is initially red.");
+
+ removeTest2.querySelector(".q").remove();
+
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Recalc for .r");
+ assert_equals(getComputedStyle(r).color, "rgb(0, 128, 0)", "Check that .r is green after .q is removed.");
+ }, "Check that we don't invalidate past removed element for sibling removal.");
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698