-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=262567 rdar://116420990 Reviewed by Ryosuke Niwa. This patch adds support for saving iframe resource to disk. To achive that: 1. each iframe main resource is saved as a single file, where file name is decided based on frame ID. 2. iframe main resources and subresources are stored in [main_resources_file_name]_files directory as other subresources of main frame. 3. subresource urls in iframe main resources are changed to relative file paths. 4. iframe urls in main frame resource are changed to relative file paths. Test: WebArchive.SaveResourcesSubframe * Source/WebCore/editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::frameForAttributeReplacement): (WebCore::MarkupAccumulator::replaceAttributeIfNecessary): replace srcdoc attribute with src attribute whose value is relative file path. (WebCore::MarkupAccumulator::appendURLAttributeIfNecessary): if src or srcdoc attribute does not exist, create a new src attribute with url set to relative file path. * Source/WebCore/editing/MarkupAccumulator.h: * Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * Source/WebCore/loader/archive/cf/LegacyWebArchive.h: * Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: Canonical link: https://commits.webkit.org/268858@main
- Loading branch information
Showing
5 changed files
with
177 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters