Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e303a714c767cbc7d553c6297b1041713745ff82
      
https://github.com/WebKit/WebKit/commit/e303a714c767cbc7d553c6297b1041713745ff82
  Author: lilly <[email protected]>
  Date:   2026-08-16 (Sun, 16 Aug 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/compositing/corner-shape-ancestor-clip-expected.html
    A LayoutTests/compositing/corner-shape-ancestor-clip-shape-mask-expected.txt
    A LayoutTests/compositing/corner-shape-ancestor-clip-shape-mask.html
    A LayoutTests/compositing/corner-shape-ancestor-clip.html
    A LayoutTests/compositing/corner-shape-mask-layer-offset-expected.html
    A LayoutTests/compositing/corner-shape-mask-layer-offset.html
    A LayoutTests/compositing/video/corner-shape-video-expected.html
    A LayoutTests/compositing/video/corner-shape-video-overflow-expected.html
    A
LayoutTests/compositing/video/corner-shape-video-overflow.html
    A LayoutTests/compositing/video/corner-shape-video.html
    A 
LayoutTests/fast/scrolling/corner-shape-nested-clips-overflow-scroll-expected.html
    A LayoutTests/fast/scrolling/corner-shape-nested-clips-overflow-scroll.html
    A 
LayoutTests/fast/scrolling/corner-shape-overflow-scroll-uneven-radii-expected.html
    A LayoutTests/fast/scrolling/corner-shape-overflow-scroll-uneven-radii.html
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
    M Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp
    M Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.h
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h
    M
Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.h
    M Source/WebCore/rendering/LayerAncestorClippingStack.cpp
    M Source/WebCore/rendering/LayerAncestorClippingStack.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerBacking.h
    M Source/WebCore/rendering/style/BorderData.cpp
    M Source/WebCore/rendering/style/BorderData.h

  Log Message:
  -----------
  corner-shape: non-round corner shapes are ignored for composited content 
(<video>, images, composited descendants)
https://bugs.webkit.org/show_bug.cgi?id=321194
rdar://184258503

Reviewed by Simon Fraser.

This adds a shape mask for the cases the layer can clip itself, and
refuses the directly-composited fast paths for the cases it can't

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/LayerAncestorClippingStack.h:
*
Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
(WebCore::RenderLayerBacking::updateAppleVisualEffect):
(WebCore::RenderLayerBacking::updateConfigurationAfterStyleChange):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::contentsClippingRectForCornerShape):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
(WebCore::RenderLayerBacking::updateContentsRects):
(WebCore::boxNeedingShapeMaskForClip):
(WebCore::RenderLayerBacking::ensureClippingStackLayers):
(WebCore::RenderLayerBacking::removeClippingStackLayers):
(WebCore::RenderLayerBacking::updateClippingStackLayerGeometry):
(WebCore::RenderLayerBacking::needsCornerShapeMask const):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::supportsDirectlyCompositedBoxDecorations):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage
const):
(WebCore::setContentsClipShapePath):
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebCore/rendering/style/BorderData.cpp:
(WebCore::BorderData::hasNonRoundCornerShape const):
(WebCore::BorderData::hasCornerShapeOutsideBorderRadius const):
(WebCore::BorderData::hasCornerShapeOutsideRoundedRect const):
* Source/WebCore/rendering/style/BorderData.h:
* LayoutTests/compositing/video/corner-shape-video-expected.html: Added.
* LayoutTests/compositing/video/corner-shape-video-overflow-expected.html: 
Added.
* LayoutTests/compositing/video/corner-shape-video-overflow.html: Added.
* LayoutTests/compositing/video/corner-shape-video.html: Added.
* Source/WebCore/rendering/LayerAncestorClippingStack.cpp:
(WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack):
(WebCore::LayerAncestorClippingStack::updateWithClipData):
(WebCore::operator<<):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::contentsClipShapePath
const):
(WebCore::GraphicsLayer::setContentsClipShapePath):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::contentsClipShapePathsAreEqual):
(WebCore::GraphicsLayerCA::setContentsClipShapePath):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::setShapeLayerPath):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* LayoutTests/compositing/corner-shape-ancestor-clip-expected.html: Added.
* LayoutTests/compositing/corner-shape-ancestor-clip.html: Added.
* LayoutTests/compositing/corner-shape-mask-layer-offset-expected.html: Added.
* LayoutTests/compositing/corner-shape-mask-layer-offset.html: Added.
* LayoutTests/compositing/corner-shape-ancestor-clip-shape-mask-expected.txt: 
Added.
* LayoutTests/compositing/corner-shape-ancestor-clip-shape-mask.html: Added.
* 
LayoutTests/fast/scrolling/corner-shape-nested-clips-overflow-scroll-expected.html:
 Added.
*
LayoutTests/fast/scrolling/corner-shape-nested-clips-overflow-scroll.html: 
Added.
* 
LayoutTests/fast/scrolling/corner-shape-overflow-scroll-uneven-radii-expected.html:
 Added.
* LayoutTests/fast/scrolling/corner-shape-overflow-scroll-uneven-radii.html: 
Added.
* Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp:
(WebCore::SkiaCompositingLayer::paintContents):
(WebCore::SkiaCompositingLayer::paintSelfAndChildren):
* Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.h:
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::setContentsClipShapePath):
(WebCore::CoordinatedPlatformLayer::flushCompositingStateOnTarget):
(WebCore::CoordinatedPlatformLayer::flushCompositingStateOnSkiaTarget):
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
*
Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.cpp:
(WebCore::GraphicsLayerCoordinated::setContentsClipShapePath):
(WebCore::GraphicsLayerCoordinated::setShapeLayerPath):
(WebCore::GraphicsLayerCoordinated::commitLayerChanges):
* 
Source/WebCore/platform/graphics/texmap/coordinated/GraphicsLayerCoordinated.h:

Canonical link: 
https://flagged.apple.com:443/proxy?t2=DT5m3Y4rp6&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE5MjU3QG1haW4=&emid=3bc1947c-e975-4a8e-a640-34e3df31cdbd&c=11



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

Reply via email to