From c3b2511ee0158fa4b5bd4e4689c6be54132f3d90 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 16 May 2017 15:37:39 +0200 Subject: [PATCH] Remove Unicode serialization of an origin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Fixes #2568. --- source | 109 ++++++++++++++++++++------------------------------------- 1 file changed, 37 insertions(+), 72 deletions(-) diff --git a/source b/source index ed459916f1c..9505d5022af 100644 --- a/source +++ b/source @@ -22385,14 +22385,11 @@ interface HTMLHyperlinkElementUtils {
  • If this element's url is null, return the empty string.

  • -
  • Return the Unicode serialization - of this element's url's

    Return the serialization of this + element's url's origin.

  • -

    It returns the Unicode rather than the ASCII serialization for - compatibility with MessageEvent.

    -

    The protocol attribute's getter must run these steps:

    @@ -79540,8 +79537,8 @@ callback FrameRequestCallback = void (DOMHighResTimeStamp
    An opaque origin

    An internal value, with no serialization it can be recreated from (it is serialized as - "null" per ASCII serialization of an origin), for which the - only meaningful operation is testing for equality.

    + "null" per serialization of an origin), for which the only + meaningful operation is testing for equality.

    A tuple origin
    @@ -79714,42 +79711,9 @@ callback FrameRequestCallback = void (DOMHighResTimeStamp -

    The Unicode - serialization of an origin is the string obtained by applying the following algorithm to the - given origin origin:

    - -
      -
    1. If origin is an opaque origin, then - return "null".

    2. - -
    3. Let host be origin's host.

    4. - -
    5. Let unicodeHost be host if host is not a domain, and the result of applying domain to Unicode - to host otherwise.

    6. - -
    7. Let unicodeOrigin be a new tuple - origin consisting origin's scheme, - unicodeHost, and origin's port.

    8. - -
    9. -

      Return the ASCII serialization of an origin, given unicodeOrigin.

      - -

      The name ASCII serialization of an origin is misleading, as it - merely serializes an origin, which are all ASCII by default due to the URL - parser.

      -
    10. -
    - -

    The Unicode - serialization of ("https", "xn--maraa-rta.example", null, null) is "https://maraña.example".

    - -

    The ASCII serialization - of an origin is the string obtained by applying the following algorithm to the given +

    The serialization of an + origin is the string obtained by applying the following algorithm to the given origin origin:

      @@ -79772,6 +79736,13 @@ callback FrameRequestCallback = void (DOMHighResTimeStamp

      Return result.

    +

    The serialization of ("https", "xn--maraa-rta.example", null, null) is "https://xn--maraa-rta.example".

    + +

    There used to also be a + Unicode serialization of an origin. However, it was never widely adopted.

    +

    Two origins, A and B, are said to be @@ -81272,8 +81243,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

  • Let current be current's parent browsing context.

  • -
  • Append the Unicode serialization of current's active document's +

  • Append the serialization of current's active document's origin to output.

  • Return to the step labeled loop.

  • @@ -81365,14 +81336,11 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O object's origin, then throw a "SecurityError" DOMException.

    -
  • Return the Unicode serialization - of this Location object's url's

    Return the serialization of this + Location object's url's origin.

  • -

    It returns the Unicode rather than the ASCII serialization for - compatibility with MessageEvent.

    -

    The protocol attribute's getter must run these steps:

    @@ -90262,7 +90230,7 @@ document.body.appendChild(frame)

    The origin attribute's getter must return this object's relevant settings object's origin, origin, serialized.

    @@ -94390,10 +94358,10 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
  • Initialize event's type attribute to message, its data attribute to data, its origin attribute - to the Unicode serialization - of the origin of the event stream's final URL (i.e. the URL after redirects), and - its lastEventId attribute to the last event ID string of the event + to the serialization of the origin of the event stream's final URL (i.e., the URL after + redirects), and its lastEventId attribute to + the last event ID string of the event source.

  • If the event type buffer has a value other than the empty string, change the @@ -95147,10 +95115,10 @@ socket.onopen = function () {

  • Fire an event named message at the WebSocket object, using MessageEvent, with the origin - attribute initialized to the Unicode - serialization of the WebSocket object's url's origin, and - the data attribute initialized to + attribute initialized to the serialization of + the WebSocket object's url's origin, and the data attribute initialized to dataForEvent.

  • @@ -95593,8 +95561,8 @@ function receiver(e) { Document's origin is not same origin with targetOrigin, then abort these steps.

    -
  • Let origin be the Unicode - serialization of incumbentSettings's

    Let origin be the serialization of incumbentSettings's origin.

  • Let source be the WindowProxy object's corresponding to @@ -96399,17 +96367,17 @@ interface BroadcastChannel : EventTarget {

    If this throws an exception, then fire an event named messageerror at destination, using MessageEvent, with the origin - attribute initialized to the Unicode - serialization of sourceSettings's origin, and then abort these steps.

    + attribute initialized to the serialization of + sourceSettings's origin, and + then abort these steps.

  • Fire an event named message at destination, using MessageEvent, with the data attribute initialized to data and the origin - attribute initialized to the Unicode - serialization of sourceSettings's serialization of + sourceSettings's origin.

  • @@ -98211,14 +98179,11 @@ interface WorkerLocation { data-x="concept-url-serializer">serialized.

    The origin attribute's getter must - return the Unicode serialization of the - associated WorkerGlobalScope - object's url's serialization of the associated WorkerGlobalScope object's + url's origin.

    -

    It returns the Unicode rather than the ASCII serialization for - compatibility with MessageEvent.

    -

    The protocol attribute's getter must run return the associated WorkerGlobalScope object's