[webkit-changes] [WebKit/WebKit] 9dfd38: REGRESSION (283118 at main): Safari makes my extensio...
Timothy Hatcher
noreply at github.com
Tue Jan 7 08:02:34 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9dfd387a79e70976bdafe5d8f5cc534509d1dff8
https://github.com/WebKit/WebKit/commit/9dfd387a79e70976bdafe5d8f5cc534509d1dff8
Author: Timothy Hatcher <timothy at apple.com>
Date: 2025-01-07 (Tue, 07 Jan 2025)
Changed paths:
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm
M Source/WebKit/UIProcess/Extensions/WebExtension.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm
Log Message:
-----------
REGRESSION (283118 at main): Safari makes my extension icon blurry.
https://webkit.org/b/285482
rdar://142070967
Reviewed by Brian Weinstein.
On iOS we need to pass the scale to the UIImage constructor, so the later
resizing happens at the right scale (in points) instead of assuming 1x scale.
Also improved the image asset scale picking code, since falling back to zero
would never match an image in the multi-scale case. The single image case already
return early with the single image (the path almost all iOS configs use).
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm:
(WebKit::WebExtension::iconForPath): Added displayScale parameter for iOS.
(WebKit::WebExtension::bestIcon): Pass scale to iconForPath(), and improve image asset matching.
* Source/WebKit/UIProcess/Extensions/WebExtension.h:
(WebKit::WebExtension::iconForPath): Added displayScale parameter.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm:
(TestWebKitAPI::TEST(WKWebExtension, MultipleIconSizes)): Added.
Canonical link: https://commits.webkit.org/288529@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