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

Unified Diff: LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node.html

Issue 144853004: Don't use cached inherited props for distributed nodes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Allow sharing inherited properties if -webkit-user-modify is read-only. Created 6 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 | LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node.html
diff --git a/LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node.html b/LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node.html
new file mode 100644
index 0000000000000000000000000000000000000000..6b1018cee41cebc1ed7427fc228fe4db32973121
--- /dev/null
+++ b/LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<p>This test checks that contenteditable is propagated to distributed nodes.</p>
+<div id="host" contenteditable><span></span></div>
+<pre id="console"></pre>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+// An important part is that the span created below triggers a check for
+// re-using inherited props from the cache for the distributed span.
+
+var shadowRoot = host.createShadowRoot();
+var span = document.createElement("span");
+var content = document.createElement("content");
+shadowRoot.appendChild(span);
+shadowRoot.appendChild(content);
+
+shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('span')[0], null).webkitUserModify", "read-only");
+shouldBeEqualToString("getComputedStyle(shadowRoot.getElementsByTagName('content')[0].getDistributedNodes()[0], null).webkitUserModify", "read-write");
+
+successfullyParsed = true;
+</script>
« no previous file with comments | « no previous file | LayoutTests/editing/shadow/contenteditable-propagation-to-distributed-node-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698