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

  Changed paths:
    M LayoutTests/TestExpectations
    R 
LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-scaling-stroke-markers-expected.txt
    R 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/custom/non-scaling-stroke-markers-expected.png
    R 
LayoutTests/platform/mac/svg/custom/non-scaling-stroke-markers-expected.png
    R LayoutTests/svg/custom/non-scaling-stroke-markers-expected.txt
    R LayoutTests/svg/custom/non-scaling-stroke-markers.svg
    M Source/WebCore/rendering/svg/RenderSVGPath.cpp
    M Source/WebCore/rendering/svg/RenderSVGShape.cpp
    M Source/WebCore/rendering/svg/RenderSVGShape.h
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.h

  Log Message:
  -----------
  Fix markerUnits=strokeWidth combined with non-scaling-stroke
https://bugs.webkit.org/show_bug.cgi?id=304893

Reviewed by Simon Fraser.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. 
Additionally,
it also fixes it for both LegacySVG and Layer Based SVG engine (LBSE).

Merge: 
https://chromium.googlesource.com/chromium/src/+/ef238963f2eaf1add1f8c3a0b3cb20c74310e67d

When vector-effect=non-scaling-stroke applies to an element we need to
adjust the stroke width used to compute the local coordinate space for a
marker with markerUnits=strokeWidth.

This also do clean-up of removing local test in favor of WPT.

* Source/WebCore/rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::drawMarkers):
* Source/WebCore/rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidthForMarkerUnits const):
* Source/WebCore/rendering/svg/RenderSVGShape.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp:
(WebCore::LegacyRenderSVGPath::drawMarkers):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp:
(WebCore::LegacyRenderSVGShape::strokeWidthForMarkerUnits const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.h:

* LayoutTests/TestExpectations: Progression

> Clean-up (Removed Local Test):
* 
LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-scaling-stroke-markers-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/custom/non-scaling-stroke-markers-expected.png:
 Removed.
* LayoutTests/platform/mac/svg/custom/non-scaling-stroke-markers-expected.png: 
Removed.
* LayoutTests/svg/custom/non-scaling-stroke-markers-expected.txt: Removed.
* LayoutTests/svg/custom/non-scaling-stroke-markers.svg: Removed.

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



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

Reply via email to