Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6b29585b0ea3077d60ae2dc3efb020757eb77116
https://github.com/WebKit/WebKit/commit/6b29585b0ea3077d60ae2dc3efb020757eb77116
Author: Jintian Wang <[email protected]>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
A
LayoutTests/interaction-region/icon-masking-opaque-grayscale-image-expected.txt
A LayoutTests/interaction-region/icon-masking-opaque-grayscale-image.html
A LayoutTests/interaction-region/resources/opaque-grayscale.jpg
A LayoutTests/interaction-region/resources/opaque-rgb.jpg
M Source/WebCore/platform/graphics/ShareableBitmap.cpp
Log Message:
-----------
Gaze glow on the iPhone buy page's color swatches is a rounded square instead
of a circle
https://bugs.webkit.org/show_bug.cgi?id=325381
rdar://188334432
Reviewed by Matt Woodrow.
With GPU Process DOM rendering, RemoteResourceCacheProxy copies an image into a
ShareableBitmap on first use and replaces the image's platform image with the
copy. Grayscale JPEGs, are copied with ShareableBitmap::createFromImageDraw(),
which always creates a bitmap with alpha. InteractionRegion then treats them as
icons and uses their full image rect as the region.
Make createFromImageDraw() create an opaque bitmap when the image has no alpha.
This also covers the same copy elsewhere.
This does not change rendering. The whole image is drawn over the whole bitmap
with CompositeOperator::Copy, so an image without alpha gives the same opaque
pixels as before; only the bitmap's alpha info changes.
Test added: interaction-region/icon-masking-opaque-grayscale-image.html
*
LayoutTests/interaction-region/icon-masking-opaque-grayscale-image-expected.txt:
Added.
* LayoutTests/interaction-region/icon-masking-opaque-grayscale-image.html:
Added.
* LayoutTests/interaction-region/resources/opaque-grayscale.jpg: Added.
* LayoutTests/interaction-region/resources/opaque-rgb.jpg: Added.
* Source/WebCore/platform/graphics/ShareableBitmap.cpp:
(WebCore::ShareableBitmap::createFromImageDraw):
Canonical link: https://commits.webkit.org/322084@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications