-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize port after updating scheme #328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@domenic do you want to update whatwg-url and then I land this and the tests?
Can do. |
It seems like we should also file a bug against Edge. @TimothyGu are you up for that or shall I do it? |
url.bs
Outdated
@@ -1400,6 +1400,9 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti | |||
|
|||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll let @domenic do the honors.
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 <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #13997 Refs: whatwg/url#328 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Closes #327.
Tests: web-platform-tests/wpt#6346
Preview | Diff