When I switch mask-mode to luminance my mask-size: contain no longer works: https://codepen.io/waterplea/pen/ExrvOWK
<rdar://problem/118396665>
Created attachment 470396 [details] Test
The call to `context.setDrawLuminanceMask(bgLayer.maskMode() == MaskMode::Luminance)` in `BackgroundPainter::paintFillLayer()` causes the sizing issue. Will have to debug what goes on in the GraphicsContext when `BackgroundPainter::drawLuminanceMask()` return true.
The functions where `BackgroundPainter::drawLuminanceMask()` is involved in this case are `Image::drawTiled()` and `BitmapImage::drawPattern()`.
The parameters we receive in GraphicsContextCG::drawPattern() look correct.
This appears to work as expected on a 1x display.
Actually, zooming in and out of the page using the trackpad affects the way the mask is clipped.
Actually, the trackpad zoom affecting the rendering only affects ToT and not macOS 14.5. So that's a change in behavior introduced since then which can be bisected.
The trackpad zoom behavior was caused by 276827@main.
Pull request: https://github.com/WebKit/WebKit/pull/29053
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/46478
Committed 279312@main (2e41b0f5e31e): <https://commits.webkit.org/279312@main> Reviewed commits have been landed. Closing PR #29053 and removing active labels.