Skip to content

Commit

Permalink
[giow] (0) Talk about parsing tasks.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8825

git-svn-id: http://svn.whatwg.org/webapps@4710 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 14, 2010
1 parent 18ee77b commit d16d015
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 41 deletions.
41 changes: 28 additions & 13 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -54223,11 +54223,16 @@ <h4 id=navigating-across-documents><span class=secno>6.5.1 </span>Navigating acr
<h4 id=read-html><span class=secno>6.5.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>

<p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent must <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, and begin to use the
bytes provided for the document as the <a href=#the-input-stream>input stream</a> for
that parser.</p>
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>

<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 All @@ -54237,7 +54242,8 @@ <h4 id=read-html><span class=secno>6.5.2 </span><dfn title=navigate-html>Page lo
<!-- next two paragraphs are nearly identical to the navigate-text
section, keep them in sync -->

<p>When no more bytes are available, an EOF character is implied,
<p>When no more bytes are available, the user agent must <a href=#queue-a-task>queue
a task</a> for the parser to process the implied EOF character,
which eventually causes a <code title=event-load>load</code> event
to be fired.</p>

Expand All @@ -54250,6 +54256,8 @@ <h4 id=read-html><span class=secno>6.5.2 </span><dfn title=navigate-html>Page lo
cache selection</a> happens <a href=#parser-appcache>in the
HTML parser</a>.</p>

<p>The <a href=#task-source>task source</a> for the two tasks mentioned in this
section must be the <a href=#networking-task-source>networking task source</a>.</p>



Expand Down Expand Up @@ -54312,15 +54320,19 @@ <h4 id=read-xml><span class=secno>6.5.3 </span><dfn title=navigate-xml>Page load
<h4 id=read-text><span class=secno>6.5.4 </span><dfn title=navigate-text>Page load processing model for text files</dfn></h4>

<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=#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"
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-->, switch the <a href=#html-parser>HTML parser</a>'s tokenizer to
the <a href=#plaintext-state>PLAINTEXT state</a>, and begin to pass the stream of
characters in the plain text document to that tokenizer.</p>
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 are defined in RFC 2046, RFC 2646, and
Expand Down Expand Up @@ -54351,6 +54363,9 @@ <h4 id=read-text><span class=secno>6.5.4 </span><dfn title=navigate-text>Page lo
binding, providing script, giving the document a <code><a href=#the-title-element-0>title</a></code>,
etc.</p>

<p>The <a href=#task-source>task source</a> for the two tasks mentioned in this
section must be the <a href=#networking-task-source>networking task source</a>.</p>


<h4 id=read-image><span class=secno>6.5.5 </span><dfn title=navigate-image>Page load processing model for images</dfn></h4>

Expand Down
41 changes: 28 additions & 13 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -54122,11 +54122,16 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<h4 id=read-html><span class=secno>6.5.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>

<p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
context</a>, the user agent must <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, and begin to use the
bytes provided for the document as the <a href=#the-input-stream>input stream</a> for
that parser.</p>
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>

<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 All @@ -54136,7 +54141,8 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<!-- next two paragraphs are nearly identical to the navigate-text
section, keep them in sync -->

<p>When no more bytes are available, an EOF character is implied,
<p>When no more bytes are available, the user agent must <a href=#queue-a-task>queue
a task</a> for the parser to process the implied EOF character,
which eventually causes a <code title=event-load>load</code> event
to be fired.</p>

Expand All @@ -54149,6 +54155,8 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
cache selection</a> happens <a href=#parser-appcache>in the
HTML parser</a>.</p>

<p>The <a href=#task-source>task source</a> for the two tasks mentioned in this
section must be the <a href=#networking-task-source>networking task source</a>.</p>



Expand Down Expand Up @@ -54211,15 +54219,19 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<h4 id=read-text><span class=secno>6.5.4 </span><dfn title=navigate-text>Page load processing model for text files</dfn></h4>

<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=#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"
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-->, switch the <a href=#html-parser>HTML parser</a>'s tokenizer to
the <a href=#plaintext-state>PLAINTEXT state</a>, and begin to pass the stream of
characters in the plain text document to that tokenizer.</p>
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 are defined in RFC 2046, RFC 2646, and
Expand Down Expand Up @@ -54250,6 +54262,9 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
binding, providing script, giving the document a <code><a href=#the-title-element-0>title</a></code>,
etc.</p>

<p>The <a href=#task-source>task source</a> for the two tasks mentioned in this
section must be the <a href=#networking-task-source>networking task source</a>.</p>


<h4 id=read-image><span class=secno>6.5.5 </span><dfn title=navigate-image>Page load processing model for images</dfn></h4>

Expand Down
45 changes: 30 additions & 15 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -61097,12 +61097,16 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<h4 id="read-html"><dfn title="navigate-html">Page load processing model for HTML files</dfn></h4>

<p>When an HTML document is to be loaded in a <span>browsing
context</span>, the user agent must <span>create a
<code>Document</code> object</span>, mark it as being an <span
title="HTML documents">HTML document</span>, create an <span>HTML
parser</span>, associate it with the document, and begin to use the
bytes provided for the document as the <span>input stream</span> for
that parser.</p>
context</span>, the user agent must <span>queue a task</span> to
<span>create a <code>Document</code> object</span>, mark it as being
an <span title="HTML documents">HTML document</span>, create an
<span>HTML parser</span>, and associate it with the document. Each
<span title="concept-task">task</span> that the <span>networking
task source</span> places on the <span>task queue</span> while the
<span title="fetch">fetching algorithm</span> runs must then fill
the parser's <span>input stream</span> with the fetched bytes and
cause the <span>HTML parser</span> to perform the appropriate
processing of the input stream.</p>

<p class="note">The <span>input stream</span> converts bytes into
characters for use in the <span
Expand All @@ -61114,7 +61118,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<!-- next two paragraphs are nearly identical to the navigate-text
section, keep them in sync -->

<p>When no more bytes are available, an EOF character is implied,
<p>When no more bytes are available, the user agent must <span>queue
a task</span> for the parser to process the implied EOF character,
which eventually causes a <code title="event-load">load</code> event
to be fired.</p>

Expand All @@ -61127,6 +61132,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
cache selection</span> happens <a href="#parser-appcache">in the
HTML parser</a>.</p>

<p>The <span>task source</span> for the two tasks mentioned in this
section must be the <span>networking task source</span>.</p>



Expand Down Expand Up @@ -61200,16 +61207,21 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<h4 id="read-text"><dfn title="navigate-text">Page load processing model for text files</dfn></h4>

<p>When a plain text document is to be loaded in a <span>browsing
context</span>, the user agent should <span>create a
<code>Document</code> object</span>, mark it as being an <span
title="HTML documents">HTML document</span>, create an <span>HTML
parser</span>, associate it with the document, act as if the
tokenizer had emitted a start tag token with the tag name "pre"
context</span>, the user agent should <span>queue a task</span> to
<span>create a <code>Document</code> object</span>, mark it as being
an <span title="HTML documents">HTML document</span>, create an
<span>HTML parser</span>, 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-->, switch the <span>HTML parser</span>'s tokenizer to
the <span>PLAINTEXT state</span>, and begin to pass the stream of
characters in the plain text document to that tokenizer.</p>
eaten itself-->, and switch the <span>HTML parser</span>'s tokenizer
to the <span>PLAINTEXT state</span>. Each <span
title="concept-task">task</span> that the <span>networking task
source</span> places on the <span>task queue</span> while the <span
title="fetch">fetching algorithm</span> runs must then fill the
parser's <span>input stream</span> with the fetched bytes and cause
the <span>HTML parser</span> 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 are defined in RFC 2046, RFC 2646, and
Expand Down Expand Up @@ -61242,6 +61254,9 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
binding, providing script, giving the document a <code>title</code>,
etc.</p>

<p>The <span>task source</span> for the two tasks mentioned in this
section must be the <span>networking task source</span>.</p>


<h4 id="read-image"><dfn title="navigate-image">Page load processing model for images</dfn></h4>

Expand Down

0 comments on commit d16d015

Please sign in to comment.