Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9e4acd3a3813fa7bbeb453f8d7349a65fb310ba7
      
https://github.com/WebKit/WebKit/commit/9e4acd3a3813fa7bbeb453f8d7349a65fb310ba7
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-08-24 (Mon, 24 Aug 2026)

  Changed paths:
    M LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations
    M Source/WebCore/rendering/svg/RenderSVGShape.cpp
    M Source/WebCore/rendering/svg/SVGTransformComputation.h

  Log Message:
  -----------
  [LBSE] non-scaling-stroke uses the wrong reference coordinate system
https://bugs.webkit.org/show_bug.cgi?id=322340

Reviewed by Rob Buis.

The reference coordinate system for a non-scaling stroke is the one of the
outermost <svg>. It holds all SVG internal transforms and nothing above them.
Page zoom is not part of it either, because zoom scales the whole rendering,
the stroke included. We are currently using getScreenCTM() which includes
all transformations up to RenderView, which is incorrect.

Fix: Introduce computeTransformToSVGRoot() to accumulates up to and including
the anonymous RenderSVGViewportContainer, which caries the outermost 'viewBox'
transform and stop there. This is the correct coordinate system for
non-scaling-stroke.

Fixes three non-scaling-stroke tests in LBSE.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/TestExpectations:
* Source/WebCore/rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nonScalingStrokeTransform const):
* Source/WebCore/rendering/svg/SVGTransformComputation.h:
(WebCore::SVGTransformComputation::computeAccumulatedTransform const):
(WebCore::SVGTransformComputation::computeTransformToSVGRoot const):

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



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

Reply via email to