[webkit-changes] [WebKit/WebKit] 55ccc8: Save iframe resources with same URL in different f...

Sihui noreply at github.com
Wed Oct 18 09:26:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 55ccc87da50d687aaa9af0119d2e4e6095327fd5
      https://github.com/WebKit/WebKit/commit/55ccc87da50d687aaa9af0119d2e4e6095327fd5
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
    M Source/WebCore/editing/MarkupAccumulator.cpp
    M Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm

  Log Message:
  -----------
  Save iframe resources with same URL in different files
https://bugs.webkit.org/show_bug.cgi?id=263220
rdar://116882637

Reviewed by Ryosuke Niwa.

In current implementation, if multiple iframe elements point to the same URL, we only create one file and make all the
elements point to that file. However, iframe content is usually modified by script, which means iframe pages with
the same URL usually have different content. To ensure the content is correctly captured, we now create one file for
each iframe main resource. This also matches behavior of other browsers.

Test: WebArchive.SaveResourcesIframesWithSameURL

* Source/WebCore/editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::resolveURLIfNeeded const):
* Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:

Canonical link: https://commits.webkit.org/269472@main




More information about the webkit-changes mailing list