Skip to content

Commit

Permalink
[e] (0) DOM Core convergence (cloning)
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13612

git-svn-id: http://svn.whatwg.org/webapps@6423 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 11, 2011
1 parent a62b36c commit 4413d0f
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 91 deletions.
51 changes: 23 additions & 28 deletions complete.html
Expand Up @@ -3242,13 +3242,6 @@ <h4 id=dom-trees><span class=secno>2.1.3 </span>DOM trees</h4>
value, text node, or string, means that the length of the text is
zero (i.e. not even containing spaces or control characters).</p>

<p>Nodes can be <dfn id=concept-clone title=concept-clone>cloned</dfn>, as
described in the DOM Core specification. For example, the <code title=dom-cloneNode>cloneNode()</code> and <code title=dom-importNode>importNode()</code> methods of the
<code><a href=#node>Node</a></code> interface both clone nodes, as do a number of
algorithms in this specification. Certain <a href=#html-elements>HTML elements</a>
(in particular, <code><a href=#the-input-element>input</a></code> and <code><a href=#the-script-element>script</a></code>) apply
additional requirements on how they are cloned. <a href=#refsDOMCORE>[DOMCORE]</a></p>


<h4 id=scripting-0><span class=secno>2.1.4 </span>Scripting</h4>

Expand Down Expand Up @@ -3778,6 +3771,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li>The <dfn id="document's-character-encoding" title="document's character encoding">character encoding</dfn> of a <code><a href=#document>Document</a></code></li>
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>
<li>The algorithm to <dfn id=concept-node-clone title=concept-node-clone>clone</dfn> a <code><a href=#node>Node</a></code>, and the concept of <dfn id=concept-node-clone-ext title=concept-node-clone-ext>cloning steps</dfn> used by tat algorithm</li>

</ul><p>The following <code><a href=#domexception>DOMException</a></code> codes are defined in
the DOM Core specification: <a href=#refsDOMCORE>[DOMCORE]</a></p>
Expand Down Expand Up @@ -15520,9 +15514,9 @@ <h4 id=the-script-element><span class=secno>4.3.1 </span>The <dfn id=script><cod
<p>The first is a flag indicating whether or not the script block
has been <dfn id=already-started>"already started"</dfn>. Initially,
<code><a href=#the-script-element>script</a></code> elements must have this flag unset (script
blocks, when created, are not "already started"). When a
<code><a href=#the-script-element>script</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the "already started" flag, if
set, must be propagated to the clone when it is created.</p>
blocks, when created, are not "already started"). The <a href=#concept-node-clone-ext title=concept-node-clone-ext>cloning steps</a> for
<code><a href=#the-script-element>script</a></code> elements must set the "already started" flag on
the copy if it is set on the element being cloned.</p>

<p>The second is a flag indicating whether the element was
<dfn id=parser-inserted>"parser-inserted"</dfn>. Initially, <code><a href=#the-script-element>script</a></code>
Expand Down Expand Up @@ -43810,9 +43804,10 @@ <h4 id=the-input-element><span class=secno>4.10.7 </span>The <dfn><code>input</c
some cases (e.g. for the <a href=#date-state title=attr-input-type-date>Date</a> state, but not the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state) make an
<code><a href=#the-input-element>input</a></code> element <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>.</p>

<p>When an <code><a href=#the-input-element>input</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<p>The <a href=#concept-node-clone-ext title=concept-node-clone-ext>cloning steps</a> for
<code><a href=#the-input-element>input</a></code> elements must propagate the <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
flag</a> must be propagated to the clone when it is created.</p>
flag</a> from the node being cloned to the copy.</p>

<hr><p>When an <code><a href=#the-input-element>input</a></code> element is first created, the
element's rendering and behavior must be set to the rendering and
Expand Down Expand Up @@ -60753,7 +60748,7 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
Expand Down Expand Up @@ -60792,13 +60787,13 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<ol><li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">subheading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned subheading content</var> be
a new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in
<var title="">subheading content</var> and their descendants
into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned subheading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -60905,13 +60900,13 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a
new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in
<var title="">heading content</var> and their descendants into
an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -60941,7 +60936,7 @@ <h4 id=atom><span class=secno>5.5.3 </span>Atom</h4>

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> <var title="">article</var> and its descendants into an environment
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> <var title="">article</var> and its descendants into an environment
that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
Expand Down
51 changes: 23 additions & 28 deletions index
Expand Up @@ -3139,13 +3139,6 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
value, text node, or string, means that the length of the text is
zero (i.e. not even containing spaces or control characters).</p>

<p>Nodes can be <dfn id=concept-clone title=concept-clone>cloned</dfn>, as
described in the DOM Core specification. For example, the <code title=dom-cloneNode>cloneNode()</code> and <code title=dom-importNode>importNode()</code> methods of the
<code><a href=#node>Node</a></code> interface both clone nodes, as do a number of
algorithms in this specification. Certain <a href=#html-elements>HTML elements</a>
(in particular, <code><a href=#the-input-element>input</a></code> and <code><a href=#the-script-element>script</a></code>) apply
additional requirements on how they are cloned. <a href=#refsDOMCORE>[DOMCORE]</a></p>


<h4 id=scripting-0><span class=secno>2.1.4 </span>Scripting</h4>

Expand Down Expand Up @@ -3675,6 +3668,7 @@ explained in the previous section, which talks about RFC 2119. -->
<li>The <dfn id="document's-character-encoding" title="document's character encoding">character encoding</dfn> of a <code><a href=#document>Document</a></code></li>
<li>The distinction between <dfn id=xml-documents>XML documents</dfn> and <dfn id=html-documents>HTML documents</dfn></li>
<li>The terms <dfn id=quirks-mode>quirks mode</dfn>, <dfn id=limited-quirks-mode>limited-quirks mode</dfn>, and <dfn id=no-quirks-mode>no-quirks mode</dfn></li>
<li>The algorithm to <dfn id=concept-node-clone title=concept-node-clone>clone</dfn> a <code><a href=#node>Node</a></code>, and the concept of <dfn id=concept-node-clone-ext title=concept-node-clone-ext>cloning steps</dfn> used by tat algorithm</li>

</ul><p>The following <code><a href=#domexception>DOMException</a></code> codes are defined in
the DOM Core specification: <a href=#refsDOMCORE>[DOMCORE]</a></p>
Expand Down Expand Up @@ -15384,9 +15378,9 @@ c-end = "--&gt;"</pre>
<p>The first is a flag indicating whether or not the script block
has been <dfn id=already-started>"already started"</dfn>. Initially,
<code><a href=#the-script-element>script</a></code> elements must have this flag unset (script
blocks, when created, are not "already started"). When a
<code><a href=#the-script-element>script</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the "already started" flag, if
set, must be propagated to the clone when it is created.</p>
blocks, when created, are not "already started"). The <a href=#concept-node-clone-ext title=concept-node-clone-ext>cloning steps</a> for
<code><a href=#the-script-element>script</a></code> elements must set the "already started" flag on
the copy if it is set on the element being cloned.</p>

<p>The second is a flag indicating whether the element was
<dfn id=parser-inserted>"parser-inserted"</dfn>. Initially, <code><a href=#the-script-element>script</a></code>
Expand Down Expand Up @@ -43677,9 +43671,10 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
some cases (e.g. for the <a href=#date-state title=attr-input-type-date>Date</a> state, but not the <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> state) make an
<code><a href=#the-input-element>input</a></code> element <i title=concept-input-immutable><a href=#concept-input-immutable>immutable</a></i>.</p>

<p>When an <code><a href=#the-input-element>input</a></code> element is <a href=#concept-clone title=concept-clone>cloned</a>, the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<p>The <a href=#concept-node-clone-ext title=concept-node-clone-ext>cloning steps</a> for
<code><a href=#the-input-element>input</a></code> elements must propagate the <a href=#concept-fe-value title=concept-fe-value>value</a>, <a href=#concept-input-value-dirty-flag title=concept-input-value-dirty-flag>dirty value flag</a>,
<a href=#concept-fe-checked title=concept-fe-checked>checkedness</a>, and <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
flag</a> must be propagated to the clone when it is created.</p>
flag</a> from the node being cloned to the copy.</p>

<hr><p>When an <code><a href=#the-input-element>input</a></code> element is first created, the
element's rendering and behavior must be set to the rendering and
Expand Down Expand Up @@ -60620,7 +60615,7 @@ _:n2 &lt;http://www.w3.org/1999/xhtml/microdata#http://microformats.org/profile

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
Expand Down Expand Up @@ -60659,13 +60654,13 @@ _:n2 &lt;http://www.w3.org/1999/xhtml/microdata#http://microformats.org/profile

<ol><li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">subheading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned subheading content</var> be
a new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in
<var title="">subheading content</var> and their descendants
into an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned subheading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -60772,13 +60767,13 @@ _:n2 &lt;http://www.w3.org/1999/xhtml/microdata#http://microformats.org/profile

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> the nodes in <var title="">heading content</var> and their descendants into an
environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
resources. Let <var title="">cloned heading content</var> be a
new <code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting
cloned nodes, preserving their relative order.</p>
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> the nodes in
<var title="">heading content</var> and their descendants into
an environment that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting disabled</a>, has no
<a href=#plugin title=plugin>plugins</a>, and fails any attempt to
<a href=#fetch title=fetch>fetch</a> any resources. Let <var title="">cloned heading content</var> be a new
<code><a href=#documentfragment>DocumentFragment</a></code> containing the resulting cloned
nodes, preserving their relative order.</p>

</li>

Expand Down Expand Up @@ -60808,7 +60803,7 @@ _:n2 &lt;http://www.w3.org/1999/xhtml/microdata#http://microformats.org/profile

<li>

<p><a href=#concept-clone title=concept-clone>Clone</a> <var title="">article</var> and its descendants into an environment
<p><a href=#concept-node-clone title=concept-node-clone>Clone</a> <var title="">article</var> and its descendants into an environment
that has <a href=#concept-bc-noscript title=concept-bc-noscript>scripting
disabled</a>, has no <a href=#plugin title=plugin>plugins</a>, and
fails any attempt to <a href=#fetch title=fetch>fetch</a> any
Expand Down

0 comments on commit 4413d0f

Please sign in to comment.