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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/hover-first-letter-sibling.html

Issue 1509853002: Remove checkForChildrenAdjacentRuleChanges. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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/hover-first-letter-sibling-expected.txt » ('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/hover-first-letter-sibling.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/hover-first-letter-sibling.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/hover-first-letter-sibling.html
new file mode 100644
index 0000000000000000000000000000000000000000..f2729207170288708ccad4bb0974befd39f46667
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/hover-first-letter-sibling.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+ #hovered { width: 100px; height: 100px; background-color: orange }
+ #hovered::first-letter { color: lime }
+ #hovered:hover { background-color: green }
+ #hovered:hover + div #target { background-color: green }
+</style>
+<div id="hovered">
+ <div></div>
+ <div></div>
+</div>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div id="target">This text, and the orange square, should have a green background when the orange square is hovered.</div>
+</div>
+<script>
+description("Sibling invalidation with :hover and ::first-letter");
+
+function hoverElement(element) {
+ eventSender.mouseMoveTo(0, 0);
+ document.body.offsetLeft; // force layout.
+ var x = element.offsetLeft + 1;
+ var y = element.offsetTop + 1;
+ eventSender.mouseMoveTo(x, y);
+}
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(target).backgroundColor", "transparent");
+
+shouldBeDefined("window.eventSender");
+
+if (window.eventSender)
+ hoverElement(hovered);
+
+// Recalc #hovered (1), its subtree (2) due to ::first-letter, and #target (1).
+// In total: 4.
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
+
+shouldBe("getComputedStyle(target).backgroundColor", "green");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/hover-first-letter-sibling-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698