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

Unified Diff: LayoutTests/fast/css/invalidation/targeted-class-whole-subtree.html

Issue 317133002: Skip traversing wholeSubtree subtrees with clean invalidation bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue. Created 6 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 | LayoutTests/fast/css/invalidation/targeted-class-whole-subtree-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/targeted-class-whole-subtree.html
diff --git a/LayoutTests/fast/css/invalidation/targeted-class-whole-subtree.html b/LayoutTests/fast/css/invalidation/targeted-class-whole-subtree.html
new file mode 100644
index 0000000000000000000000000000000000000000..3447dbb40f4289d126a697cc8d6111012b600532
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/targeted-class-whole-subtree.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.b .c { background-color: pink }
+.a * { background-color: green }
+</style>
+<div id="outer">
+ <div id="inner">
+ <div>
+ <div></div>
+ <div></div>
+ </div>
+ </div>
+</div>
+<script>
+description("Check that all children of inner are recalculated.");
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+var inner = document.getElementById("inner");
+var outer = document.getElementById("outer");
+
+var innerDivs = inner.querySelectorAll("div");
+
+for (var i=0; i < innerDivs.length; i++)
+ shouldBe("getComputedStyle(innerDivs[i], null).backgroundColor", "transparent");
+
+document.body.offsetTop; // Force style recalc.
+
+outer.className = "b";
+inner.className = "a";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5");
+
+for (var i=0; i < innerDivs.length; i++)
+ shouldBe("getComputedStyle(innerDivs[i], null).backgroundColor", "green");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-class-whole-subtree-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698