Skip to content

Commit

Permalink
Remove the origin aliasing concept
Browse files Browse the repository at this point in the history
Turns out effective script origins are shared, not aliased.

Fixes #794.
  • Loading branch information
annevk authored and domenic committed Mar 22, 2016
1 parent fafd2e1 commit 438155d
Showing 1 changed file with 50 additions and 81 deletions.
131 changes: 50 additions & 81 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -75963,18 +75963,21 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
origin</span> of <var>document</var>:</p>

<ul>
<li><p>If the new <span>browsing context</span> has a <span>creator browsing context</span>,
then the <span>origin</span> of <var>document</var> is an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the <span>creator
<code>Document</code></span> and the <span>effective script origin</span> of
<var>document</var> is initially an <span data-x="concept-origin-alias">alias</span> to the
<span>effective script origin</span> of the <span>creator
<code>Document</code></span>.</p></li>
<li>
<p>If the new <span>browsing context</span> has a <span>creator browsing context</span>,
then the <span>origin</span> of <var>document</var> is a copy of the <span>origin</span> of
the <span>creator <code>Document</code></span> and the <span>effective script origin</span> of
<var>document</var> is the <span>effective script origin</span> of the <span>creator
<code>Document</code></span>.</p>

<p class="note">The <span>effective script origin</span> is shared and not copied
purposefully.</p>
</li>

<li><p>Otherwise, the <span>origin</span> of <var>document</var> is a globally unique
identifier assigned when the new <span>browsing context</span> is created and the
<span>effective script origin</span> of <var>document</var> is initially an <span
data-x="concept-origin-alias">alias</span> to its <span>origin</span>.</p></li>
<span>effective script origin</span> of <var>document</var> is a copy of its
<span>origin</span>.</p></li>
</ul>
</li>

Expand Down Expand Up @@ -78102,23 +78105,13 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
connections, to ensure that if the site's secure certificate changes, the origin is considered to
change as well.</p>


<dt><dfn data-x="concept-origin-aliases">Aliases</dfn></dt>

<dd>

<p>A reference to another <span>origin</span> or <span>effective script origin</span>.</p>


</dl>

<div w-nodev>
<p class="note">An <span>effective script origin</span> can be shared, e.g., among multiple
<code>Document</code> objects, and can be changed through the <code
data-x="dom-document-domain">document.domain</code> API.</p>

<p>An <span>origin</span> or <span>effective script origin</span> can be defined as an <dfn
data-x="concept-origin-alias">alias</dfn> to another <span>origin</span> or <span>effective script
origin</span>. The value of the <span>origin</span> or <span>effective script origin</span> is
then the value of the <span>origin</span> or <span>effective script origin</span> to which it is
an alias.</p>
<div w-nodev>

<p>These characteristics are defined as follows:</p>

Expand Down Expand Up @@ -78148,9 +78141,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<p>The <span>origin</span> is a globally unique identifier assigned when the
<code>Document</code> is created.</p>

<p>The <span>effective script origin</span> is initially an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
<code>Document</code>.</p>
<p>The <span>effective script origin</span> is initially a copy of the <span>origin</span> of
the <code>Document</code>.</p>

</dd>

Expand All @@ -78160,12 +78152,11 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dd>

<p>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
<span>origin</span> of <span>the <code>Document</code>'s address</span>.</p>
<p>The <span>origin</span> is a copy of the <span title="concept-url-origin">origin</span> of
<span>the <code>Document</code>'s address</span>.</p>

<p>The <span>effective script origin</span> is initially an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
<code>Document</code>.</p>
<p>The <span>effective script origin</span> is initially a copy of the <span>origin</span> of
the <code>Document</code>.</p>

</dd>

Expand All @@ -78176,15 +78167,14 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dd>

<p>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
<span>origin</span> specified by the <span>incumbent settings object</span> when the <span>navigate</span>
algorithm was invoked, or, if no <span data-x="concept-script">script</span> was involved, of
the <span>node document</span> of the element that initiated the <span
data-x="navigate">navigation</span> to that <span>URL</span>.</p>
<p>The <span>origin</span> is a copy of the <span>origin</span> specified by the
<span>incumbent settings object</span> when the <span>navigate</span> algorithm was invoked,
or, if no <span data-x="concept-script">script</span> was involved, of the <span>node
document</span> of the element that initiated the <span data-x="navigate">navigation</span> to
that <span>URL</span>.</p>

<p>The <span>effective script origin</span> is initially an <span
data-x="concept-origin-alias">alias</span> to the <span>effective script origin</span> of that
same <span>environment settings object</span> or <code>Document</code>.</p>
<p>The <span>effective script origin</span> is the <span>effective script origin</span> of
that same <span>environment settings object</span> or <code>Document</code>.</p>

</dd>

Expand All @@ -78205,13 +78195,12 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dd>

<p>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
<span>origin</span> of the <span>active document</span> of the <span>browsing context</span>
being navigated when the <span>navigate</span> algorithm was invoked.</p>
<p>The <span>origin</span> is a copy of the <span>origin</span> of the <span>active
document</span> of the <span>browsing context</span> being navigated when the
<span>navigate</span> algorithm was invoked.</p>

<p>The <span>effective script origin</span> is initially an <span
data-x="concept-origin-alias">alias</span> to the <span>effective script origin</span> of that
same <code>Document</code>.</p>
<p>The <span>effective script origin</span> is the <span>effective script origin</span> of
that same <code>Document</code>.</p>

</dd>

Expand All @@ -78221,13 +78210,11 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dd>

<p>The <span>origin</span> of the <code>Document</code> is an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
<code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>'s
<p>The <span>origin</span> of the <code>Document</code> is a copy of the <span>origin</span>
of the <code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>'s
<span>browsing context container</span>'s <span>node document</span>.</p>

<p>The <span>effective script origin</span> is initially an <span
data-x="concept-origin-alias">alias</span> to the <span>effective script origin</span> of the
<p>The <span>effective script origin</span> is the <span>effective script origin</span> of the
<code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>'s
<span>browsing context container</span>'s <span>node document</span>.</p>

Expand All @@ -78244,9 +78231,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<p>The default behaviour as defined in the WHATWG DOM standard applies. <ref spec=DOM>.</p>

<p class="note">The <span>origin</span> is a globally unique identifier assigned when the
<code>Document</code> is created, and the <span>effective script origin</span> is initially an
<span data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
<code>Document</code>.</p>
<code>Document</code> is created, and the <span>effective script origin</span> is a copy of
the <span>origin</span> of the <code>Document</code>.</p>

</dd>

Expand All @@ -78273,11 +78259,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dt>If the image data is <span>CORS-same-origin</span></dt>

<dd>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
<span>origin</span> of the <code>img</code> element's <span>node document</span>.</dd>

<!-- all image loads go through the "potentially CORS-enabled fetch" algorithm so they're all
either CORS-cross-origin or CORS-same-origin if they succeed at all -->
<dd>The <span>origin</span> is a copy of the <span>origin</span> of the <code>img</code>
element's <span>node document</span>.</dd>

</dl>

Expand All @@ -78300,8 +78283,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dt>If the <span>media data</span> is <span>CORS-same-origin</span></dt>

<dd>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
<span>origin</span> of the <span>media element</span>'s <span>node document</span>.</dd>
<dd>The <span>origin</span> is a copy of the <span>origin</span> of the <span>media
element</span>'s <span>node document</span>.</dd>

</dl>

Expand All @@ -78315,16 +78298,14 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dd>

<p>The <span>origin</span> of a downloadable Web font is an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the <span>absolute
URL</span> used to obtain the font (after any redirects). <ref spec=CSSFONTS>
<ref spec=CSSFONTLOAD></p> <!-- this means you can get data from a remote
site if you can make it redirect to your own site in some fashion controlled by the data you
want to read -->
<p>The <span>origin</span> of a downloadable Web font is a copy of the <span
title="concept-url-origin">origin</span> of the <span>absolute URL</span> used to obtain the
font (after any redirects). <ref spec=CSSFONTS> <ref spec=CSSFONTLOAD></p> <!-- this means you
can get data from a remote site if you can make it redirect to your own site in some fashion
controlled by the data you want to read -->

<p>The <span>origin</span> of a locally installed system font is an <span
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
<code>Document</code> in which that font is being used.</p>
<p>The <span>origin</span> of a locally installed system font is a copy of the
<span>origin</span> of the <code>Document</code> in which that font is being used.</p>

<p>Fonts do not have an <span>effective script origin</span>.</p>

Expand All @@ -78336,14 +78317,6 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
a particular <span>URL</span>, <code>Document</code>, image, <span>media element</span>, or
font.</p>

<!-- e.g.:

<p>The <span>origin</span> of a <code>Document</code> object returned by the
<code>XMLHttpRequest</code> API is an <span data-x="concept-origin-alias">alias</span> to the
<span>XMLHttpRequest origin</span> of the <code>XMLHttpRequest</code> object.</p>

-->

<hr>

<p>The <dfn>Unicode serialisation of an origin</dfn> is the string obtained by applying the
Expand Down Expand Up @@ -78520,10 +78493,6 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<li><p>Set this <code>Document</code> object's <span data-x="the document's domain">domain</span>
to <var>host</var>.</p></li>

<li><p>If the <span>effective script origin</span> of this <code>Document</code> is an <span
data-x="concept-origin-alias">alias</span>, set it to the value of the <span>effective script
origin</span> (essentially de-aliasing the <span>effective script origin</span>).</p></li>

<li><p>Set the host component of the <span>effective script origin</span> tuple of this
<code>Document</code> to <var>host</var>.</p>

Expand Down

0 comments on commit 438155d

Please sign in to comment.