Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a1d6f46cebe58b1ed4f685b069e83b91cfd1704b
https://github.com/WebKit/WebKit/commit/a1d6f46cebe58b1ed4f685b069e83b91cfd1704b
Author: Sihui Liu <[email protected]>
Date: 2024-01-10 (Wed, 10 Jan 2024)
Changed paths:
M Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm
Log Message:
-----------
Exclude base element when saving web page resources
https://bugs.webkit.org/show_bug.cgi?id=267236
rdar://120495615
Reviewed by Ryosuke Niwa and BJ Burg.
When saving complete web page, subresources URLs are rewritten to relative file
paths based on main resource file path.
If the saved web page has base element, when it is loaded, the rewritten URLs
are resolved based on the URL specified by
base element, and the result can be invalid. To fix that, this patch excludes
base element when saving complete web
page, and replaces relative URLs (that are not rewritten) with complete URLs.
API Test: WebArchive.SaveResourcesExcludeBaseElement
* Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:
Canonical link: https://commits.webkit.org/272875@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes