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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/remove-multiple-siblings.html

Issue 2089063005: Schedule sibling invalidation sets for sibling insert/remove. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed minDirectAdjacent optimization. Created 4 years, 6 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/LayoutTests/fast/css/invalidation/sibling-inserted.html » ('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/remove-multiple-siblings.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/remove-multiple-siblings.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/remove-multiple-siblings.html
new file mode 100644
index 0000000000000000000000000000000000000000..0ccb4c03b6f487a8494e0083af938ecec9e987a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/remove-multiple-siblings.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+ #i1 ~ #i3 { color: red }
+</style>
+<div id="sandbox">
+ <div id="i1"></div>
+ <div id="i2"></div>
+ <div></div>
+ <div></div>
+ <div id="i3">This text should not be red.</div>
+</div>
+<script>
+ test(() => {
+ assert_true(!!window.internals, "This test only works with internals exposed");
+ }, "internals are exposed");
+
+ test(() => {
+ assert_equals(getComputedStyle(i3).color, "rgb(255, 0, 0)", "#i3 color should be red");
+ }, "#i3 red before mutations");
+
+
+ test(() => {
+ sandbox.offsetTop; // Force clean style/layout.
+ sandbox.removeChild(i1);
+ sandbox.removeChild(i2);
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "#i3 should have had its style recalculated");
+ }, "#i3 recalculated");
+
+ test(() => {
+ assert_equals(getComputedStyle(i3).color, "rgb(0, 0, 0)", "#i3 color should not be red");
+ }, "#i3 not red after mutations");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-inserted.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698