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

Unified Diff: LayoutTests/fast/dynamic/first-child-descendant.html

Issue 758523002: Store :last/first-child state as restyle flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed assert 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
Index: LayoutTests/fast/dynamic/first-child-descendant.html
diff --git a/LayoutTests/fast/dynamic/first-child-descendant.html b/LayoutTests/fast/dynamic/first-child-descendant.html
new file mode 100644
index 0000000000000000000000000000000000000000..47cd8cb7388d5e2f7cbcaa36cd637f0f1560a603
--- /dev/null
+++ b/LayoutTests/fast/dynamic/first-child-descendant.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+#b { color: green; }
+#a:first-child #b { color: red }
+</style>
+<div id="t">
+ <div id="a">
+ <div id="b">This text should be green</div>
+ </div>
+</div>
+<script>
+description("Evaluation of :first-child affecting descendant.");
+
+t.offsetTop;
+a.style.backgroundColor = "white";
+t.offsetTop;
+t.insertBefore(document.createElement("div"), a);
+
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(b).color", "green");
+</script>

Powered by Google App Engine
This is Rietveld 408576698