Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 58c70ebe706ae1d9f5ff25c031bed3bfa4f716fa
      
https://github.com/WebKit/WebKit/commit/58c70ebe706ae1d9f5ff25c031bed3bfa4f716fa
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-04-26 (Sun, 26 Apr 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/svg/painting/animations/stroke-dasharray-composition-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/svg/painting/animations/stroke-dasharray-composition.html
    M Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.cpp

  Log Message:
  -----------
  stroke-dasharray interpolation should use LCM for list length matching
https://bugs.webkit.org/show_bug.cgi?id=313321
rdar://175598175

Reviewed by Sam Weinig.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

When interpolating stroke-dasharray lists of differing lengths, the result
length was computed as the product of the two lengths instead of their least
common multiple. The spec says "repeat both dash patterns until the length
of elements in both value lists match" [1], which is LCM, not product
(e.g. lengths 4 and 6 should produce 12 elements, not 24).

Also fixed the imported WPT composition test to align with the spec.
The test incorrectly expected additive composition behavior, but the spec
says "stroke-dasharray values are not additive" [1] — the "add" composite
operation should fall back to "replace". The corrected test verifies both
the non-additive behavior and LCM list length matching. (In new test case,
Safari matches Firefox implementation while Chrome has open bug [2]).

[1] https://w3c.github.io/svgwg/svg2-draft/painting.html#StrokeDashing
[2] https://issues.chromium.org/issues/40648445

* 
LayoutTests/imported/w3c/web-platform-tests/svg/painting/animations/stroke-dasharray-composition-expected.txt:
 Rebaselined
* 
LayoutTests/imported/w3c/web-platform-tests/svg/painting/animations/stroke-dasharray-composition.html:
 Fixed to match specification
* Source/WebCore/style/values/svg/StyleSVGStrokeDasharray.cpp:
(WebCore::Style::Blending<SVGStrokeDasharray>::blend):

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



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

Reply via email to