Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d47e9015c3d9309859cfabde681f0861baba016c
      
https://github.com/WebKit/WebKit/commit/d47e9015c3d9309859cfabde681f0861baba016c
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
    A 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-mask-expected.txt
    A 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-mask.html
    A LayoutTests/svg/clip-path/transformed-clip-mask-expected.svg
    A LayoutTests/svg/clip-path/transformed-clip-mask.svg
    M Source/WebCore/rendering/RenderLayerModelObject.cpp
    M Source/WebCore/rendering/svg/RenderSVGContainer.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourceClipper.h
    M Source/WebCore/rendering/svg/RenderSVGShape.cpp

  Log Message:
  -----------
  [LBSE] Fix transformed <clipPath> with objectBoundingBox units
https://bugs.webkit.org/show_bug.cgi?id=325640

Reviewed by Rob Buis.

LBSE multiplied the <clipPath> transform For clipPathUnits="objectBoundingBox"
after the bounding box mapping, so it took effect in bounding box units.

Add a shared clipContentTransform() helper, which applies the transform in
user space like the legacy engine does and use it for path clipping, mask
clipping and hit testing.

Hit testing also rounded the point in bounding box units to a LayoutPoint,
which loses precision - keep it as FloatPoint. Both fixes together fix
svg/clip-path/hittest-transformed-clip-objectboundingbox-mask.html and
svg/clip-path/transformed-clip-mask.svg.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-mask-expected.txt:
 Added.
* 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-mask.html: 
Added.
* LayoutTests/svg/clip-path/transformed-clip-mask-expected.svg: Added.
* LayoutTests/svg/clip-path/transformed-clip-mask.svg: Added.
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::pointInSVGClippingArea const):
* Source/WebCore/rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtPoint):
* Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::clipContentTransform const):
(WebCore::RenderSVGResourceClipper::cachedPathClip const):
(WebCore::RenderSVGResourceClipper::applyPathClipping):
(WebCore::RenderSVGResourceClipper::applyMaskClipping):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* Source/WebCore/rendering/svg/RenderSVGResourceClipper.h:
* Source/WebCore/rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nodeAtPoint):

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



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

Reply via email to