Skip to content

Commit

Permalink
[giow] (3) More detail on the inheritance of encodings from parent br…
Browse files Browse the repository at this point in the history
…owsing contexts.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18474
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@7544 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 25, 2012
1 parent 24776b8 commit 008c28b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 20 deletions.
32 changes: 26 additions & 6 deletions complete.html
Expand Up @@ -87095,12 +87095,32 @@ <h5 id=determining-the-character-encoding><span class=secno>12.2.2.1 </span>Dete

</li>

<li><p>Otherwise, if the <code><a href=#document>Document</a></code> is in a <a href=#nested-browsing-context>nested
browsing context</a>, return the encoding of the <a href=#browsing-context-container>browsing
context container</a>'s <code><a href=#document>Document</a></code>'s <a href="#document's-character-encoding" title="document's character encoding">character encoding</a>,
with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
<i>tentative</i>, and abort these steps.</li> <!-- not
carefully tested -->
<li>

<p>If the <a href=#html-parser>HTML parser</a> for which this algorithm is being run is associated with a
<code><a href=#document>Document</a></code> that is itself in a <a href=#nested-browsing-context>nested browsing context</a>, run these
substeps:</p>

<ol><li><p>Let <var title="">new document</var> be the <code><a href=#document>Document</a></code> with which the
<a href=#html-parser>HTML parser</a> is associated.</li>

<li><p>Let <var title="">parent document</var> be the <code><a href=#document>Document</a></code> <a href=#browsing-context-nested-through title="browsing context nested through">through which <var title="">new document</var> is
nested</a> (the <a href=#active-document>active document</a> of the <a href=#parent-browsing-context>parent browsing context</a> of
<var title="">new document</var>).</li>

<li><p>If <var title="">parent document</var>'s <a href=#origin>origin</a> is not the <a href=#same-origin>same
origin</a> as <var title="">new document</var>'s <a href=#origin>origin</a>, then abort these
substeps.</li>

<li><p>If <var title="">parent document</var>'s <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a> is not an <a href=#ascii-compatible-character-encoding>ASCII-compatible character encoding</a>,
then abort these substeps.</li>

<li><p>Return <var title="">parent document</var>'s <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a>, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> <i>tentative</i>, and abort the
<a href=#encoding-sniffing-algorithm>encoding sniffing algorithm</a>'s steps.</li>

</ol></li>

<li><p>Otherwise, if the user agent has information on the likely
encoding for this page, e.g. based on the encoding of the page when
Expand Down
32 changes: 26 additions & 6 deletions index
Expand Up @@ -87095,12 +87095,32 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>

</li>

<li><p>Otherwise, if the <code><a href=#document>Document</a></code> is in a <a href=#nested-browsing-context>nested
browsing context</a>, return the encoding of the <a href=#browsing-context-container>browsing
context container</a>'s <code><a href=#document>Document</a></code>'s <a href="#document's-character-encoding" title="document's character encoding">character encoding</a>,
with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
<i>tentative</i>, and abort these steps.</li> <!-- not
carefully tested -->
<li>

<p>If the <a href=#html-parser>HTML parser</a> for which this algorithm is being run is associated with a
<code><a href=#document>Document</a></code> that is itself in a <a href=#nested-browsing-context>nested browsing context</a>, run these
substeps:</p>

<ol><li><p>Let <var title="">new document</var> be the <code><a href=#document>Document</a></code> with which the
<a href=#html-parser>HTML parser</a> is associated.</li>

<li><p>Let <var title="">parent document</var> be the <code><a href=#document>Document</a></code> <a href=#browsing-context-nested-through title="browsing context nested through">through which <var title="">new document</var> is
nested</a> (the <a href=#active-document>active document</a> of the <a href=#parent-browsing-context>parent browsing context</a> of
<var title="">new document</var>).</li>

<li><p>If <var title="">parent document</var>'s <a href=#origin>origin</a> is not the <a href=#same-origin>same
origin</a> as <var title="">new document</var>'s <a href=#origin>origin</a>, then abort these
substeps.</li>

<li><p>If <var title="">parent document</var>'s <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a> is not an <a href=#ascii-compatible-character-encoding>ASCII-compatible character encoding</a>,
then abort these substeps.</li>

<li><p>Return <var title="">parent document</var>'s <a href="#document's-character-encoding" title="document's character
encoding">character encoding</a>, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> <i>tentative</i>, and abort the
<a href=#encoding-sniffing-algorithm>encoding sniffing algorithm</a>'s steps.</li>

</ol></li>

<li><p>Otherwise, if the user agent has information on the likely
encoding for this page, e.g. based on the encoding of the page when
Expand Down
40 changes: 32 additions & 8 deletions source
Expand Up @@ -101143,14 +101143,38 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {

</li>

<li><p>Otherwise, if the <code>Document</code> is in a <span>nested
browsing context</span>, return the encoding of the <span>browsing
context container</span>'s <code>Document</code>'s <span
title="document's character encoding">character encoding</span>,
with the <span
title="concept-encoding-confidence">confidence</span>
<i>tentative</i>, and abort these steps.</p></li> <!-- not
carefully tested -->
<li>

<p>If the <span>HTML parser</span> for which this algorithm is being run is associated with a
<code>Document</code> that is itself in a <span>nested browsing context</span>, run these
substeps:</p>

<ol>

<li><p>Let <var title="">new document</var> be the <code>Document</code> with which the
<span>HTML parser</span> is associated.</p></li>

<li><p>Let <var title="">parent document</var> be the <code>Document</code> <span
title="browsing context nested through">through which <var title="">new document</var> is
nested</span> (the <span>active document</span> of the <span>parent browsing context</span> of
<var title="">new document</var>).</p></li>

<li><p>If <var title="">parent document</var>'s <span>origin</span> is not the <span>same
origin</span> as <var title="">new document</var>'s <span>origin</span>, then abort these
substeps.</p></li>

<li><p>If <var title="">parent document</var>'s <span title="document's character
encoding">character encoding</span> is not an <span>ASCII-compatible character encoding</span>,
then abort these substeps.</p></li>

<li><p>Return <var title="">parent document</var>'s <span title="document's character
encoding">character encoding</span>, with the <span
title="concept-encoding-confidence">confidence</span> <i>tentative</i>, and abort the
<span>encoding sniffing algorithm</span>'s steps.</p></li>

</ol>

</li>

<li><p>Otherwise, if the user agent has information on the likely
encoding for this page, e.g. based on the encoding of the page when
Expand Down

0 comments on commit 008c28b

Please sign in to comment.