[webkit-changes] [WebKit/WebKit] 501aae: Images in image-set are not saved when saving web ...

Sihui noreply at github.com
Thu Mar 21 09:40:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 501aaeb2c61bc0727df5a1dc03b314f689718c9e
      https://github.com/WebKit/WebKit/commit/501aaeb2c61bc0727df5a1dc03b314f689718c9e
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M Source/WebCore/css/CSSImageSetOptionValue.cpp
    M Source/WebCore/css/CSSImageSetOptionValue.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm

  Log Message:
  -----------
  Images in image-set are not saved when saving web page resources
https://bugs.webkit.org/show_bug.cgi?id=271299
rdar://problem/125064898

Reviewed by Ryosuke Niwa.

CSSImageSetOptionValue has two enclosed CSSValues (one of which is a CSSImageValue) that do not get visited by custom
functions. As a result, the subresource is not collected and URL is not replaced when web page is saved. To fix this,
add implementation for the custom functions in CSSImageSetOptionValue.

* Source/WebCore/css/CSSImageSetOptionValue.cpp:
(WebCore::CSSImageSetOptionValue::customTraverseSubresources const):
(WebCore::CSSImageSetOptionValue::customSetReplacementURLForSubresources):
(WebCore::CSSImageSetOptionValue::customClearReplacementURLForSubresources):
* Source/WebCore/css/CSSImageSetOptionValue.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm:

Canonical link: https://commits.webkit.org/276472@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