Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 83bf26fdb1d12bdd474d9de61a35c63251a306b0
      
https://github.com/WebKit/WebKit/commit/83bf26fdb1d12bdd474d9de61a35c63251a306b0
  Author: Taher Ali <[email protected]>
  Date:   2026-01-03 (Sat, 03 Jan 2026)

  Changed paths:
    A 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-expected.txt
    A LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox.html
    A LayoutTests/svg/clip-path/transformed-clip-expected.svg
    A LayoutTests/svg/clip-path/transformed-clip.svg
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceClipper.cpp

  Log Message:
  -----------
  Fix SVG clipPath bounding box transform order with objectBoundingBox units
https://bugs.webkit.org/show_bug.cgi?id=304836
rdar://167417135

Reviewed by Simon Fraser.

When a clipPath has both clipPathUnits="objectBoundingBox" and a local 
transform,
the bounding box calculation applied transforms in the wrong order. The local 
transform
was applied before the objectBoundingBox transform, causing it to be scaled 
incorrectly.

The correct order is: OBB transform first (to realize 0-1 coordinates to 
pixels),
then local transform (in pixel space).

Tests: svg/clip-path/hittest-transformed-clip-objectboundingbox.html
       svg/clip-path/transformed-clip-expected.svg
       svg/clip-path/transformed-clip.svg

* 
LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox-expected.txt:
 Added.
* LayoutTests/svg/clip-path/hittest-transformed-clip-objectboundingbox.html: 
Added.
* LayoutTests/svg/clip-path/transformed-clip-expected.svg: Added.
* LayoutTests/svg/clip-path/transformed-clip.svg: Added.
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceClipper.cpp:
(WebCore::LegacyRenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::LegacyRenderSVGResourceClipper::hitTestClipContent):
(WebCore::LegacyRenderSVGResourceClipper::resourceBoundingBox):

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



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

Reply via email to