hixie: Make HTMLDocument === Document. (whatwg r6718)

hixie: Make HTMLDocument === Document. (whatwg r6718)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5385&r2=1.5386&f=h
http://html5.org/tools/web-apps-tracker?from=6717&to=6718

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5385
retrieving revision 1.5386
diff -u -d -r1.5385 -r1.5386
--- Overview.html 20 Oct 2011 22:17:32 -0000 1.5385
+++ Overview.html 20 Oct 2011 23:04:53 -0000 1.5386
@@ -1691,13 +1691,13 @@
   <code><a href="#the-output-element">output</a></code> element to say "Hello World":<pre>&lt;<a href="#the-form-element">form</a> <a href="#attr-form-name" title="attr-form-name">name</a>="main"&gt;
  Result: &lt;<a href="#the-output-element">output</a> <a href="#attr-fe-name" title="attr-fe-name">name</a>="result"&gt;&lt;/output&gt;
  &lt;<a href="#the-script-element">script</a>&gt;
-  <a href="#htmldocument" title="HTMLDocument">document</a>.<a href="#dom-document-forms" title="dom-document-forms">forms</a>.main.<a href="#dom-form-elements" title="dom-form-elements">elements</a>.result.<a href="#dom-output-value" title="dom-output-value">value</a> = 'Hello World';
+  <a href="#document" title="Document">document</a>.<a href="#dom-document-forms" title="dom-document-forms">forms</a>.main.<a href="#dom-form-elements" title="dom-form-elements">elements</a>.result.<a href="#dom-output-value" title="dom-output-value">value</a> = 'Hello World';
  &lt;/script&gt;
 &lt;/form&gt;</pre><p>Each element in the DOM tree is represented by an object, and
   these objects have APIs so that they can be manipulated. For
   instance, a link (e.g. the <code><a href="#the-a-element">a</a></code> element in the tree above)
   can have its "<code title="attr-hyperlink-href"><a href="#attr-hyperlink-href">href</a></code>"
-  attribute changed in several ways:<pre>var a = <a href="#htmldocument" title="HTMLDocument">document</a>.<a href="#dom-document-links" title="dom-document-links">links</a>[0]; // obtain the first link in the document
+  attribute changed in several ways:<pre>var a = <a href="#document" title="Document">document</a>.<a href="#dom-document-links" title="dom-document-links">links</a>[0]; // obtain the first link in the document
 a.<a href="#dom-a-href" title="dom-a-href">href</a> = 'sample.html'; // change the destination URL of the link
 a.<a href="#dom-uda-protocol" title="dom-uda-protocol">protocol</a> = 'https'; // change just the scheme part of the URL
 a.setAttribute('href', 'http://example.com/'); // change the content attribute directly</pre><p>Since DOM trees are used as the way to represent HTML documents
@@ -7674,20 +7674,10 @@
    <a href="#reload-override-flag">reload override flag</a> and set its <a href="#reload-override-buffer">reload override
    buffer</a> to <var title="">source</var>.</li>
 
-  </ol><h4 id="documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</h4><p>All <code><a href="#document">Document</a></code> objects (in user agents implementing
-  this specification) <span class="impl">must</span> also implement
-  the <code><a href="#htmldocument">HTMLDocument</a></code> interface, available using
-  binding-specific methods. (This is the case whether or not the
-  document in question is an <a href="#html-documents" title="HTML documents">HTML
-  document</a> or indeed whether it contains any <a href="#html-elements">HTML
-  elements</a> at all.) <code><a href="#document">Document</a></code> objects <span class="impl">must</span> also implement the document-level interface
-  of any other namespaces that the UA supports.<p class="example">For example, if an HTML implementation also
-  supports SVG, then the <code><a href="#document">Document</a></code> object implements both
-  <code><a href="#htmldocument">HTMLDocument</a></code> and <code>SVGDocument</code>.<p class="note">Because the <code><a href="#htmldocument">HTMLDocument</a></code> interface is
-  now obtained using binding-specific casting methods instead of
-  simply being the primary interface of the document object, it is no
-  longer defined as inheriting from <code><a href="#document">Document</a></code>.<pre class="idl">[OverrideBuiltins]
-interface <dfn id="htmldocument">HTMLDocument</dfn> {
+  </ol><h4 id="documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</h4><pre class="idl">[OverrideBuiltins]
+partial interface <a href="#document">Document</a> {
+  readonly attribute <code><a href="#document">Document</a></code> <a href="#htmldocument" title="HTMLDocument">HTMLDocument</a>;
+
   // <a href="#resource-metadata-management">resource metadata management</a>
   [PutForwards=<a href="#dom-location-href" title="dom-location-href">href</a>] readonly attribute <a href="#location">Location</a>? <a href="#dom-document-location" title="dom-document-location">location</a>;
   readonly attribute DOMString <a href="#dom-document-url" title="dom-document-URL">URL</a>;
@@ -7712,7 +7702,7 @@
   NodeList <a href="#dom-document-getelementsbyname" title="dom-document-getElementsByName">getElementsByName</a>(DOMString elementName);
 
   // <a href="#dynamic-markup-insertion">dynamic markup insertion</a>
-  <a href="#htmldocument">HTMLDocument</a> <a href="#dom-document-open" title="dom-document-open">open</a>(optional DOMString type, optional DOMString replace);
+  <a href="#document">Document</a> <a href="#dom-document-open" title="dom-document-open">open</a>(optional DOMString type, optional DOMString replace);
   <a href="#windowproxy">WindowProxy</a> <a href="#dom-document-open" title="dom-document-open">open</a>(DOMString url, DOMString name, DOMString features, optional boolean replace);
   void <a href="#dom-document-close" title="dom-document-close">close</a>();
   void <a href="#dom-document-write" title="dom-document-write">write</a>(DOMString... text);
@@ -7790,10 +7780,8 @@
 
   // special <a href="#event-handler-idl-attributes">event handler IDL attributes</a> that only apply to Document objects
   [TreatNonCallableAsNull] attribute <a href="#function">Function</a>? <a href="#handler-onreadystatechange" title="handler-onreadystatechange">onreadystatechange</a>;
-};
-<a href="#document">Document</a> implements <a href="#htmldocument">HTMLDocument</a>;</pre><p>Since the <code><a href="#htmldocument">HTMLDocument</a></code> interface holds methods and
-  attributes related to a number of disparate features, the members of
-  this interface are described in various different sections.<h4 id="security-document"><span class="secno">3.1.2 </span>Security</h4><p id="security">User agents <span class="impl">must</span> throw a
+};</pre><p>The <dfn id="htmldocument"><code>HTMLDocument</code></dfn> IDL attribute must
+  return the <code><a href="#document">Document</a></code> object on which it is called.<h4 id="security-document"><span class="secno">3.1.2 </span>Security</h4><p id="security">User agents <span class="impl">must</span> throw a
   <code><a href="#securityerror">SecurityError</a></code> exception whenever any properties of a
   <code><a href="#document">Document</a></code> object are accessed by scripts whose
   <a href="#effective-script-origin">effective script origin</a> is not the <a href="#same-origin" title="same
@@ -8033,8 +8021,9 @@
   <ol><li><p>If the <a href="#root-element">root element</a> is an <code><a href="#svg">svg</a></code>
    element in the "<code title="">http://www.w3.org/2000/svg</code>"
    namespace, and the user agent supports SVG, then the setter must
-   defer to the setter for the IDL attribute of the same name on the
-   <code>SVGDocument</code> interface. Stop the algorithm here. <a href="#refsSVG">[SVG]</a></li>
+   act as if it was the setter for the IDL attribute of the same name
+   on the <code><a href="#document">Document</a></code> interface defined by the SVG
+   specification. Stop the algorithm here. <a href="#refsSVG">[SVG]</a></li>
 
    <li>If <a href="#the-title-element-0">the <code>title</code> element</a> is null and
    <a href="#the-head-element-0">the <code>head</code> element</a> is null, then the
@@ -8051,10 +8040,10 @@
    <li>A single <code><a href="#text">Text</a></code> node whose data is the new value
    being assigned must be appended to <var title="">element</var>.</li>
 
-  </ol><p>The <code title="dom-document-title"><a href="#document.title">title</a></code> attribute on
-  the <code><a href="#htmldocument">HTMLDocument</a></code> interface should shadow the attribute
-  of the same name on the <code>SVGDocument</code> interface when the
-  user agent supports both HTML and SVG. <a href="#refsSVG">[SVG]</a></p>
+  </ol><p>The <code title="dom-document-title"><a href="#document.title">title</a></code> IDL attribute
+  defined above must replace the attribute of the same name on the
+  <code><a href="#document">Document</a></code> interface defined by the SVG specification
+  when the user agent supports both HTML and SVG. <a href="#refsSVG">[SVG]</a></p>
 
   </div><hr><dl class="domintro"><dt><var title="">document</var> . <code title="dom-document-body"><a href="#dom-document-body">body</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
@@ -8174,7 +8163,7 @@
 
   </div><div class="impl">
 
-  <hr><p>The <code><a href="#htmldocument">HTMLDocument</a></code> interface <span title="support
+  <hr><p>The <code><a href="#document">Document</a></code> interface <span title="support
   named properties">supports named properties</span>. The
   <a href="#supported-property-names">supported property names</a> at any moment consist of the
   values of the <code title="attr-name">name</code> content attributes
@@ -8195,7 +8184,7 @@
   elements in the <code><a href="#document">Document</a></code> that have both <code title="attr-name">name</code> content attributes and <code title="attr-id"><a href="#the-id-attribute">id</a></code> content attributes.</p>
 
   <p>To <a href="#determine-the-value-of-a-named-property">determine the value of a named property</a> <var title="">name</var> when <dfn id="dom-document-nameditem" title="dom-document-namedItem">the
-  <code>HTMLDocument</code> object is indexed for property
+  <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using
   the following steps:</p>
 
@@ -8255,7 +8244,7 @@
   or has no <code><a href="#the-object-element">object</a></code> or <code><a href="#the-embed-element">embed</a></code> descendants.</p>
 
   </div><hr><p class="note">The <code title="dom-document-dir"><a href="#dom-document-dir">dir</a></code>
-  attribute on the <code><a href="#htmldocument">HTMLDocument</a></code> interface is defined
+  attribute on the <code><a href="#document">Document</a></code> interface is defined
   along with the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> content
   attribute.<div class="impl"> 
 
@@ -8973,7 +8962,7 @@
   <a href="#limited-to-only-known-values">limited to only known values</a>.</p>
 
   <p>The <dfn id="dom-document-dir" title="dom-document-dir"><code>dir</code></dfn> IDL
-  attribute on <code><a href="#htmldocument">HTMLDocument</a></code> objects must
+  attribute on <code><a href="#document">Document</a></code> objects must
   <a href="#reflect">reflect</a> the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> content
   attribute of <a href="#the-html-element-0">the <code>html</code> element</a>, if any,
   <a href="#limited-to-only-known-values">limited to only known values</a>. If there is no such
@@ -10753,10 +10742,10 @@
   tasks</a> or <a href="#completely-loaded">completely loaded</a>.</p>
 
   <p>When called with three or more arguments, the <code title="dom-document-open"><a href="#dom-document-open">open()</a></code> method on the
-  <code><a href="#htmldocument">HTMLDocument</a></code> object must call the <code title="dom-open"><a href="#dom-open">open()</a></code> method on the <code><a href="#window">Window</a></code>
-  object of the <code><a href="#htmldocument">HTMLDocument</a></code> object, with the same
+  <code><a href="#document">Document</a></code> object must call the <code title="dom-open"><a href="#dom-open">open()</a></code> method on the <code><a href="#window">Window</a></code>
+  object of the <code><a href="#document">Document</a></code> object, with the same
   arguments as the original call to the <code title="dom-document-open"><a href="#dom-document-open">open()</a></code> method, and return whatever
-  that method returned. If the <code><a href="#htmldocument">HTMLDocument</a></code> object has no
+  that method returned. If the <code><a href="#document">Document</a></code> object has no
   <code><a href="#window">Window</a></code> object, then the method must throw an
   <code><a href="#invalidaccesserror">InvalidAccessError</a></code> exception.</p>
 
@@ -41725,7 +41714,7 @@
   </dl><div class="impl">
 
   <p>The <dfn id="dom-document-commands" title="dom-document-commands"><code>commands</code></dfn> attribute
-  of the document's <code><a href="#htmldocument">HTMLDocument</a></code> interface must return an
+  of the document's <code><a href="#document">Document</a></code> interface must return an
   <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at the <code><a href="#document">Document</a></code>
   node, whose filter matches only elements that <a href="#concept-command" title="concept-command">define commands</a> and have <a href="#command-facet-id" title="command-facet-ID">IDs</a>.</p>
 
@@ -44473,7 +44462,7 @@
   context</a>'s <a href="#active-document">active document</a>.</p>
 
   <p>The <dfn id="dom-document-defaultview" title="dom-document-defaultView"><code>defaultView</code></dfn> IDL
-  attribute of the <code><a href="#htmldocument">HTMLDocument</a></code> interface must return the
+  attribute of the <code><a href="#document">Document</a></code> interface must return the
   <code><a href="#document">Document</a></code>'s <a href="#browsing-context">browsing context</a>'s
   <code><a href="#windowproxy">WindowProxy</a></code> object, if there is one, or null
   otherwise.</p>
@@ -46089,7 +46078,7 @@
   </dl><div class="impl">
 
   <p>The <dfn id="dom-document-location" title="dom-document-location"><code>location</code></dfn> attribute
-  of the <code><a href="#htmldocument">HTMLDocument</a></code> interface must return the
+  of the <code><a href="#document">Document</a></code> interface must return the
   <code><a href="#location">Location</a></code> object for that <code><a href="#document">Document</a></code> object,
   if it is in a <a href="#browsing-context">browsing context</a>, and null otherwise.</p>
 
@@ -53046,13 +53035,13 @@
   </dl><div class="impl">
 
   <p>The <dfn id="dom-document-activeelement" title="dom-document-activeElement"><code>activeElement</code></dfn>
-  attribute on <code><a href="#htmldocument">HTMLDocument</a></code> objects must return the
+  attribute on <code><a href="#document">Document</a></code> objects must return the
   element in the document that is focused. If no element in the
   <code><a href="#document">Document</a></code> is focused, this must return <a href="#the-body-element-0">the body
   element</a>.</p>
 
   <p>The <dfn id="dom-document-hasfocus" title="dom-document-hasFocus"><code>hasFocus()</code></dfn> method
-  on <code><a href="#htmldocument">HTMLDocument</a></code> objects must return true if the
+  on <code><a href="#document">Document</a></code> objects must return true if the
   <code><a href="#document">Document</a></code>'s <a href="#browsing-context">browsing context</a> is focused,
   and all its <a href="#ancestor-browsing-context" title="ancestor browsing context">ancestor
   browsing contexts</a> are also focused, and the <a href="#top-level-browsing-context">top-level
@@ -69129,7 +69118,7 @@
   <code><a href="#multicol">multicol</a></code>, <code><a href="#nextid">nextid</a></code>, <code><a href="#rb">rb</a></code>, and
   <code><a href="#spacer">spacer</a></code> elements must use the
   <code><a href="#htmlunknownelement">HTMLUnknownElement</a></code> interface.</p> 
-  <hr><pre class="idl">partial interface <a href="#htmldocument">HTMLDocument</a> {
+  <hr><pre class="idl">partial interface <a href="#document">Document</a> {
   [TreatNullAs=EmptyString] attribute DOMString <a href="#dom-document-fgcolor" title="dom-document-fgColor">fgColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href="#dom-document-linkcolor" title="dom-document-linkColor">linkColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href="#dom-document-vlinkcolor" title="dom-document-vlinkColor">vlinkColor</a>;

Received on Thursday, 20 October 2011 23:05:37 UTC