[webkit-changes] [WebKit/WebKit] 2e41b0: mask-mode breaks mask-size

Antoine Quint noreply at github.com
Sat May 25 00:09:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2e41b0f5e31e945a4dc8ae2185e6a3183c0873af
      https://github.com/WebKit/WebKit/commit/2e41b0f5e31e945a4dc8ae2185e6a3183c0873af
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2024-05-25 (Sat, 25 May 2024)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/platform/graphics/BitmapImage.cpp
    M Source/WebCore/platform/graphics/BitmapImage.h

  Log Message:
  -----------
  mask-mode breaks mask-size
https://bugs.webkit.org/show_bug.cgi?id=264800
rdar://118396665

Reviewed by Simon Fraser.

In `BitmapImage::drawPattern()`, we should be using `createImageBuffer()` instead of `createAlignedImageBuffer()`
since we create the temporary `ImageBuffer` to work on the pixels of the image and, as such, should not be scaled
to match the `GraphicsContext` resolution.

We should use the `ImageBuffer` rect instead of tileRect when drawing to or from the `ImageBuffer` since the `tileRect`
is in the destination `GraphicsContext` coordinates.

Patch logic by Said Abou-Hallawa, refactoring and test by Antoine Quint.

* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-luminance-with-mask-size.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
(WebCore::BitmapImage::drawLuminanceMaskPattern):
* Source/WebCore/platform/graphics/BitmapImage.h:

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