[webkit-changes] [WebKit/WebKit] 99a6e2: Save empty style sheet when saving web page resources

Sihui noreply at github.com
Mon Mar 11 16:00:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99a6e245f9ebe513bc7edc7055594b9436bc4472
      https://github.com/WebKit/WebKit/commit/99a6e245f9ebe513bc7edc7055594b9436bc4472
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

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

  Log Message:
  -----------
  Save empty style sheet when saving web page resources
https://bugs.webkit.org/show_bug.cgi?id=270711
rdar://121205393

Reviewed by Chris Dumez.

We currently replace URLs of empty style sheets with relative file paths when saving page resources, but we don't
actually create files for them (as the content is empty), so the saved web page will point to a file that does not
exist. To fix this, ensure we create an file on disk even the content is empty.

* Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::addSubresourcesForCSSStyleSheetsIfNecessary):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list