Skip to content

Commit

Permalink
[giow] (0) DOM Core compatibility (Document.contentType values)
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13138

git-svn-id: http://svn.whatwg.org/webapps@6515 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 19, 2011
1 parent 67e411f commit ea0bd1a
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 118 deletions.
81 changes: 43 additions & 38 deletions complete.html
Expand Up @@ -3792,7 +3792,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>

<li><dfn id=dom-event-target title=dom-Event-target><code>target</code></dfn> attribute</li>

<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 <dfn id="document's-character-encoding" title="document's character encoding">character encoding</dfn> and <span title=concept-document-media-type>media type</span> 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>
Expand Down Expand Up @@ -64804,14 +64804,12 @@ <h4 id=read-html><span class=secno>6.5.2 </span><dfn title=navigate-html>Page lo
<p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent must <a href=#queue-a-task>queue a task</a> to
<a href=#create-a-document-object>create a <code>Document</code> object</a>, mark it as being
an <a href=#html-documents title="HTML documents">HTML document</a>, create an
<a href=#html-parser>HTML parser</a>, and associate it with the document. Each
<a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking
task source</a> places on the <a href=#task-queue>task queue</a> while the
<a href=#fetch title=fetch>fetching algorithm</a> runs must then fill
the parser's <a href=#the-input-stream>input stream</a> with the fetched bytes and
cause the <a href=#html-parser>HTML parser</a> to perform the appropriate
processing of the input stream.</p>
an <a href=#html-documents title="HTML documents">HTML document</a>, set its <span title=concept-document-media-type>media type</span> to "<code title="">text/html</code>", create an <a href=#html-parser>HTML parser</a>, and
associate it with the document. Each <a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking task
source</a> places on the <a href=#task-queue>task queue</a> while the <a href=#fetch title=fetch>fetching algorithm</a> runs must then fill the
parser's <a href=#the-input-stream>input stream</a> with the fetched bytes and cause
the <a href=#html-parser>HTML parser</a> to perform the appropriate processing
of the input stream.</p>

<p class=note>The <a href=#the-input-stream>input stream</a> converts bytes into
characters for use in the <a href=#tokenization title=tokenization>tokenizer</a>. This process relies, in part,
Expand Down Expand Up @@ -64845,7 +64843,7 @@ <h4 id=read-xml><span class=secno>6.5.3 </span><dfn title=navigate-xml>Page load
<p>When faced with displaying an XML file inline, user agents must
first <a href=#create-a-document-object>create a <code>Document</code> object</a>, following
the requirements of the XML and Namespaces in XML recommendations,
RFC 3023, DOM3 Core, and other relevant specifications. <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsRFC3023>[RFC3023]</a> <a href=#refsDOMCORE>[DOMCORE]</a></p>
RFC 3023, DOM Core, and other relevant specifications. <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsRFC3023>[RFC3023]</a> <a href=#refsDOMCORE>[DOMCORE]</a></p>

<p>The actual HTTP headers and other metadata, not the headers as
mutated or implied by the algorithms given in this specification,
Expand Down Expand Up @@ -64904,17 +64902,18 @@ <h4 id=read-text><span class=secno>6.5.4 </span><dfn title=navigate-text>Page lo
<p>When a plain text document is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent should <a href=#queue-a-task>queue a task</a> to
<a href=#create-a-document-object>create a <code>Document</code> object</a>, mark it as being
an <a href=#html-documents title="HTML documents">HTML document</a>, create an
<a href=#html-parser>HTML parser</a>, associate it with the document, act as if
the tokenizer had emitted a start tag token with the tag name "pre"
followed by a single U+000A LINE FEED (LF) character<!-- to get
eaten, so that a leading LF in the text/plain stream doesn't get
eaten itself-->, and switch the <a href=#html-parser>HTML parser</a>'s tokenizer
to the <a href=#plaintext-state>PLAINTEXT state</a>. Each <a href=#concept-task title=concept-task>task</a> that the <a href=#networking-task-source>networking task
source</a> places on the <a href=#task-queue>task queue</a> while the <a href=#fetch title=fetch>fetching algorithm</a> runs must then fill the
parser's <a href=#the-input-stream>input stream</a> with the fetched bytes and cause
the <a href=#html-parser>HTML parser</a> to perform the appropriate processing
of the input stream.</p>
an <a href=#html-documents title="HTML documents">HTML document</a>, set its <span title=concept-document-media-type>media type</span> to "<code title="">text/plain</code>", create an <a href=#html-parser>HTML parser</a>,
associate it with the document, act as if the tokenizer had emitted
a start tag token with the tag name "pre" followed by a single
U+000A LINE FEED (LF) character<!-- to get eaten, so that a leading
LF in the text/plain stream doesn't get eaten itself-->, and switch
the <a href=#html-parser>HTML parser</a>'s tokenizer to the <a href=#plaintext-state>PLAINTEXT
state</a>. Each <a href=#concept-task title=concept-task>task</a> that the
<a href=#networking-task-source>networking task source</a> places on the <a href=#task-queue>task
queue</a> while the <a href=#fetch title=fetch>fetching algorithm</a>
runs must then fill the parser's <a href=#the-input-stream>input stream</a> with the
fetched bytes and cause the <a href=#html-parser>HTML parser</a> to perform the
appropriate processing of the input stream.</p>

<p>The rules for how to convert the bytes of the plain text document
into actual characters, and the rules for actually rendering the
Expand Down Expand Up @@ -64961,12 +64960,14 @@ <h4 id=read-image><span class=secno>6.5.5 </span><dfn title=navigate-image>Page

<p>When an image resource is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent should <a href=#create-a-document-object>create a
<code>Document</code> object</a>, mark it as being an <a href=#html-documents title="HTML documents">HTML document</a>, append an
<code><a href=#the-html-element>html</a></code> element to the <code><a href=#document>Document</a></code>, append a
<code><a href=#the-head-element>head</a></code> element and a <code><a href=#the-body-element>body</a></code> element to the
<code><a href=#the-html-element>html</a></code> element, append an <code><a href=#the-img-element>img</a></code> to the
<code><a href=#the-body-element>body</a></code> element, and set the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute of the <code><a href=#the-img-element>img</a></code>
element to the address of the image.</p>
<code>Document</code> object</a>, mark it as being an <a href=#html-documents title="HTML documents">HTML document</a>, set its <span title=concept-document-media-type>media type</span> to the sniffed
MIME type of the resource (<var title="">type</var> in the
<a href=#navigate>navigate</a> algorithm), append an <code><a href=#the-html-element>html</a></code>
element to the <code><a href=#document>Document</a></code>, append a <code><a href=#the-head-element>head</a></code>
element and a <code><a href=#the-body-element>body</a></code> element to the <code><a href=#the-html-element>html</a></code>
element, append an <code><a href=#the-img-element>img</a></code> to the <code><a href=#the-body-element>body</a></code>
element, and set the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute
of the <code><a href=#the-img-element>img</a></code> element to the address of the image.</p>

<!-- next three paragraphs are similar to the navigate-text section,
keep them in sync -->
Expand Down Expand Up @@ -64994,12 +64995,16 @@ <h4 id=read-plugin><span class=secno>6.5.6 </span><dfn title=navigate-plugin>Pag
<p>When a resource that requires an external resource to be rendered
is to be loaded in a <a href=#browsing-context>browsing context</a>, the user agent
should <a href=#create-a-document-object>create a <code>Document</code> object</a>, mark it
as being an <a href=#html-documents title="HTML documents">HTML document</a>,
append an <code><a href=#the-html-element>html</a></code> element to the <code><a href=#document>Document</a></code>,
append a <code><a href=#the-head-element>head</a></code> element and a <code><a href=#the-body-element>body</a></code> element
to the <code><a href=#the-html-element>html</a></code> element, append an <code><a href=#the-embed-element>embed</a></code> to
the <code><a href=#the-body-element>body</a></code> element, and set the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute of the
<code><a href=#the-embed-element>embed</a></code> element to the address of the resource.</p>
as being an <a href=#html-documents title="HTML documents">HTML document</a>, set
its <span title=concept-document-media-type>media type</span> to
the sniffed MIME type of the resource (<var title="">type</var> in
the <a href=#navigate>navigate</a> algorithm), append an <code><a href=#the-html-element>html</a></code>
element to the <code><a href=#document>Document</a></code>, append a <code><a href=#the-head-element>head</a></code>
element and a <code><a href=#the-body-element>body</a></code> element to the <code><a href=#the-html-element>html</a></code>
element, append an <code><a href=#the-embed-element>embed</a></code> to the <code><a href=#the-body-element>body</a></code>
element, and set the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code>
attribute of the <code><a href=#the-embed-element>embed</a></code> element to the address of the
resource.</p>

<!-- next three paragraphs are similar to the navigate-text section,
keep them in sync -->
Expand Down Expand Up @@ -65031,11 +65036,11 @@ <h4 id=read-ua-inline><span class=secno>6.5.7 </span><dfn title=navigate-ua-inli

<p>When the user agent is to display a user agent page inline in a
<a href=#browsing-context>browsing context</a>, the user agent should <a href=#create-a-document-object>create a
<code>Document</code> object</a>, mark it as being an <a href=#html-documents title="HTML documents">HTML document</a>, and then either
associate that <code><a href=#document>Document</a></code> with a custom rendering that is
not rendered using the normal <code><a href=#document>Document</a></code> rendering rules,
or mutate that <code><a href=#document>Document</a></code> until it represents the content
the user agent wants to render.</p>
<code>Document</code> object</a>, mark it as being an <a href=#html-documents title="HTML documents">HTML document</a>, set its <span title=concept-document-media-type>media type</span> to "<code title="">text/html</code>", and then either associate that
<code><a href=#document>Document</a></code> with a custom rendering that is not rendered
using the normal <code><a href=#document>Document</a></code> rendering rules, or mutate
that <code><a href=#document>Document</a></code> until it represents the content the user
agent wants to render.</p>

<!-- next two paragraphs are similar to the navigate-text section,
keep them in sync -->
Expand Down

0 comments on commit ea0bd1a

Please sign in to comment.