[webkit-changes] [WebKit/WebKit] 2518c5: data: URL base64 handling different from atob()
Anne van Kesteren
noreply at github.com
Fri Apr 14 10:54:27 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2518c514c679b98cbad35cddfc51d1f3148cea13
https://github.com/WebKit/WebKit/commit/2518c514c679b98cbad35cddfc51d1f3148cea13
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window.html
A LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window.js
M LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/w3c-import.log
M Source/WebCore/loader/ResourceLoader.cpp
M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm
M Source/WebCore/platform/network/DataURLDecoder.cpp
M Source/WebCore/platform/network/DataURLDecoder.h
M Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
M Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
Log Message:
-----------
data: URL base64 handling different from atob()
https://bugs.webkit.org/show_bug.cgi?id=175568
rdar://107982669
Reviewed by Alex Christensen.
We really shouldn't have different modes of decoding data: URLs.
https://bugs.webkit.org/show_bug.cgi?id=211671 fixed a set of web-platform-tests by introducing a new fetch-specific code path. It was not investigated whether the existing code path ought to be changed as well, apart from determining that there was no test coverage for the difference.
This commit adds test coverage and aligns WebKit with other browsers and the Fetch standard by removing the legacy code path altogether.
* LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/navigate.window.js: Added.
(forEach):
(async input):
* LayoutTests/imported/w3c/web-platform-tests/fetch/data-urls/w3c-import.log:
These changes are being upstreamed via https://github.com/web-platform-tests/wpt/pull/39542.
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
* Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::DataURLResourceMediaLoader::DataURLResourceMediaLoader):
* Source/WebCore/platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::decodeSynchronously):
(WebCore::DataURLDecoder::decode):
(WebCore::DataURLDecoder::decodeBase64): Deleted.
* Source/WebCore/platform/network/DataURLDecoder.h:
* Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::resume):
* Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadDataURLSynchronously):
Canonical link: https://commits.webkit.org/262976@main
More information about the webkit-changes
mailing list