Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b8414eccb3b1ca2bd5d48b490e51e0dbcd41bc01
      
https://github.com/WebKit/WebKit/commit/b8414eccb3b1ca2bd5d48b490e51e0dbcd41bc01
  Author: Simon Fraser <[email protected]>
  Date:   2026-05-14 (Thu, 14 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius.html
    M Source/WebCore/platform/graphics/GraphicsContextSwitcher.h
    M Source/WebCore/platform/graphics/ImageBufferContextSwitcher.cpp
    M Source/WebCore/platform/graphics/ImageBufferContextSwitcher.h
    M Source/WebCore/platform/graphics/TransparencyLayerContextSwitcher.cpp
    M Source/WebCore/platform/graphics/TransparencyLayerContextSwitcher.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerFilters.cpp
    M Source/WebCore/rendering/RenderLayerFilters.h

  Log Message:
  -----------
  REGRESSION (303819@main): Child with filter:blur() ignores border radius 
overflow clipping
https://bugs.webkit.org/show_bug.cgi?id=312584
rdar://175519148

Reviewed by Said Abou-Hallawa.

When using the TransparencyLayerContextSwitcher path for filters, we need to be 
able
to supply a complex clip for items clipped by border-radius on ancestors; this
requires running the code in `applyAncestorClippingForBorderRadius()` after
saving the graphics state, before starting the transparency layer, so factor
the code to allow this by passing a function to GraphicsContextSwitcher.

The previous attempt to fix this (312531@main) was reverted for causing 
rendering
regressions of youtube buttons and on wayfair.com; this turned out to be a Core 
Graphics
accelerated rendering bug (rdar://177036180) which we work around by applying 
the
rounded clip in an outer transparency layer. 
`grayscale-clip-border-radius.html` tests
this workaround.

Tests: 
imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius-ref.html
       
imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius.html
       
imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius-ref.html
       
imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/blur-clip-border-radius.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/grayscale-clip-border-radius.html:
 Added.
* Source/WebCore/platform/graphics/GraphicsContextSwitcher.h:
(WebCore::GraphicsContextSwitcher::beginClipAndDrawSourceImage):
* Source/WebCore/platform/graphics/ImageBufferContextSwitcher.cpp:
(WebCore::ImageBufferContextSwitcher::beginClipAndDrawSourceImage):
* Source/WebCore/platform/graphics/ImageBufferContextSwitcher.h:
* Source/WebCore/platform/graphics/TransparencyLayerContextSwitcher.cpp:
(WebCore::TransparencyLayerContextSwitcher::beginClipAndDrawSourceImage):
(WebCore::TransparencyLayerContextSwitcher::endDrawSourceImage):
* Source/WebCore/platform/graphics/TransparencyLayerContextSwitcher.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::applyAncestorClippingForBorderRadius):
(WebCore::RenderLayer::setupFilters):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::beginFilterEffect):
* Source/WebCore/rendering/RenderLayerFilters.h:

Canonical link: https://commits.webkit.org/313267@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to