Skip to content

Commit

Permalink
[Bug 23789]: [Shadow] Migrate the content HTML Element's WebIDL defin…
Browse files Browse the repository at this point in the history
…ition to the format supported by ReSpec.
  • Loading branch information
hayatoito committed Nov 11, 2013
1 parent 50fa4cf commit c57c4e8
Showing 1 changed file with 51 additions and 57 deletions.
108 changes: 51 additions & 57 deletions spec/shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1239,72 +1239,66 @@ <h3><code>CSSRule</code> Constants</h3>
</dl>
</section>

<section id="content-element">
<h3>The <code>content</code> HTML element</h3>
<section id="content-element">
<h3>The <code>content</code> HTML element</h3>

<p>The <dfn id="dfn-content-element"><code>content</code></dfn> HTML element represents a <a href="#dfn-insertion-point">insertion point</a> in the <a href="#dfn-shadow-tree">shadow tree</a>.</p>
<p>The <dfn id="dfn-content-element"><code>content</code></dfn> HTML element represents a <a href="#dfn-insertion-point">insertion point</a> in the <a href="#dfn-shadow-tree">shadow tree</a>.</p>

<p>If a <code>content</code> HTML element does not satisfy the condition of an <a href="#dfn-insertion-point">insertion point</a>, it <strong>must</strong> have the same rendering behavior as the <a href="http://www.whatwg.org/specs/web-apps/current-work/#htmlunknownelement"><code>HTMLUnknownElement</code></a>.</p>
<p>If a <code>content</code> HTML element does not satisfy the condition of an <a href="#dfn-insertion-point">insertion point</a>, it <strong>must</strong> have the same rendering behavior as the <a href="http://www.whatwg.org/specs/web-apps/current-work/#htmlunknownelement"><code>HTMLUnknownElement</code></a>.</p>

<dl>
<dt>Context</dt>
<dd>Where <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#flow-content-0">flow content</a> is expected.</dd>
<dt>Content model</dt>
<dd><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#transparent">Transparent</a></dd>
<dt>Children</dt>
<dd>Anything as <a href="#dfn-fallback-content">fallback content</a></dd>
<dt>Content attributes</dt>
<dd><a href="http://dev.w3.org/html5/spec/Overview.html#global-attributes">Global attributes</a></dd>
<dd>
<dl>
<dt id="markup-content-select"><code>select</code>, a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#comma-separated-tokens">set of comma-separated tokens</a></dt>
<dd>
represents the <a href="#dfn-matching-criteria">matching criteria</a> for <a href="#dfn-distribution">distributing</a> child <a href="http://www.w3.org/TR/domcore/#concept-node">nodes</a> of the <a href="#dfn-shadow-host">shadow host</a>. Each token <strong>must</strong> be a <a href="http://dev.w3.org/csswg/selectors4/#compound">compound selector</a>.
</dd>
<dt id="markup-content-reset-style-inheritance"><code>resetstyleinheritance</code>, a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute">boolean</a> attribute</dt>
<dd>indicates the state of the <a href="#dfn-reset-style-inheritance">reset-style-inheritance</a> flag for this <a href="#dfn-insertion-point">insertion point</a>. If present, the value of the flag <strong>must</strong> be set to <strong>true</strong>. Otherwise, the value <strong>must</strong> be set to <strong>false</strong>.</dd>
</dl>
</dd>
<dt>DOM Interface</dt>
<dd>
<pre class="myidl">
interface <dfn id="api-html-content-element">HTMLContentElement</dfn> : <a href="http://dev.w3.org/html5/spec/Overview.html#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#api-html-content-element-select">select</a>;
attribute boolean <a href="#api-html-content-element-reset-style-inheritance">resetStyleInheritance</a>;
<a href="http://www.w3.org/TR/domcore/#interface-nodelist">NodeList</a> <a href="#api-html-content-element-get-distributed-nodes">getDistributedNodes</a>();
}
</pre>
<dl>
<dt>Attributes</dt>
<dd>
<dl>
<dt id="api-html-content-element-select"><code>select</code> of type <code>DOMString</code></dt>
<dd><strong>Must</strong> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect">reflect</a> the <a href="#markup-content-select">select</a> attribute.</dd>
<dt id="api-html-content-element-reset-style-inheritance"><code>resetStyleInheritance</code> of type <code>boolean</code></dt>
<dd><strong>Must</strong> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect">reflect</a> the <a href="#markup-content-reset-style-inheritance">resetstyleinheritance</a> attribute.</dd>
</dl>
</dd>
</dl>
<dl>
<dt>Methods</dt>
<dd><dl>
<dt id="api-html-content-element-get-distributed-nodes"><code>getDistributedNodes</code></dt>
<dd>When invoked, it <strong>must</strong> return result of running the following steps:
<ol>
<li>If the <a href="http://html5.org/specs/dom-parsing.html#context-object">context object</a> is a <a href="#dfn-content-insertion-point">content insertion point</a>:
<dt>Context</dt>
<dd>Where <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#flow-content-0">flow content</a> is expected.</dd>

<dt>Content model</dt>
<dd><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#transparent">Transparent</a></dd>

<dt>Children</dt>
<dd>Anything as <a href="#dfn-fallback-content">fallback content</a></dd>

<dt>Content attributes</dt>
<dd><a href="http://dev.w3.org/html5/spec/Overview.html#global-attributes">Global attributes</a></dd>
<dd>
<dl>
<dt id="markup-content-select"><code>select</code>, a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#comma-separated-tokens">set of comma-separated tokens</a></dt>
<dd>Represents the <a href="#dfn-matching-criteria">matching criteria</a> for <a href="#dfn-distribution">distributing</a> child <a href="http://www.w3.org/TR/domcore/#concept-node">nodes</a> of the <a href="#dfn-shadow-host">shadow host</a>. Each token <strong>must</strong> be a <a href="http://dev.w3.org/csswg/selectors4/#compound">compound selector</a>.</dd>

<dt id="markup-content-reset-style-inheritance"><code>resetstyleinheritance</code>, a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute">boolean</a> attribute</dt>
<dd>Indicates the state of the <a href="#dfn-reset-style-inheritance">reset-style-inheritance</a> flag for this <a href="#dfn-insertion-point">insertion point</a>. If present, the value of the flag <strong>must</strong> be set to <strong>true</strong>. Otherwise, the value <strong>must</strong> be set to <strong>false</strong>.</dd>
</dl>
</dd>

<dt>DOM Interface</dt>
<dd>
<dl class="idl" title="interface HTMLContentElement : HTMLElement">
<dt>attribute DOMString select</dt>
<dd><strong>Must</strong> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect">reflect</a> the <a href="#markup-content-select">select</a> attribute.</dd>

<dt>attribute boolean resetStyleInheritance</dt>
<dd><strong>Must</strong> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect">reflect</a> the <a href="#markup-content-reset-style-inheritance">resetstyleinheritance</a> attribute.</dd>

<dt>NodeList getDistributedNodes()</dt>
<dd>
When invoked, it <strong>must</strong> return result of running the following steps:
<ol>
<li>
If the <a href="http://html5.org/specs/dom-parsing.html#context-object">context object</a> is a <a href="#dfn-content-insertion-point">content insertion point</a>:
<ol>
<li>Return a <a href="http://www.w3.org/TR/domcore/#concept-collection-static">static</a> <a href="http://www.w3.org/TR/domcore/#nodelist"><code>NodeList</code></a> consisting of nodes in the <a href="#dfn-distributed-nodes">distributed nodes</a> of the <a href="http://www.w3.org/TR/domcore/#context-object">context object</a>.</li>
</ol></li>
<li>Otherwise:
</ol>
</li>
<li>
Otherwise:
<ol>
<li>Return an empty <a href="http://www.w3.org/TR/domcore/#concept-collection-static">static</a> <a href="http://www.w3.org/TR/domcore/#nodelist"><code>NodeList</code></a>.</li>
</ol></li>
</ol></dd>
</dl></dd>
</ol>
</li>
</ol>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</section>
</section>

<section id="shadow-element">
<h3>The <code>shadow</code> HTML element</h3>
Expand Down

0 comments on commit c57c4e8

Please sign in to comment.