Skip to content
Permalink
Browse files

Move 'HTTPS state' from Window to Document

Based on the discussion in #273, it looks like the right thing
to do with 'HTTPS state' is to keep Worker state on the Worker object, but
to move a Document's state from the Window to the Document. This patch does
just that.
  • Loading branch information...
mikewest committed Nov 5, 2015
1 parent 479dfbf commit 68390cea99f9f19881a16e1c8adaf1b130b4d1cc
Showing with 13 additions and 20 deletions.
  1. +13 −20 source
33 source
@@ -8143,9 +8143,8 @@ interface <dfn>DOMStringMap</dfn> {
<li><p>Let <var>address</var> be the <span>browsing context</span>'s <span>active
document</span>'s <span data-x="the document's address">address</span>.</p></li>

<li><p>Let <var>HTTPS state</var> be the <span data-x="concept-window-https-state">HTTPS
state</span> of the <span>browsing context</span>'s <span>active document</span>'s
<code>Window</code>.</p></li>
<li><p>Let <var>HTTPS state</var> be the <span data-x="concept-document-https-state">HTTPS
state</span> of the <span>browsing context</span>'s <span>active document</span>.</p></li>

<li><p>Let <var>CSP list</var> be the <span data-x="concept-document-csp-list">CSP list</span>
of the <span>browsing context</span>'s <span>active document</span>.</p></li>
@@ -8230,6 +8229,12 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
};
<span>Document</span> implements <span>GlobalEventHandlers</span>;</pre>

<p>The <code>Document</code> has an <dfn data-x="concept-document-https-state">HTTPS state</dfn>,
which represents the security properties of the network channel used to deliver the
<code>Document</code>'s data. The value will be one of "<code data-x="">modern</code>", "<code
data-x="">deprecated</code>", or "<code data-x="">none</code>". If it is not explicitly set, then
its value is "<code data-x="">none</code>".</p>

<p>The <code>Document</code> has a <dfn data-x="concept-document-csp-list">CSP list</dfn>, which is a
list of <span>Content Security Policy</span> objects active in this context. The list is empty
unless otherwise specified.</p>
@@ -26472,8 +26477,8 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
data-x="concept-response-csp-list">CSP list</span> is the <span
data-x="concept-document-csp-list">CSP list</span> of the <code>iframe</code> element's <span>node
document</span>, and <span data-x="concept-response-https-state">HTTPS state</span> is the <span
data-x="concept-window-https-state">HTTPS state</span> of the <code>iframe</code> element's
<span>node document</span>'s <code>Window</code>.
data-x="concept-document-https-state">HTTPS state</span> of the <code>iframe</code> element's
<span>node document</span>.

<p>The resulting <code>Document</code> must be considered <span>an <code>iframe</code> <code
data-x="attr-iframe-srcdoc">srcdoc</code> document</span>.</p>
@@ -78551,13 +78556,6 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<div w-nodev>

<p>The <code>Window</code> has an <dfn data-x="concept-window-https-state">HTTPS state</dfn>,
which represents the security properties of the network channel used to deliver the
<code>Document</code> with which the <code>Window</code> is associated. The value will be one of
"<code data-x="">modern</code>", "<code data-x="">deprecated</code>", or "<code
data-x="">none</code>". If it is not explicitly set, then its value is "<code
data-x="">none</code>".</p>

<p>The <dfn><code data-x="dom-window">window</code></dfn>, <dfn><code data-x="dom-frames">frames</code></dfn>, and <dfn><code data-x="dom-self">self</code></dfn>
IDL attributes must all return the <code>Window</code> object's <span>browsing context</span>'s
<code>WindowProxy</code> object.</p>
@@ -82118,7 +82116,7 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<code>Document</code> instead, and change the <code data-x="dom-document">document</code>
attribute of the <code>Window</code> object to point to the new <code>Document</code>.</p>

<li><p>Set the <code>Window</code> object's <span data-x="concept-window-https-state">HTTPS
<li><p>Set the <code>Document</code>'s <span data-x="concept-document-https-state">HTTPS
state</span> to the <span data-x="concept-response-https-state">HTTPS state</span> of the
resource used to generate the document.</p></li>

@@ -86065,8 +86063,8 @@ interface <dfn>NavigatorOnLine</dfn> {
<dt>The <span>HTTPS state</span></dt>
<dd>

<p>Return the <span data-x="concept-window-https-state">HTTPS state</span> of the
<code>Window</code> object.</p>
<p>Return the <span data-x="concept-document-https-state">HTTPS state</span> of the
<code>Document</code> with which the <code>Window</code> is currently associated.</p>

</dd>

@@ -88154,11 +88152,6 @@ interface <dfn>WindowBase64</dfn> {

</li>

<li><p>Set the new <code>Window</code> object's <span data-x="concept-window-https-state">HTTPS
state</span> to the <span data-x="concept-window-https-state">HTTPS state</span> of the
<code>Window</code> object of the <a>responsible document</a> specified by the <span>entry
settings object</span>.</p></li>

<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->

0 comments on commit 68390ce

Please sign in to comment.
You can’t perform that action at this time.