Skip to content

Commit 438155d

Browse files
annevkdomenic
authored andcommitted
Remove the origin aliasing concept
Turns out effective script origins are shared, not aliased. Fixes #794.
1 parent fafd2e1 commit 438155d

File tree

1 file changed

+50
-81
lines changed

1 file changed

+50
-81
lines changed

source

Lines changed: 50 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -75963,18 +75963,21 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
7596375963
origin</span> of <var>document</var>:</p>
7596475964

7596575965
<ul>
75966-
<li><p>If the new <span>browsing context</span> has a <span>creator browsing context</span>,
75967-
then the <span>origin</span> of <var>document</var> is an <span
75968-
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the <span>creator
75969-
<code>Document</code></span> and the <span>effective script origin</span> of
75970-
<var>document</var> is initially an <span data-x="concept-origin-alias">alias</span> to the
75971-
<span>effective script origin</span> of the <span>creator
75972-
<code>Document</code></span>.</p></li>
75966+
<li>
75967+
<p>If the new <span>browsing context</span> has a <span>creator browsing context</span>,
75968+
then the <span>origin</span> of <var>document</var> is a copy of the <span>origin</span> of
75969+
the <span>creator <code>Document</code></span> and the <span>effective script origin</span> of
75970+
<var>document</var> is the <span>effective script origin</span> of the <span>creator
75971+
<code>Document</code></span>.</p>
75972+
75973+
<p class="note">The <span>effective script origin</span> is shared and not copied
75974+
purposefully.</p>
75975+
</li>
7597375976

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

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

78105-
78106-
<dt><dfn data-x="concept-origin-aliases">Aliases</dfn></dt>
78107-
78108-
<dd>
78109-
78110-
<p>A reference to another <span>origin</span> or <span>effective script origin</span>.</p>
78111-
78112-
7811378108
</dl>
7811478109

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

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

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

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

78151-
<p>The <span>effective script origin</span> is initially an <span
78152-
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
78153-
<code>Document</code>.</p>
78144+
<p>The <span>effective script origin</span> is initially a copy of the <span>origin</span> of
78145+
the <code>Document</code>.</p>
7815478146

7815578147
</dd>
7815678148

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

7816178153
<dd>
7816278154

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

78166-
<p>The <span>effective script origin</span> is initially an <span
78167-
data-x="concept-origin-alias">alias</span> to the <span>origin</span> of the
78168-
<code>Document</code>.</p>
78158+
<p>The <span>effective script origin</span> is initially a copy of the <span>origin</span> of
78159+
the <code>Document</code>.</p>
7816978160

7817078161
</dd>
7817178162

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

7817778168
<dd>
7817878169

78179-
<p>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
78180-
<span>origin</span> specified by the <span>incumbent settings object</span> when the <span>navigate</span>
78181-
algorithm was invoked, or, if no <span data-x="concept-script">script</span> was involved, of
78182-
the <span>node document</span> of the element that initiated the <span
78183-
data-x="navigate">navigation</span> to that <span>URL</span>.</p>
78170+
<p>The <span>origin</span> is a copy of the <span>origin</span> specified by the
78171+
<span>incumbent settings object</span> when the <span>navigate</span> algorithm was invoked,
78172+
or, if no <span data-x="concept-script">script</span> was involved, of the <span>node
78173+
document</span> of the element that initiated the <span data-x="navigate">navigation</span> to
78174+
that <span>URL</span>.</p>
7818478175

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

7818978179
</dd>
7819078180

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

7820678196
<dd>
7820778197

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

78212-
<p>The <span>effective script origin</span> is initially an <span
78213-
data-x="concept-origin-alias">alias</span> to the <span>effective script origin</span> of that
78214-
same <code>Document</code>.</p>
78202+
<p>The <span>effective script origin</span> is the <span>effective script origin</span> of
78203+
that same <code>Document</code>.</p>
7821578204

7821678205
</dd>
7821778206

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

7822278211
<dd>
7822378212

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

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

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

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

7825178237
</dd>
7825278238

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

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

78276-
<dd>The <span>origin</span> is an <span data-x="concept-origin-alias">alias</span> to the
78277-
<span>origin</span> of the <code>img</code> element's <span>node document</span>.</dd>
78278-
78279-
<!-- all image loads go through the "potentially CORS-enabled fetch" algorithm so they're all
78280-
either CORS-cross-origin or CORS-same-origin if they succeed at all -->
78262+
<dd>The <span>origin</span> is a copy of the <span>origin</span> of the <code>img</code>
78263+
element's <span>node document</span>.</dd>
7828178264

7828278265
</dl>
7828378266

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

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

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

7830678289
</dl>
7830778290

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

7831678299
<dd>
7831778300

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

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

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

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

78339-
<!-- e.g.:
78340-
78341-
<p>The <span>origin</span> of a <code>Document</code> object returned by the
78342-
<code>XMLHttpRequest</code> API is an <span data-x="concept-origin-alias">alias</span> to the
78343-
<span>XMLHttpRequest origin</span> of the <code>XMLHttpRequest</code> object.</p>
78344-
78345-
-->
78346-
7834778320
<hr>
7834878321

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

78523-
<li><p>If the <span>effective script origin</span> of this <code>Document</code> is an <span
78524-
data-x="concept-origin-alias">alias</span>, set it to the value of the <span>effective script
78525-
origin</span> (essentially de-aliasing the <span>effective script origin</span>).</p></li>
78526-
7852778496
<li><p>Set the host component of the <span>effective script origin</span> tuple of this
7852878497
<code>Document</code> to <var>host</var>.</p>
7852978498

0 commit comments

Comments
 (0)