Skip to content

Commit

Permalink
Align with URL API changes for file and non-special URLs
Browse files Browse the repository at this point in the history
This change builds on whatwg/url#224.

Tests: web-platform-tests/wpt#4696.

Location API bits are not tested since we generally treat loading from file URLs as out-of-scope for the web platform, but accounting for it standards-wise seemed trivial enough.
  • Loading branch information
annevk authored Feb 8, 2017
1 parent feb1db4 commit b1e8d05
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>An <dfn data-x-href="https://url.spec.whatwg.org/#http-scheme">HTTP(S) scheme</dfn></li>
<li>A <dfn data-x-href="https://url.spec.whatwg.org/#network-scheme">network scheme</dfn></li>
<li>A <dfn data-x-href="https://url.spec.whatwg.org/#fetch-scheme">fetch scheme</dfn></li>
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#cannot-have-a-username-password-port">cannot have a username/password/port</dfn> concept</li>
<li>The <dfn data-x="concept-url-serializer" data-x-href="https://url.spec.whatwg.org/#concept-url-serializer">URL serializer</dfn></li>
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#concept-host-parser">host parser</dfn></li>
<li>The <dfn data-x="host serializer" data-x-href="https://url.spec.whatwg.org/#concept-host-serializer">host serializer</dfn></li>
Expand Down Expand Up @@ -21763,9 +21764,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
or <var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, terminate these
steps.</p></li>
<li><p>If <var>url</var> is null or <var>url</var>
<span>cannot have a username/password/port</span>, then return.</p></li>

<li><p><span>Set the username</span>, given <var>url</var> and the given value.</p></li>

Expand Down Expand Up @@ -21795,9 +21795,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
or <var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, terminate these
steps.</p></li>
<li><p>If <var>url</var> is null or <var>url</var>
<span>cannot have a username/password/port</span>, then return.</p></li>

<li><p><span>Set the password</span>, given <var>url</var> and the given value.</p></li>

Expand Down Expand Up @@ -21903,10 +21902,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
<var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, or <var>url</var>'s <span
data-x="concept-url-scheme">scheme</span> is "<code data-x="">file</code>", terminate these
steps.</p></li>
<li><p>If <var>url</var> is null or <var>url</var>
<span>cannot have a username/password/port</span>, then return.</p></li>

<li><p>If the given value is the empty string, then set <var>url</var>'s <span
data-x="concept-url-port">port</span> to null.</p></li>
Expand Down Expand Up @@ -80982,10 +80979,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<li><p>Let <var>copyURL</var> be a copy of this <code>Location</code> object's <span
data-x="concept-location-url">url</span>.</p></li>

<li><p>If <var>copyURL</var>'s <span data-x="concept-url-host">host</span> is null,
<var>copyURL</var>'s <span>cannot-be-a-base-URL flag</span> is set, or <var>copyURL</var>'s <span
data-x="concept-url-scheme">scheme</span> is "<code data-x="">file</code>", terminate these
steps.</p></li>
<li><p>If <var>copyURL</var> <span>cannot have a username/password/port</span>, then
return.</p></li>

<li><p>If the given value is the empty string, then set <var>copyURL</var>'s <span
data-x="concept-url-port">port</span> to null.</p></li>
Expand Down

0 comments on commit b1e8d05

Please sign in to comment.