Skip to content

Commit 59ebd9c

Browse files
authored
Remove Unicode serialization of an origin
And rename “ASCII serialization of an origin” to “serialization of an origin” though allow both to be used. Not all implementations implemented the Unicode variant and the ones that did, did so in a way that made it hard to use. Tests: * web-platform-tests/wpt#5939 * web-platform-tests/wpt#5940 * web-platform-tests/wpt#5941 * web-platform-tests/wpt#5944 * web-platform-tests/wpt#5946 * web-platform-tests/wpt#5955 * web-platform-tests/wpt#5957 * web-platform-tests/wpt#5958 URL Standard change: whatwg/url#311. Service Worker specification follow-up issue: w3c/ServiceWorker#1142. Fixes #2568.
1 parent 4257a9b commit 59ebd9c

File tree

1 file changed

+37
-72
lines changed

1 file changed

+37
-72
lines changed

source

Lines changed: 37 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -22385,14 +22385,11 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
2238522385
<li><p>If this element's <span data-x="concept-hyperlink-url">url</span> is null, return the
2238622386
empty string.</p></li>
2238722387

22388-
<li><p>Return the <span data-x="Unicode serialization of an origin">Unicode serialization</span>
22389-
of this element's <span data-x="concept-hyperlink-url">url</span>'s <span
22388+
<li><p>Return the <span data-x="serialization of an origin">serialization</span> of this
22389+
element's <span data-x="concept-hyperlink-url">url</span>'s <span
2239022390
data-x="concept-url-origin">origin</span>.</p></li>
2239122391
</ol>
2239222392

22393-
<p class="note no-backref">It returns the Unicode rather than the ASCII serialization for
22394-
compatibility with <code>MessageEvent</code>.</p>
22395-
2239622393
<p>The <dfn><code data-x="dom-hyperlink-protocol">protocol</code></dfn> attribute's getter must
2239722394
run these steps:</p>
2239822395

@@ -79532,8 +79529,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
7953279529
<dl>
7953379530
<dt>An <dfn data-export="" data-x="concept-origin-opaque">opaque origin</dfn></dt>
7953479531
<dd><p>An internal value, with no serialization it can be recreated from (it is serialized as
79535-
"<code data-x="">null</code>" per <span>ASCII serialization of an origin</span>), for which the
79536-
only meaningful operation is testing for equality.</p></dd>
79532+
"<code data-x="">null</code>" per <span>serialization of an origin</span>), for which the only
79533+
meaningful operation is testing for equality.</p></dd>
7953779534

7953879535
<dt>A <dfn data-export="" data-x="concept-origin-tuple">tuple origin</dfn></dt>
7953979536
<dd>
@@ -79706,42 +79703,9 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
7970679703

7970779704
<hr>
7970879705

79709-
<p>The <!--en-GB--><dfn id="unicode-serialisation-of-an-origin" data-export="">Unicode
79710-
serialization of an origin</dfn> is the string obtained by applying the following algorithm to the
79711-
given <span>origin</span> <var>origin</var>:</p>
79712-
79713-
<ol>
79714-
<li><p>If <var>origin</var> is an <span data-x="concept-origin-opaque">opaque origin</span>, then
79715-
return "<code data-x="">null</code>".</p></li>
79716-
79717-
<li><p>Let <var>host</var> be <var>origin</var>'s <span
79718-
data-x="concept-origin-host">host</span>.</p></li>
79719-
79720-
<li><p>Let <var>unicodeHost</var> be <var>host</var> if <var>host</var> is not a <span
79721-
data-x="concept-domain">domain</span>, and the result of applying <span>domain to Unicode</span>
79722-
to <var>host</var> otherwise.</p></li>
79723-
79724-
<li><p>Let <var>unicodeOrigin</var> be a new <span data-x="concept-origin-tuple">tuple
79725-
origin</span> consisting <var>origin</var>'s <span data-x="concept-origin-scheme">scheme</span>,
79726-
<var>unicodeHost</var>, and <var>origin</var>'s <span
79727-
data-x="concept-origin-port">port</span>.</p></li>
79728-
79729-
<li>
79730-
<p>Return the <span>ASCII serialization of an origin</span>, given <var>unicodeOrigin</var>.</p>
79731-
79732-
<p class="note">The name <span>ASCII serialization of an origin</span> is misleading, as it
79733-
merely serializes an origin, which are all ASCII by default due to the <span>URL
79734-
parser</span>.</p>
79735-
</li>
79736-
</ol>
79737-
79738-
<p class="example">The <span data-x="Unicode serialization of an origin">Unicode
79739-
serialization</span> of ("<code data-x="">https</code>", "<code
79740-
data-x="">xn--maraa-rta.example</code>", null, null) is "<code
79741-
data-x="">https://maraña.example</code>".</p>
79742-
79743-
<p>The <!--en-GB--><dfn id="ascii-serialisation-of-an-origin" data-export="">ASCII serialization
79744-
of an origin</dfn> is the string obtained by applying the following algorithm to the given
79706+
<p>The <!--en-GB--><dfn id="ascii-serialisation-of-an-origin" data-export=""
79707+
data-lt="serialization of an origin|ASCII serialization of an origin">serialization of an
79708+
origin</dfn> is the string obtained by applying the following algorithm to the given
7974579709
<span>origin</span> <var>origin</var>:</p>
7974679710

7974779711
<ol>
@@ -79764,6 +79728,13 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
7976479728
<li><p>Return <var>result</var>.</p></li>
7976579729
</ol>
7976679730

79731+
<p class="example">The <span data-x="serialization of an origin">serialization</span> of ("<code
79732+
data-x="">https</code>", "<code data-x="">xn--maraa-rta.example</code>", null, null) is "<code
79733+
data-x="">https://xn--maraa-rta.example</code>".</p>
79734+
79735+
<!--en-GB--><p class="note" id="unicode-serialisation-of-an-origin">There used to also be a
79736+
<i>Unicode serialization of an origin</i>. However, it was never widely adopted.</p>
79737+
7976779738
<hr>
7976879739

7976979740
<p>Two <span data-x="origin">origins</span>, <var>A</var> and <var>B</var>, are said to be
@@ -81264,8 +81235,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8126481235
<li><p>Let <var>current</var> be <var>current</var>'s <span>parent browsing
8126581236
context</span>.</p></li>
8126681237

81267-
<li><p><span data-x="list append">Append</span> the <span data-x="Unicode serialization of an
81268-
origin">Unicode serialization</span> of <var>current</var>'s <span>active document</span>'s
81238+
<li><p><span data-x="list append">Append</span> the <span data-x="serialization of an
81239+
origin">serialization</span> of <var>current</var>'s <span>active document</span>'s
8126981240
<span>origin</span> to <var>output</var>.</p></li>
8127081241

8127181242
<li><p>Return to the step labeled <i>loop</i>.</p></li>
@@ -81357,14 +81328,11 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8135781328
object</span>'s <span data-x="concept-settings-object-origin">origin</span>, then throw a
8135881329
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
8135981330

81360-
<li><p>Return the <span data-x="Unicode serialization of an origin">Unicode serialization</span>
81361-
of this <code>Location</code> object's <span data-x="concept-location-url">url</span>'s <span
81331+
<li><p>Return the <span data-x="serialization of an origin">serialization</span> of this
81332+
<code>Location</code> object's <span data-x="concept-location-url">url</span>'s <span
8136281333
data-x="concept-url-origin">origin</span>.</p></li>
8136381334
</ol>
8136481335

81365-
<p class="note no-backref">It returns the Unicode rather than the ASCII serialization for
81366-
compatibility with <code>MessageEvent</code>.</p>
81367-
8136881336
<p>The <dfn><code data-x="dom-location-protocol">protocol</code></dfn> attribute's getter must run
8136981337
these steps:</p>
8137081338

@@ -90211,7 +90179,7 @@ document.body.appendChild(frame)</pre>
9021190179

9021290180
<p>The <dfn data-x="dom-origin"><code>origin</code></dfn> attribute's getter must return this
9021390181
object's <span>relevant settings object</span>'s <span
90214-
data-x="concept-settings-object-origin">origin</span>, <span data-x="Unicode serialization of an
90182+
data-x="concept-settings-object-origin">origin</span>, <span data-x="serialization of an
9021590183
origin">serialized</span>.</p>
9021690184

9021790185

@@ -94345,10 +94313,10 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
9434594313
<li><p>Initialize <var>event</var>'s <code data-x="dom-Event-type">type</code> attribute to <code
9434694314
data-x="event-message">message</code>, its <code data-x="dom-MessageEvent-data">data</code>
9434794315
attribute to <var>data</var>, its <code data-x="dom-MessageEvent-origin">origin</code> attribute
94348-
to the <span data-x="Unicode serialization of an origin">Unicode serialization</span>
94349-
of the <span>origin</span> of the event stream's final URL (i.e. the URL after redirects), and
94350-
its <code data-x="dom-MessageEvent-lastEventId">lastEventId</code> attribute to the <span
94351-
data-x="concept-event-stream-last-event-id">last event ID string</span> of the event
94316+
to the <span data-x="serialization of an origin">serialization</span> of the <span
94317+
data-x="concept-url-origin">origin</span> of the event stream's final URL (i.e., the URL after
94318+
redirects), and its <code data-x="dom-MessageEvent-lastEventId">lastEventId</code> attribute to
94319+
the <span data-x="concept-event-stream-last-event-id">last event ID string</span> of the event
9435294320
source.</p></li>
9435394321

9435494322
<li><p>If the <var>event type</var> buffer has a value other than the empty string, change the
@@ -95102,10 +95070,10 @@ socket.onopen = function () {
9510295070
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
9510395071
data-x="event-message">message</code> at the <code>WebSocket</code> object, using
9510495072
<code>MessageEvent</code>, with the <code data-x="dom-MessageEvent-origin">origin</code>
95105-
attribute initialized to the <span data-x="Unicode serialization of an origin">Unicode
95106-
serialization</span> of the <code>WebSocket</code> object's <span
95107-
data-x="concept-websocket-url">url</span>'s <span data-x="concept-url-origin">origin</span>, and
95108-
the <code data-x="dom-MessageEvent-data">data</code> attribute initialized to
95073+
attribute initialized to the <span data-x="serialization of an origin">serialization</span> of
95074+
the <code>WebSocket</code> object's <span data-x="concept-websocket-url">url</span>'s <span
95075+
data-x="concept-url-origin">origin</span>, and the <code
95076+
data-x="dom-MessageEvent-data">data</code> attribute initialized to
9510995077
<var>dataForEvent</var>.</p></li>
9511095078

9511195079
</ol>
@@ -95548,8 +95516,8 @@ function receiver(e) {
9554895516
<code>Document</code></span>'s <span>origin</span> is not <span>same origin</span> with
9554995517
<var>targetOrigin</var>, then abort these steps.</p></li>
9555095518

95551-
<li><p>Let <var>origin</var> be the <span data-x="Unicode serialization of an origin">Unicode
95552-
serialization</span> of <var>incumbentSettings</var>'s <span
95519+
<li><p>Let <var>origin</var> be the <span data-x="serialization of an
95520+
origin">serialization</span> of <var>incumbentSettings</var>'s <span
9555395521
data-x="concept-settings-object-origin">origin</span>.</p></li>
9555495522

9555595523
<li><p>Let <var>source</var> be the <code>WindowProxy</code> object's corresponding to
@@ -96354,17 +96322,17 @@ interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {
9635496322
<p>If this throws an exception, then <span data-x="concept-event-fire">fire an event</span>
9635596323
named <code data-x="event-messageerror">messageerror</code> at <var>destination</var>, using
9635696324
<code>MessageEvent</code>, with the <code data-x="dom-MessageEvent-origin">origin</code>
96357-
attribute initialized to the <span data-x="Unicode serialization of an origin">Unicode
96358-
serialization</span> of <var>sourceSettings</var>'s <span
96359-
data-x="concept-settings-object-origin">origin</span>, and then abort these steps.</p>
96325+
attribute initialized to the <span data-x="serialization of an origin">serialization</span> of
96326+
<var>sourceSettings</var>'s <span data-x="concept-settings-object-origin">origin</span>, and
96327+
then abort these steps.</p>
9636096328
</li>
9636196329

9636296330
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
9636396331
data-x="event-message">message</code> at <var>destination</var>, using
9636496332
<code>MessageEvent</code>, with the <code data-x="dom-MessageEvent-data">data</code> attribute
9636596333
initialized to <var>data</var> and the <code data-x="dom-MessageEvent-origin">origin</code>
96366-
attribute initialized to the <span data-x="Unicode serialization of an origin">Unicode
96367-
serialization</span> of <var>sourceSettings</var>'s <span
96334+
attribute initialized to the <span data-x="serialization of an origin">serialization</span> of
96335+
<var>sourceSettings</var>'s <span
9636896336
data-x="concept-settings-object-origin">origin</span>.</p></li>
9636996337
</ol>
9637096338

@@ -98166,14 +98134,11 @@ interface <dfn>WorkerLocation</dfn> {
9816698134
data-x="concept-url-serializer">serialized</span>.</p>
9816798135

9816898136
<p>The <dfn><code data-x="dom-WorkerLocation-origin">origin</code></dfn> attribute's getter must
98169-
return the <span data-x="Unicode serialization of an origin">Unicode serialization</span> of the
98170-
associated <span data-x="concept-WorkerLocation-WorkerGlobalScope"><code>WorkerGlobalScope</code>
98171-
object</span>'s <span data-x="concept-WorkerGlobalScope-url">url</span>'s <span
98137+
return the <span data-x="serialization of an origin">serialization</span> of the associated <span
98138+
data-x="concept-WorkerLocation-WorkerGlobalScope"><code>WorkerGlobalScope</code> object</span>'s
98139+
<span data-x="concept-WorkerGlobalScope-url">url</span>'s <span
9817298140
data-x="concept-url-origin">origin</span>.</p>
9817398141

98174-
<p class="note no-backref">It returns the Unicode rather than the ASCII serialization for
98175-
compatibility with <code>MessageEvent</code>.</p>
98176-
9817798142
<p>The <dfn><code data-x="dom-WorkerLocation-protocol">protocol</code></dfn> attribute's getter
9817898143
must run return the associated <span
9817998144
data-x="concept-WorkerLocation-WorkerGlobalScope"><code>WorkerGlobalScope</code> object</span>'s

0 commit comments

Comments
 (0)