Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d634b453e3d6fd2b0ca50e3755f1203011a47121
      
https://github.com/WebKit/WebKit/commit/d634b453e3d6fd2b0ca50e3755f1203011a47121
  Author: Etienne Segonzac <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M LayoutTests/platform/visionos/transforms/separated-expected.txt
    M LayoutTests/platform/visionos/transforms/separated.html
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h

  Log Message:
  -----------
  Separated layers should support `border-radius`
https://bugs.webkit.org/show_bug.cgi?id=282834
<rdar://137275518>

Reviewed by Simon Fraser.

When using separated layers, we need to apply the corner radius to the
main layer if at all possible in order to get the expected visual effect.
Introduce a new clipping strategy for these layers.

* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Enable composited descendant clipping on separated layers.
(WebCore::RenderLayerBacking::updateContentsRects):
Generate a content clipping rect for all separated layers.

* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateClippingStrategy):
Set the corner radius on the main layer for separated layers. We also
relax the application to even corners (as opposed to uniform) since
masking won't yield the expected effect.

* Source/WebCore/rendering/RenderLayerCompositor.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::isSeparated):
Add a helper method to test if a RenderObject requires a separated
layer.

* LayoutTests/platform/visionos/transforms/separated-expected.txt:
* LayoutTests/platform/visionos/transforms/separated.html:
Update the test to cover this by adding a `border-radius` to the
transformed elements.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to