From b04ccf10f21b946e3793db41274c60255c48cb12 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 23 Mar 2016 20:05:37 +0100 Subject: [PATCH] Rename non-relative to cannot-be-a-base-URL. Fix #89. --- url.bs | 47 ++++++++++++++++++++++++----------------------- url.html | 49 ++++++++++++++++++++++++------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/url.bs b/url.bs index 7f0419ad..628160b4 100644 --- a/url.bs +++ b/url.bs @@ -844,8 +844,9 @@ resource the URL's other components identify. It is initially nul

This is not an ASCII string on purpose. -

A URL also has an associated non-relative flag. It is -initially unset. +

A URL also has an associated +cannot-be-a-base-URL flag. +It is initially unset.

A URL also has an associated object that is either null or a @@ -1246,8 +1247,8 @@ optionally with an encoding base's scheme is equal to url's scheme, set state to special relative or authority state. -

This means that base's non-relative flag is - unset. +

This means that base's + cannot-be-a-base-URL flag is unset.

  • Otherwise, if url is special, set state to special authority slashes state. @@ -1256,9 +1257,9 @@ optionally with an encoding state to path or authority state, and increase pointer by one. -

  • Otherwise, set url's non-relative flag, append an empty +

  • Otherwise, set url's cannot-be-a-base-URL flag, append an empty string to url's path, and set state to - non-relative path state. + cannot-be-a-base-URL path state.

  • Otherwise, if state override is not given, set @@ -1272,10 +1273,10 @@ optionally with an encoding

    no scheme state
      -
    1. If base is null, or base's non-relative flag is +

    2. If base is null, or base's cannot-be-a-base-URL flag is set and c is not "#", syntax violation, return failure. -

    3. Otherwise, if base's non-relative flag is set and c +

    4. Otherwise, if base's cannot-be-a-base-URL flag is set and c is "#", set url's scheme to base's scheme, url's path to @@ -1283,7 +1284,7 @@ optionally with an encoding url's query to base's query, url's fragment to the empty string, set - url's non-relative flag, and set state to + url's cannot-be-a-base-URL flag, and set state to fragment state.

    5. Otherwise, if base's scheme is not @@ -1844,7 +1845,7 @@ optionally with an encoding

    -
    non-relative path state +
    cannot-be-a-base-URL path state
    1. If c is "?", set url's @@ -2034,7 +2035,7 @@ then runs these steps: url's scheme is "file", append "//" to output. -

    2. If url's non-relative flag is set, append the first string in +

    3. If url's cannot-be-a-base-URL flag is set, append the first string in url's path to output.

    4. Otherwise, append "/", followed by the strings in url's @@ -2538,7 +2539,7 @@ compatibility with HTML's MessageEvent feature. [[!HTML]]

      1. If context object's url's host is null, or its - non-relative flag is set, terminate these steps. + cannot-be-a-base-URL flag is set, terminate these steps.

      2. Set the username given context object's url and the given value. @@ -2557,7 +2558,7 @@ compatibility with HTML's MessageEvent feature. [[!HTML]]

        1. If context object's url's host is null, or its - non-relative flag is set, terminate these steps. + cannot-be-a-base-URL flag is set, terminate these steps.

        2. Set the password given context object's url and the given value. @@ -2581,8 +2582,8 @@ compatibility with HTML's MessageEvent feature. [[!HTML]]

          The host attribute's setter must run these steps:

            -
          1. If context object's url's non-relative flag is set, terminate - these steps. +

          2. If context object's url's cannot-be-a-base-URL flag is set, + terminate these steps.

          3. Basic URL parse the given value with context object's url as url and host state as state override. @@ -2606,8 +2607,8 @@ does return a port so one might have assumed the setter to

            The hostname attribute's setter must run these steps:

              -
            1. If context object's url's non-relative flag is set, terminate - these steps. +

            2. If context object's url's cannot-be-a-base-URL flag is set, + terminate these steps.

            3. Basic URL parse the given value with context object's url as url and hostname state as state override. @@ -2627,8 +2628,8 @@ does return a port so one might have assumed the setter to

              1. If context object's url's host is null, its - non-relative flag is set, or its scheme is "file", terminate - these steps. + cannot-be-a-base-URL flag is set, or its scheme is "file", + terminate these steps.

              2. Basic URL parse the given value with context object's url as url and port state as state override. @@ -2637,8 +2638,8 @@ does return a port so one might have assumed the setter to

                The pathname attribute's getter must run these steps:

                  -
                1. If context object's url's non-relative flag is set, return the - first string in context object's url's path. +

                2. If context object's url's cannot-be-a-base-URL flag is set, + return the first string in context object's url's path.

                3. Return "/", followed by the strings in context object's url's path (including empty strings), separated from each other by @@ -2649,8 +2650,8 @@ does return a port so one might have assumed the setter to run these steps:

                    -
                  1. If context object's url's non-relative flag is set, terminate - these steps. +

                  2. If context object's url's cannot-be-a-base-URL flag is set, + terminate these steps.

                  3. Empty context object's url's path. diff --git a/url.html b/url.html index 30025c24..38ab982b 100644 --- a/url.html +++ b/url.html @@ -11,7 +11,7 @@

                    URL

                    -

                    Living Standard — Last Updated

                    +

                    Living Standard — Last Updated

                    Participate: @@ -666,8 +666,8 @@

                    4. URL’s other components identify. It is initially null.

                    This is not an ASCII string on purpose.

                    -

                    A URL also has an associated non-relative flag. It is -initially unset.

                    +

                    A URL also has an associated cannot-be-a-base-URL flag. +It is initially unset.

                    A URL also has an associated object that is either null or a Blob object. It is initially null. [FILEAPI]

                    At this point this is used primarily to support "blob" URLs, but others can be added going forward, hence @@ -951,15 +951,14 @@

                    is special, base is non-null, and base’s scheme is equal to url’s scheme, set state to special relative or authority state.

                    -

                    This means that base’s non-relative flag is - unset.

                    +

                    This means that base’s cannot-be-a-base-URL flag is unset.

                  4. Otherwise, if url is special, set state to special authority slashes state.

                  5. Otherwise, if remaining starts with an "/", set state to path or authority state, and increase pointer by one.

                  6. -

                    Otherwise, set url’s non-relative flag, append an empty - string to url’s path, and set state to non-relative path state.

                    +

                    Otherwise, set url’s cannot-be-a-base-URL flag, append an empty + string to url’s path, and set state to cannot-be-a-base-URL path state.

                4. Otherwise, if state override is not given, set buffer to the empty string, state to no scheme state, and start over (from the first code point @@ -971,10 +970,10 @@

                  non-relative flag is +

                  If base is null, or base’s cannot-be-a-base-URL flag is set and c is not "#", syntax violation, return failure.

                5. -

                  Otherwise, if base’s non-relative flag is set and c is "#", set url’s scheme to base’s scheme, url’s path to base’s path, url’s query to base’s query, url’s fragment to the empty string, set url’s non-relative flag, and set state to fragment state.

                  +

                  Otherwise, if base’s cannot-be-a-base-URL flag is set and c is "#", set url’s scheme to base’s scheme, url’s path to base’s path, url’s query to base’s query, url’s fragment to the empty string, set url’s cannot-be-a-base-URL flag, and set state to fragment state.

                6. Otherwise, if base’s scheme is not "file", set state to relative state and decrease pointer by one.

                  @@ -1357,7 +1356,7 @@

                  non-relative path state +
                  cannot-be-a-base-URL path state
                  1. @@ -1502,7 +1501,7 @@

                    host is null and url’s scheme is "file", append "//" to output.

                  2. -

                    If url’s non-relative flag is set, append the first string in url’s path to output.

                    +

                    If url’s cannot-be-a-base-URL flag is set, append the first string in url’s path to output.

                  3. Otherwise, append "/", followed by the strings in url’s path (including empty strings), separated from each other by "/", to output.

                    @@ -1819,7 +1818,7 @@

                    username attribute’s setter must run these steps:

                    1. -

                      If context object’s url’s host is null, or its non-relative flag is set, terminate these steps.

                      +

                      If context object’s url’s host is null, or its cannot-be-a-base-URL flag is set, terminate these steps.

                    2. Set the username given context object’s url and the given value.

                      @@ -1835,7 +1834,7 @@

                      password attribute’s setter must run these steps:

                      1. -

                        If context object’s url’s host is null, or its non-relative flag is set, terminate these steps.

                        +

                        If context object’s url’s host is null, or its cannot-be-a-base-URL flag is set, terminate these steps.

                      2. Set the password given context object’s url and the given value.

                        @@ -1855,8 +1854,8 @@

                        host attribute’s setter must run these steps:

                        1. -

                          If context object’s url’s non-relative flag is set, terminate - these steps.

                          +

                          If context object’s url’s cannot-be-a-base-URL flag is set, + terminate these steps.

                        2. Basic URL parse the given value with context object’s url as url and host state as state override.

                        @@ -1873,8 +1872,8 @@

                        hostname attribute’s setter must run these steps:

                        1. -

                          If context object’s url’s non-relative flag is set, terminate - these steps.

                          +

                          If context object’s url’s cannot-be-a-base-URL flag is set, + terminate these steps.

                        2. Basic URL parse the given value with context object’s url as url and hostname state as state override.

                        @@ -1889,16 +1888,16 @@

                        port attribute’s setter must run these steps:

                        1. -

                          If context object’s url’s host is null, its non-relative flag is set, or its scheme is "file", terminate - these steps.

                          +

                          If context object’s url’s host is null, its cannot-be-a-base-URL flag is set, or its scheme is "file", + terminate these steps.

                        2. Basic URL parse the given value with context object’s url as url and port state as state override.

                        The pathname attribute’s getter must run these steps:

                        1. -

                          If context object’s url’s non-relative flag is set, return the - first string in context object’s url’s path.

                          +

                          If context object’s url’s cannot-be-a-base-URL flag is set, + return the first string in context object’s url’s path.

                        2. Return "/", followed by the strings in context object’s url’s path (including empty strings), separated from each other by "/".

                          @@ -1907,8 +1906,8 @@

                          context object’s url’s non-relative flag is set, terminate - these steps.

                          +

                          If context object’s url’s cannot-be-a-base-URL flag is set, + terminate these steps.

                        3. Empty context object’s url’s path.

                        4. @@ -2152,6 +2151,8 @@

                          c, in §1.1
                        5. C0 controls, in §1
                        6. C0 controls and space, in §1 +
                        7. cannot-be-a-base-URL flag, in §4 +
                        8. cannot-be-a-base-URL path state, in §4.2
                        9. default encode set, in §1.2
                        10. default port, in §4
                        11. delete(name), in §6.4 @@ -2228,8 +2229,6 @@

                          list, in §6.4
                        12. local scheme, in §4
                        13. new, in §6.4 -
                        14. non-relative flag, in §4 -
                        15. non-relative path state, in §4.2
                        16. normalized Windows drive letter, in §1
                        17. no scheme state, in §4.2
                        18. object, in §4