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

Unified Diff: LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html

Issue 751023002: Use SubSelector as relation on left-most selector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: SubSelector is not a combinator Created 6 years, 1 month 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 | LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html
diff --git a/LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html b/LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html
new file mode 100644
index 0000000000000000000000000000000000000000..c1c5c0096c681d7ef42890dd4594bc774d09d6de
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+:not(.x).a + #b { background-color: green }
+</style>
+<div id="a"></div>
+<div id="b"></div>
+<script>
+description("Negated selector should not clear adjacent combinator flag.")
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(b).backgroundColor", "transparent");
+
+a.offsetTop; // Force recalc.
+a.className = "a";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+else
+ a.offsetTop; // Force recalc (crbug.com/436064)
+
+shouldBe("getComputedStyle(b).backgroundColor", "green");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698