[html5] r7544 - [giow] (3) More detail on the inheritance of encodings from parent browsing cont [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Nov 24 21:33:44 PST 2012


Author: ianh
Date: 2012-11-24 21:33:43 -0800 (Sat, 24 Nov 2012)
New Revision: 7544

Modified:
   complete.html
   index
   source
Log:
[giow] (3) More detail on the inheritance of encodings from parent browsing contexts.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18474
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2012-11-25 05:16:39 UTC (rev 7543)
+++ complete.html	2012-11-25 05:33:43 UTC (rev 7544)
@@ -87095,13 +87095,33 @@
 
    </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
    it was last visited, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>

Modified: index
===================================================================
--- index	2012-11-25 05:16:39 UTC (rev 7543)
+++ index	2012-11-25 05:33:43 UTC (rev 7544)
@@ -87095,13 +87095,33 @@
 
    </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
    it was last visited, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>

Modified: source
===================================================================
--- source	2012-11-25 05:16:39 UTC (rev 7543)
+++ source	2012-11-25 05:33:43 UTC (rev 7544)
@@ -101143,15 +101143,39 @@
 
    </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
    it was last visited, then return that encoding, with the <span




More information about the Commit-Watchers mailing list