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

  Changed paths:
    A LayoutTests/svg/custom/marker-stroke-dasharray-none-zero-expected.svg
    A LayoutTests/svg/custom/marker-stroke-dasharray-none-zero.svg
    M Source/WebCore/rendering/svg/RenderSVGPath.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp

  Log Message:
  -----------
  stroke-dasharray applied to markers and cannot be overriden by ="0"
https://bugs.webkit.org/show_bug.cgi?id=192539
rdar://46607685

Reviewed by Nikolas Zimmermann.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. Further,
this fixes issue for both LegacySVG and Layer Based SVG Engine (LBSE).

SVG markers were inheriting stroke-dasharray from their parent elements,
causing dashed strokes to appear on marker content even when explicitly
set to "0" or "none". This occurred because the marker rendering context
was not properly resetting the dash array state before painting.

The original issue is stroke-dasharray should not propagate into marker
content unless explicitly set on elements within the marker definition.

This change ensures that when rendering markers, we reset the stroke
dash array to empty before painting marker content, allowing marker-
specific stroke-dasharray values (including "0") to be applied correctly
without inheriting from the parent path or shape.

* Source/WebCore/rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::drawMarkers):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp:
(WebCore::LegacyRenderSVGPath::drawMarkers):
* LayoutTests/svg/custom/marker-stroke-dasharray-none-zero.svg: Added.
* LayoutTests/svg/custom/marker-stroke-dasharray-none-zero-expected.svg: Added.
(Added fuzziness in test due to Skia vs CG + known issue in CG of corner
missing - which was leading to difference)

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



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

Reply via email to