Normalize port after updating scheme#328
Conversation
|
Can do. |
|
It seems like we should also file a bug against Edge. @TimothyGu are you up for that or shall I do it? |
| <li><p>Set <var>url</var>'s <a for=url>scheme</a> to <var>buffer</var>. | ||
|
|
||
| <li><p>If <var>url</var>'s <a for=url>port</a> is <var>url</var>'s <a for=url>scheme</a>'s | ||
| <a>default port</a>, then set <var>url</var>'s <a for=url>port</a> to null. |
There was a problem hiding this comment.
This step is required for the protocol setter only, so it's better to place it after "4. If state override is given":
- Set url ’s scheme to buffer
- Set buffer to the empty string
- If state override is given, then:
- If url ’s port is url’s scheme’s default port , then set url’s port to null.
- Return.
There was a problem hiding this comment.
Ah, yes, I think I agree with this.
And while we're in the area, is there a reason resetting buffer (3) is necessary before returning from a state override (4)?
There was a problem hiding this comment.
@rmisev It's sort of odd to see "Return" on its own line, which was why I refrained from this style initally, but that's fine with me.
@GPHemsley not particularly. Changed.
|
whatwg-url confirms spec and test change are in harmony and don't break anything else; merge time! |
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Closes #327.
Tests: web-platform-tests/wpt#6346
Preview | Diff