Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 939e7000670a9204a8b03f31f9ebd252d7486a1f
https://github.com/WebKit/WebKit/commit/939e7000670a9204a8b03f31f9ebd252d7486a1f
Author: Anne van Kesteren <[email protected]>
Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths:
M LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt
M LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html
M
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt
M LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html
M
LayoutTests/fast/dom/set-document-location-host-to-unaccepted-values-expected.txt
M LayoutTests/fast/dom/set-document-location-host-to-unaccepted-values.html
M
LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml_include=file-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/a-element_include=file-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json
M LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json
M
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.any.worker_include=file-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.any_include=file-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt
M Source/WTF/wtf/URL.cpp
M Source/WTF/wtf/URL.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/html/URLDecomposition.cpp
M Source/WebCore/loader/DocumentLoader.cpp
Log Message:
-----------
URL::setHostAndPort() needs to be aware of host delimiters
https://bugs.webkit.org/show_bug.cgi?id=270425
rdar://124363495
Reviewed by Alex Christensen.
URL::setHostAndPort() didn't have the delimiter check from
URL::setHost(). However, once you pull that in
URLDecomposition::setHost() (which calls URL::setHostAndPort()) starts
doing the wrong thing. So this moves its logic into
URL::setHostAndPort(). Similar to how URLDecomposition::setHostname()
and URL::setHost() already share most of their logic.
Then, for two special callers of URL::setHostAndPort() that want to
remove the host and port only, this adds URL::removeHostAndPort() that
does just that as the new URL::setHostAndPort() doesn't quite do what
they want anymore.
This synchronizes with web-platform-tests up to and including this PR:
https://github.com/web-platform-tests/wpt/pull/45688
* LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt:
* LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html:
* LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt:
* LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host.html:
*
LayoutTests/fast/dom/set-document-location-host-to-unaccepted-values-expected.txt:
* LayoutTests/fast/dom/set-document-location-host-to-unaccepted-values.html:
*
LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml_include=file-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/url/a-element_include=file-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json:
* LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json:
*
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.any.worker_include=file-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.any_include=file-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker_exclude=(file_javascript_mailto)-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt:
* Source/WTF/wtf/URL.cpp:
(WTF::countASCIIDigits):
(WTF::URL::setHostAndPort):
(WTF::URL::removeHostAndPort):
* Source/WTF/wtf/URL.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setURL):
* Source/WebCore/html/URLDecomposition.cpp:
(WebCore::URLDecomposition::setHost):
(WebCore::countASCIIDigits): Deleted.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
Canonical link: https://commits.webkit.org/277531@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes