<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[190098] trunk/LayoutTests</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/190098">190098</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-21 19:26:28 -0700 (Mon, 21 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add more rendering tests for shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=149437
Reviewed by Antti Koivisto.
Added various tests for shadow tree rendering as well as tests for :host pseudo class and ::slotted pseudo element.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html: Added.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-functional-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-host-with-before-after.html: Added.
* fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-slot-display-override.html: Added.
* fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-slotted-rule.html: Added.
* fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
* fast/shadow-dom/css-scoping-shadow-with-outside-rules.html: Added.
* platform/mac/TestExpectations:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithbeforeafterexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithbeforeafterhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithrulesexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithruleshtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostfunctionalruleexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostfunctionalrulehtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostruleexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostrulehtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostwithbeforeafterexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowhostwithbeforeafterhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowslotdisplayoverrideexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowslotdisplayoverridehtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowslottedruleexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowslottedrulehtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowwithoutsiderulesexpectedhtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastshadowdomcssscopingshadowwithoutsideruleshtml">trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190097 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-22 01:27:54 UTC (rev 190097)
+++ trunk/LayoutTests/ChangeLog        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-09-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add more rendering tests for shadow DOM
+ https://bugs.webkit.org/show_bug.cgi?id=149437
+
+ Reviewed by Antti Koivisto.
+
+ Added various tests for shadow tree rendering as well as tests for :host pseudo class and ::slotted pseudo element.
+
+ * fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-host-functional-rule.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-host-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-host-rule.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-host-with-before-after.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-slot-display-override.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-slotted-rule.html: Added.
+ * fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html: Copied from LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html.
+ * fast/shadow-dom/css-scoping-shadow-with-outside-rules.html: Added.
+ * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2015-09-21 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> [JS Bindings] prototype.constructor should be writable
</span></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithbeforeafterexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithbeforeafterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-before-after.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - before and after contents on a node assigned to a slot element must be rendered</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: red;
+ }
+ div {
+ display: block;
+ background: red;
+ line-height: 0px;
+ width: 100%;
+ height: 50px;
+ }
+ [slot=foo]:before,
+ [slot=foo]:after {
+ display: block;
+ content: "";
+ width: 100%;
+ height: 25px;
+ }
+ [slot=foo]:before,
+ [slot=foo]:after {
+ background: green;
+ }
+ [slot=bar]:before,
+ [slot=bar]:after {
+ background: yellow;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div slot="foo"></div>
+ <div slot="bar"></div>
+ <div slot="foo"></div>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot name="foo"></slot>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithrulesexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowassignednodewithruleshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-assigned-node-with-rules.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - only rules outside a shadow tree must apply to nodes assigned to a slot in the shadow tree.</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+ background: green;
+ }
+ div {
+ width: 100%;
+ height: 50%;
+ }
+ .green {
+ color: green;
+ }
+ .red {
+ color: red;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div class="red">FAIL</div>
+ <div class="green" slot="green">FAIL</div>
+ <div class="red" slot="invalid">FAIL</div>
+ <div class="green" slot="green">FAIL</div>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> div { color: yellow; } </style><slot name="green"></slot>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostfunctionalruleexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostfunctionalrulehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-functional-rule.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - :host() rules must apply to the shadow host.</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host, good-host, other-host, other-good-host {
+ display: block;
+ width: 100px;
+ height: 50px;
+ background: red;
+ }
+ good-host, other-good-host {
+ background: green;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div>FAIL</div>
+ </my-host>
+ <div class="container">
+ <good-host>
+ <div>FAIL</div>
+ </good-host>
+ </div>
+ <other-host id="bar" class="foo" name="baz">
+ <div>FAIL</div>
+ </other-host>
+ <other-good-host>
+ <div class="child">FAIL</div>
+ </other-good-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('other-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> :host(other-host.foo#bar[name=baz]) { background: green; } </style>';
+
+ shadowHost = document.querySelector('other-good-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> :host(.child) { background: red; } </style>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostruleexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostrulehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - :host rules must apply to the shadow host.</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host, good-host, other-host, other-good-host {
+ display: block;
+ width: 100px;
+ height: 50px;
+ background: red;
+ }
+ good-host, other-good-host {
+ background: green;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div>FAIL</div>
+ </my-host>
+ <div class="container">
+ <good-host>
+ <div>FAIL</div>
+ </good-host>
+ </div>
+ <other-host id="bar" class="foo" name="baz">
+ <div>FAIL</div>
+ </other-host>
+ <other-good-host>
+ <div class="child">FAIL</div>
+ </other-good-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> :host { background: green; } </style>';
+
+ shadowHost = document.querySelector('good-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> .container :host { background: red; } </style>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostwithbeforeafterexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowhostwithbeforeafterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-host-with-before-after.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - before and after contents on a shadow host must be rendered</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: red;
+ }
+ my-host:before {
+ display: block;
+ content: "";
+ width: 100px;
+ height: 25px;
+ background: green;
+ }
+ my-host:after {
+ display: block;
+ content: "";
+ width: 100px;
+ height: 25px;
+ background: green;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div>FAIL</div>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<div style="width: 100px; height: 50px; background: green"></div>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowslotdisplayoverrideexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowslotdisplayoverridehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slot-display-override.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - overriding slot element's display value should generate boxes</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: red;
+ }
+ my-host > div {
+ width: 50px;
+ height: 50px;
+ background: green;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div></div>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot style="display:block; border: solid 25px green;"></slot>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowslottedruleexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowslottedrulehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-slotted-rule.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - :slotted pesudo element must allow selecting elements assigned to a slot element</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: red;
+ }
+ my-host > div, nested-host {
+ display: block;
+ width: 100px;
+ height: 25px;
+ }
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div class="green">FAIL1</div>
+ <div><span>FAIL2</span></div>
+ <nested-host>
+ <span>FAIL3</span>
+ </nested-host>
+ <another-host>
+ <b>FAIL4</b>
+ </another-host>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot></slot><style> ::slotted > .green, ::slotted span { color:green; } </style>';
+
+ shadowHost = document.querySelector('nested-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot></slot>';
+
+ shadowHost = document.querySelector('another-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<style> ::slotted { color:green; } </style><slot></slot>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowwithoutsiderulesexpectedhtmlfromrev190087trunkLayoutTestsfastshadowdomcssscopingshadowroothideschildrenexpectedhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html (from rev 190087, trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-root-hides-children-expected.html) (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules-expected.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastshadowdomcssscopingshadowwithoutsideruleshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules.html (0 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules.html         (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/css-scoping-shadow-with-outside-rules.html        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Scoping - a selector outside a shadow tree should not match nodes inside the shadow tree</title>
+ <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
+ <link rel="help" href="http://www.w3.org/TR/css-scoping-1/#selectors-data-model">
+ <link rel="match" href="reference/green-box.html"/>
+</head>
+<body>
+ <style>
+
+ my-host {
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: green;
+ }
+
+ div {
+ width: 100%;
+ height: 100%;
+ background: red;
+ content: "FAIL";
+ }
+
+ </style>
+ <p>Test passes if you see a single 100px by 100px green box below.</p>
+ <my-host>
+ <div>FAIL</div>
+ </my-host>
+ <script>
+
+ try {
+ var shadowHost = document.querySelector('my-host');
+ shadowRoot = shadowHost.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<div></div>';
+ } catch (exception) {
+ document.body.appendChild(document.createTextNode(exception));
+ }
+
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (190097 => 190098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2015-09-22 01:27:54 UTC (rev 190097)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2015-09-22 02:26:28 UTC (rev 190098)
</span><span class="lines">@@ -1304,3 +1304,7 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/148695 fast/shadow-dom [ Pass ]
</span><span class="cx"> webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-with-rules.html [ ImageOnlyFailure ]
</span><ins>+webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-host-rule.html [ ImageOnlyFailure ]
+webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-host-functional-rule.html [ ImageOnlyFailure ]
+webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-slotted-rule.html [ ImageOnlyFailure ]
+webkit.org/b/149328 fast/shadow-dom/css-scoping-shadow-slot-display-override.html [ ImageOnlyFailure ]
</ins></span></pre>
</div>
</div>
</body>
</html>