Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6086dd01a4d2685802d4d0e243972dc992b38a90 https://github.com/WebKit/WebKit/commit/6086dd01a4d2685802d4d0e243972dc992b38a90 Author: Anne van Kesteren <ann...@annevk.nl> Date: 2023-08-29 (Tue, 29 Aug 2023)
Changed paths: M LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt M LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html M LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt M LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html M LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-xhtml-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json M LayoutTests/imported/w3c/web-platform-tests/url/url-origin.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/url-origin.any.worker-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.worker_include=file-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_include=file-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any.js M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any.worker-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any.js M LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any.worker-expected.txt M Source/WTF/wtf/URL.cpp M Source/WTF/wtf/URLParser.cpp Log Message: ----------- Make URL's protocol setter forbid changing a special URL to a non-special URL https://bugs.webkit.org/show_bug.cgi?id=260854 rdar://114624048 Reviewed by Alex Christensen. Both Chromium and Gecko forbid changing a special URL to a non-special URL through the protocol setter, although only Chromium does so if the URL's scheme is "file". Matching this improves our Interop 2023 score and reduces the number of differences between engines. For now we leave changing a non-special URL to a special URL alone as other browsers continue to have bad non-special URL support. In order to be able to use URLParser::isSpecialScheme I had to change URLParser::maybeCanonicalizeScheme to also remove any tab or newline code points. I suspect that all callers already expect that behavior from an operation with canonicalize in its name and it used to not return a string potentially containing whitespace until 261017@main changed it. * LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt: * LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html: * LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt: * LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html: * LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-xhtml-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json: * LayoutTests/imported/w3c/web-platform-tests/url/url-origin.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/url-origin.any.worker-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.worker_include=file-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_exclude=(file_javascript_mailto)-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any_include=file-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any.js: (test): * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any.js: (test): * LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.any.worker-expected.txt: * Source/WTF/wtf/URL.cpp: (WTF::URL::setProtocol): * Source/WTF/wtf/URLParser.cpp: (WTF::URLParser::maybeCanonicalizeScheme): Canonical link: https://commits.webkit.org/267445@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes