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

Unified Diff: LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html

Issue 286903024: Skip child ShadowRoots when invalidation does not have boundary crossing rules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build Created 6 years, 7 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/shadow-boundary-crossing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html
diff --git a/LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html b/LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html
new file mode 100644
index 0000000000000000000000000000000000000000..c12fb082b56a0c74d3d16cac770c77badc45662d
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+
+<script src="../../../resources/js-test.js"></script>
+
+<style>
+ .deep /deep/ .inside,
+ .shallow .inside {
+ padding: 0;
+ }
+</style>
+
+<div id="sandbox"></div>
+
+<script>
+description("Invalidation sets should not apply across shadow roots if tree boundary crossing rules are not used.");
+
+var sandbox = document.getElementById("sandbox");
+var sandboxRoot = sandbox.createShadowRoot();
+sandboxRoot.innerHTML = "<content></content>";
+
+for (var j = 0; j < 10; ++j) {
+ var childDiv = sandbox.appendChild(document.createElement("div"));
+ childDiv.className = "inside";
+ var shadowDiv = sandboxRoot.appendChild(document.createElement("div"));
+ shadowDiv.className = "inside";
+ shadowDiv.createShadowRoot().innerHTML = "<div class=inside><content></content></div>";
+}
+
+getComputedStyle(sandbox).color;
+sandbox.className = "shallow";
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "11");
+sandbox.className = "";
+
+getComputedStyle(sandbox).color;
+sandbox.className = "deep";
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "31");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/shadow-boundary-crossing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698