From 472bd07726db580b97b9d775996e9d895cda8be0 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 29 Feb 2016 14:51:20 -0800 Subject: [PATCH] Align with URL spec's terminology: "fragment identifier" => "fragment" --- source | 231 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 125 insertions(+), 106 deletions(-) diff --git a/source b/source index dbf389fe771..bb0c6bd8c6f 100644 --- a/source +++ b/source @@ -2755,6 +2755,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
  • The urn: scheme +

    Media fragment syntax + is defined in the Media Fragments URI specification.

    @@ -8067,9 +8069,9 @@ interface DOMStringMap { address is the URL associated with a Document (as defined in the DOM standard). It is initially set when the Document is created, but that can change during the lifetime of the Document; for example, it changes when the user navigates to a fragment identifier - on the page and when the pushState() method is called - with a new URL.

    + data-x="navigate">navigates to a fragment on the page + and when the pushState() method is called with a new + URL.

    @@ -30513,9 +30516,9 @@ interface HTMLMediaElement : HTMLElement { set enable to true, otherwise, set enable to false.

    -

    This could be triggered by Media Fragments URI fragment - identifier syntax, but it could also be triggered e.g. by the user agent selecting a 5.1 - surround sound audio track over a stereo audio track.

    +

    This could be triggered by media fragment syntax, but it + could also be triggered e.g. by the user agent selecting a 5.1 surround sound audio track + over a stereo audio track.

  • @@ -30562,8 +30565,7 @@ interface HTMLMediaElement : HTMLElement { set enable to true, otherwise, set enable to false.

    -

    This could again be triggered by Media Fragments URI - fragment identifier syntax.

    +

    This could again be triggered by media fragment syntax.

    @@ -30674,9 +30676,9 @@ interface HTMLMediaElement : HTMLElement { data-x="dom-media-seek">seek to that time and let jumped be true.

    -

    For example, with media formats that support the Media Fragments - URI fragment identifier syntax, the fragment identifier can be used to indicate a - start position.

    +

    For example, with media formats that support media fragment + syntax, the fragment can be used to + indicate a start position.

    @@ -30697,9 +30699,9 @@ interface HTMLMediaElement : HTMLElement { otherwise, seek the media element to the media controller position, relative to the media element's timeline.

    @@ -32709,9 +32711,9 @@ interface VideoTrack {
    -

    Returns the ID of the given track. This is the ID that can be used with a fragment identifier - if the format supports the Media Fragments URI syntax, and that can be used with - the getTrackById() method.

    +

    Returns the ID of the given track. This is the ID that can be used with a fragment if the format supports media fragment + syntax, and that can be used with the getTrackById() method.

    @@ -32833,9 +32835,10 @@ interface VideoTrack {

    The AudioTrack.id and VideoTrack.id attributes must return the identifier of the track, if it has one, or the empty string otherwise. If the media resource is - in a format that supports the Media Fragments URI fragment identifier syntax, the - identifier returned for a particular track must be the same identifier that would enable the track - if used as the name of a track in the track dimension of such a fragment identifier.

    + in a format that supports media fragment syntax, the identifier returned for a particular + track must be the same identifier that would enable the track if used as the name of a track in + the track dimension of such a fragment. +

    For example, in Ogg files, this would be the Name header field of the track.

    @@ -33016,15 +33019,16 @@ interface VideoTrack {

    The audioTracks and videoTracks attributes allow scripts to select which track should play, but it is also possible to select specific tracks declaratively, by specifying - particular tracks in the fragment identifier of the URL of the media - resource. The format of the fragment identifier depends on the MIME type of - the media resource.

    + particular tracks in the fragment of the + URL of the media resource. The format of the fragment depends on the MIME type of the + media resource.

    -

    In this example, a video that uses a format that supports the Media Fragments URI - fragment identifier syntax is embedded in such a way that the alternative angles labeled - "Alternative" are enabled instead of the default video track.

    +

    In this example, a video that uses a format that supports media fragment syntax + is embedded in such a way that the alternative angles labeled "Alternative" are enabled instead + of the default video track.

    <video src="myvideo#track=Alternative"></video>
    @@ -35009,9 +35013,10 @@ interface TextTrack : EventTarget {

    Returns the ID of the given track.

    -

    For in-band tracks, this is the ID that can be used with a fragment identifier if the format - supports the Media Fragments URI syntax, and that can be used with the getTrackById() method.

    +

    For in-band tracks, this is the ID that can be used with a fragment if the format supports media fragment + syntax, and that can be used with the getTrackById() method.

    For TextTrack objects corresponding to track elements, this is the ID of the track element.

    @@ -35150,9 +35155,9 @@ interface TextTrack : EventTarget { track elements, the track's identifier is the value of the element's id attribute, if any. For in-band tracks, the track's identifier is specified by the media resource. If the media resource is in a format - that supports the Media Fragments URI fragment identifier syntax, the identifier - returned for a particular track must be the same identifier that would enable the track if used as - the name of a track in the track dimension of such a fragment identifier.

    + that supports media fragment syntax, the identifier returned for a particular + track must be the same identifier that would enable the track if used as the name of a track in + the track dimension of such a fragment.

    The inBandMetadataTrackDispatchType attribute must return the text track in-band metadata track dispatch type of the @@ -79107,8 +79112,8 @@ callback FrameRequestCallback = void (DOMHighResTimeStampEntries that consist of state objects share the same Document as the entry for the page that was active when they were added.

    -

    Contiguous entries that differ just by fragment identifier also share the same - Document.

    +

    Contiguous entries that differ just by their URLs' fragments also share the same Document.

    All entries that share the same Document (and that are therefore merely different states of one particular document) are contiguous by definition.

    @@ -80618,16 +80623,17 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

    The handle redirects step later in this algorithm can in certain cases jump back to the step labeled fragment identifiers. Since, between those two steps, - this algorithm goes from operating synchronously in the context of the calling fragments. Since, between those two steps, this + algorithm goes from operating synchronously in the context of the calling task to operating in parallel independent of the event - loop, some of the intervening steps need to be able to handle both being run as part of a task and - running in parallel. The gone async flag is thus used to make these steps - aware of which mode they are operating in.

    + loop, some of the intervening steps need to be able to handle both being run as part of a + task and running in parallel. The + gone async flag is thus used to make these steps aware of which mode they are + operating in.

    -
  • If gone async is false, cancel any preexisting but not yet 1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

    Handle redirects: If fetching the resource results in a redirect, and either the URL of the target of the redirect has the same origin as the original resource, or the resource is being obtained using the POST method or a safe method (in HTTP - terms), return to the step labeled fragment - identifiers with the new resource, except that if the URL of the target of - the redirect does not have a fragment identifier and the URL of the resource that - led to the redirect does, then the fragment identifier of the resource that led to the redirect - must be propagated to the URL of the target of the redirect.

    + terms), return to the step labeled fragments with the + new resource, except that if the URL of the target of the redirect does not have a + fragment and the URL of the resource + that led to the redirect does, then the fragment of + the resource that led to the redirect must be propagated to the URL of the target + of the redirect.

    So for instance, if the original URL was "http://example.com/#!sample" and "http://example.com/" is @@ -81324,18 +81331,18 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

  • The navigation algorithm has now matured.

  • -
  • Fragment identifier loop: Spin the event loop for a user-agent-defined - amount of time, as desired by the user agent implementor. (This is intended to allow the user - agent to optimise the user experience in the face of performance concerns.)

  • +
  • Fragment loop: Spin the event loop for a user-agent-defined amount of + time, as desired by the user agent implementor. (This is intended to allow the user agent to + optimise the user experience in the face of performance concerns.)

  • If the Document object has no parser, or its parser has stopped parsing, or the user agent has reason to believe the user is no longer - interested in scrolling to the fragment identifier, then abort these steps.

  • + interested in scrolling to the fragment, then abort + these steps.

    -
  • Scroll to the fragment identifier given in the document's - address. If this fails to find an - indicated part of the document, then return to the fragment identifier loop - step.

  • +
  • Scroll to the fragment given in the document's address. If this + fails to find an indicated part of the + document, then return to the fragment loop step.

  • @@ -81627,9 +81634,9 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O -

    Navigating to a fragment identifier

    +

    Navigating to a fragment

    -

    When a user agent is supposed to navigate to a fragment identifier, then the user agent must +

    When a user agent is supposed to navigate to a fragment, then the user agent must run the following steps:

      @@ -81655,8 +81662,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O agent was navigating. The title must be left unset.

    1. Traverse the history to the new entry, with the non-blocking events flag - set. This will scroll to the fragment - identifier given in what is now the document's address.

    2. + set. This will scroll to the fragment given in what is now the document's + address.

    @@ -81667,13 +81674,13 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
    -

    When the user agent is required to scroll to the fragment identifier and the - indicated part of the document, if any, is being rendered, the user agent must - either change the scrolling position of the document using the following algorithm, or perform - some other action such that the indicated part of the document is brought to the - user's attention. If there is no indicated part, or if the indicated part is not being - rendered, then the user agent must do nothing. The aforementioned algorithm is as - follows:

    +

    When the user agent is required to scroll to the fragment and the indicated part + of the document, if any, is being rendered, the user agent must either change + the scrolling position of the document using the following algorithm, or perform some other action + such that the indicated part of the document is brought to the user's attention. If + there is no indicated part, or if the indicated part is not being rendered, then the + user agent must do nothing. The aforementioned algorithm is as follows:

      @@ -81692,11 +81699,13 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
    -

    The indicated part of the document is the one that the fragment identifier, if any, - identifies. The semantics of the fragment identifier in terms of mapping it to a specific DOM Node - is defined by the specification that defines the MIME type used by the - Document (for example, the processing of fragment identifiers for XML MIME types is the responsibility of RFC7303).

    +

    The indicated part of the document is the one that the fragment, if any, identifies. The semantics of the fragment in terms of mapping it to a specific DOM Node is + defined by the specification that defines the MIME type used by the + Document (for example, the processing of fragments for XML MIME types is the responsibility of RFC7303).

    For HTML documents (and HTML MIME types), the following processing model must be followed to determine what the indicated part of the @@ -81902,19 +81911,19 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

  • Set the document's address to the URL of the specified entry.

  • -
  • If the specified entry has a URL whose fragment identifier differs - from that of the current entry's when compared in a case-sensitive - manner, and the two share the same Document object, then let hash - changed be true, and let old URL be the URL of the current - entry and new URL be the URL of the specified - entry. Otherwise, let hash changed be false.

  • +
  • If the specified entry has a URL whose fragment differs from that of the + current entry's when compared in a case-sensitive manner, and the two + share the same Document object, then let hash changed be true, and let + old URL be the URL of the current entry and new URL be the URL + of the specified entry. Otherwise, let hash changed be false.

  • If the traversal was initiated with replacement enabled, remove the entry immediately before the specified entry in the session history.

  • If the specified entry is not an entry with persisted user - state, but its URL has a fragment identifier, scroll to the fragment - identifier.

  • + state, but its URL has a fragment, + scroll to the fragment.

  • If the entry is an entry with persisted user state, the user agent may restore persisted user state and update @@ -83030,7 +83039,8 @@ NETWORK: characters other than U+000A LINE FEED (LF) and U+000D CARRIAGE RETURN (CR) characters.

    Comments must be on a line on their own. If they were to be included on a line - with a URL, the "#" would be mistaken for part of a fragment identifier.

    + with a URL, the "#" would be mistaken for part of a fragment.

    A section header
    @@ -83151,8 +83161,8 @@ NETWORK: the manifest itself (either explicitly or implicitly, through the use of relative URLs).

    -

    URLs in manifests must not have fragment identifiers (i.e. the U+0023 NUMBER SIGN character - isn't allowed in URLs in manifests).

    +

    URLs in manifests must not have fragments (i.e. the + U+0023 NUMBER SIGN character isn't allowed in URLs in manifests).

    Fallback namespaces and namespaces in the online safelist are matched by prefix @@ -83735,7 +83745,7 @@ NETWORK: used for the entry in cache must instead be the absolute URL obtained from applying the URL serialiser algorithm to the URL record with the exclude fragment flag set - (application caches never include fragment identifiers).

    + (application caches never include fragments).

  • @@ -91004,7 +91014,8 @@ dictionary MessageEventInit : EventInit { value it was initialised to. When the object is created, this attribute must be initialised to the empty string. It represents, in server-sent events and cross-document messaging, the origin of the document that sent the message (typically the - scheme, hostname, and port of the document, but not its path or fragment identifier).

    + scheme, hostname, and port of the document, but not its path or fragment).

    The lastEventId attribute must return the value it was initialised to. When the object is created, this attribute must be @@ -91920,7 +91931,7 @@ data: test

    W3C
    -

    Fragment identifiers have no meaning with +

    Fragments have no meaning with text/event-stream resources.

    @@ -93183,8 +93194,9 @@ function handleMessage(event) {
    • Navigate the iframe to a new URL, such as the same - URL but with a different fragment identifier, causing the Window in the - iframe to receive a hashchange event.
    • + URL but with a different fragment, + causing the Window in the iframe to receive a hashchange event.
    • Resize the iframe, causing the Window in the iframe to receive a resize event.
    • @@ -109874,8 +109886,9 @@ if (s = prompt('What is your name?')) { subtree. If this attribute is present and the element has an ID, then the attribute's value must be equal to the element's ID. In earlier versions of the language, this attribute was intended as - a way to specify possible targets for fragment identifiers in URLs. The - id attribute should be used instead.

      + a way to specify possible targets for fragments in + URLs. The id attribute should be used + instead.

      Authors should not, but may despite requirements to the contrary elsewhere in this @@ -111644,8 +111657,9 @@ if (s = prompt('What is your name?')) {

      W3C
      -

      Fragment identifiers used with text/html resources either refer to the - indicated part of the document or provide state information for in-page scripts.

      +

      Fragments used with text/html resources + either refer to the indicated part of the document or provide state information for + in-page scripts.

      @@ -111719,8 +111733,9 @@ if (s = prompt('What is your name?')) {
      W3C
      -

      Fragment identifiers used with multipart/x-mixed-replace resources apply to each - body part as defined by the type used by that body part.

      +

      Fragments used with + multipart/x-mixed-replace resources apply to each body part as defined by the type + used by that body part.

      application/xhtml+xml

      @@ -111790,8 +111805,9 @@ if (s = prompt('What is your name?')) {
      W3C
      -

      Fragment identifiers used with application/xhtml+xml resources have the same - semantics as with any XML MIME type.

      +

      Fragments used with + application/xhtml+xml resources have the same semantics as with any + XML MIME type.

      text/cache-manifest

      @@ -111878,7 +111894,8 @@ if (s = prompt('What is your name?')) {
      W3C
      -

      Fragment identifiers have no meaning with text/cache-manifest resources.

      +

      Fragments have no meaning with + text/cache-manifest resources.

      text/ping

      @@ -111959,7 +111976,8 @@ if (s = prompt('What is your name?')) {
      W3C
      -

      Fragment identifiers have no meaning with text/ping resources.

      +

      Fragments have no meaning with + text/ping resources.

      @@ -112034,9 +112052,10 @@ if (s = prompt('What is your name?')) {
      W3C
      -

      Fragment identifiers used with application/microdata+json resources have the same - semantics as when used with application/json (namely, at the time of writing, no - semantics at all).

      +

      Fragments used with + application/microdata+json resources have the same semantics as when used with + application/json (namely, at the time of writing, no semantics at all). +

      @@ -116365,7 +116384,7 @@ INSERT INTERFACES HERE hashchange HashChangeEvent Window - Fired at the Window when the fragment identifier part of the document's address changes + Fired at the Window when the fragment part of the document's address changes input