WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-227073-20210624153045.patch (text/plain), 10.03 KB, created by
Alex Christensen
on 2021-06-24 15:30:46 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2021-06-24 15:30:46 PDT
Size:
10.03 KB
patch
obsolete
>Index: Source/WTF/ChangeLog >=================================================================== >--- Source/WTF/ChangeLog (revision 279247) >+++ Source/WTF/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2021-06-24 Alex Christensen <achristensen@webkit.org> >+ >+ URL path setter should not add a slash after the host when setting to an empty string >+ https://bugs.webkit.org/show_bug.cgi?id=227073 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This follows a recent change in the URL spec. >+ This matches the behavior of NSURLComponents and makes intuitive sense. >+ >+ * wtf/URL.cpp: >+ (WTF::URL::setPath): >+ > 2021-06-24 Martin Robinson <mrobinson@webkit.org> > > [css-scroll-snap] Remove ENABLE_SCROLL_SNAP compile-time option >Index: Source/WTF/wtf/URL.cpp >=================================================================== >--- Source/WTF/wtf/URL.cpp (revision 279247) >+++ Source/WTF/wtf/URL.cpp (working copy) >@@ -682,7 +682,9 @@ void URL::setPath(StringView path) > > parse(makeString( > StringView(m_string).left(pathStart()), >- path.startsWith('/') || (path.startsWith('\\') && (hasSpecialScheme() || protocolIs("file"))) ? "" : "/", >+ path.startsWith('/') >+ || (path.startsWith('\\') && (hasSpecialScheme() || protocolIs("file"))) >+ || (path.isEmpty() && !hasSpecialScheme() && m_schemeEnd + 1 != m_hostEnd) ? "" : "/", > escapePathWithoutCopying(path), > StringView(m_string).substring(m_pathEnd) > )); >Index: LayoutTests/imported/w3c/ChangeLog >=================================================================== >--- LayoutTests/imported/w3c/ChangeLog (revision 279247) >+++ LayoutTests/imported/w3c/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2021-06-24 Alex Christensen <achristensen@webkit.org> >+ >+ URL path setter should not add a slash after the host when setting to an empty string >+ https://bugs.webkit.org/show_bug.cgi?id=227073 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/url/resources/setters_tests.json: >+ * web-platform-tests/url/url-setters-expected.txt: >+ > 2021-06-24 Darin Adler <darin@apple.com> > > CSS parser does not handle unpaired surrogates correctly >Index: LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt (revision 279247) >+++ LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt (working copy) >@@ -340,6 +340,14 @@ PASS <a>: Setting <javascript://x/>.port > PASS <area>: Setting <javascript://x/>.port = '12' > PASS <a>: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path > PASS <area>: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path >+PASS <a>: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS <area>: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS <a>: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <area>: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <a>: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <area>: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <a>: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased >+PASS <area>: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased > PASS <a>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS <area>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS <a>: Setting <https://example.net#nav>.pathname = 'home' >Index: LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt (revision 279247) >+++ LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt (working copy) >@@ -498,6 +498,18 @@ PASS <area>: Setting <javascript://x/>.p > PASS URL: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path > PASS <a>: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path > PASS <area>: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path >+PASS URL: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS <a>: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS <area>: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <a>: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <area>: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <a>: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS <area>: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased >+PASS <a>: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased >+PASS <area>: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased > PASS URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS <a>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS <area>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' >Index: LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any-expected.txt (revision 279247) >+++ LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any-expected.txt (working copy) >@@ -170,6 +170,10 @@ PASS URL: Setting <sc:///>.port = '12' > PASS URL: Setting <sc://x/>.port = '12' > PASS URL: Setting <javascript://x/>.port = '12' > PASS URL: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path >+PASS URL: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased > PASS URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS URL: Setting <https://example.net#nav>.pathname = 'home' > PASS URL: Setting <https://example.net#nav>.pathname = '../home' >Index: LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker-expected.txt >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker-expected.txt (revision 279247) >+++ LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker-expected.txt (working copy) >@@ -170,6 +170,10 @@ PASS URL: Setting <sc:///>.port = '12' > PASS URL: Setting <sc://x/>.port = '12' > PASS URL: Setting <javascript://x/>.port = '12' > PASS URL: Setting <mailto:me@example.net>.pathname = '/foo' Cannot-be-a-base donât have a path >+PASS URL: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased >+PASS URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:///some/path>.pathname = '' Non-special URLs can have their paths erased >+PASS URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased > PASS URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' > PASS URL: Setting <https://example.net#nav>.pathname = 'home' > PASS URL: Setting <https://example.net#nav>.pathname = '../home' >Index: LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json >=================================================================== >--- LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json (revision 279247) >+++ LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json (working copy) >@@ -1612,6 +1612,42 @@ > } > }, > { >+ "comment": "Special URLs cannot have their paths erased", >+ "href": "file:///some/path", >+ "new_value": "", >+ "expected": { >+ "href": "file:///", >+ "pathname": "/" >+ } >+ }, >+ { >+ "comment": "Non-special URLs can have their paths erased", >+ "href": "foo://somehost/some/path", >+ "new_value": "", >+ "expected": { >+ "href": "foo://somehost", >+ "pathname": "" >+ } >+ }, >+ { >+ "comment": "Non-special URLs can have their paths erased", >+ "href": "foo:///some/path", >+ "new_value": "", >+ "expected": { >+ "href": "foo://", >+ "pathname": "" >+ } >+ }, >+ { >+ "comment": "Path-only URLs cannot have their paths erased", >+ "href": "foo:/some/path", >+ "new_value": "", >+ "expected": { >+ "href": "foo:/", >+ "pathname": "/" >+ } >+ }, >+ { > "href": "unix:/run/foo.socket?timeout=10", > "new_value": "/var/log/../run/bar.socket", > "expected": {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 227073
:
432137
|
432189
| 432217