Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb458f3f6ccb0add6e136fd9d1377897594de6ea
https://github.com/WebKit/WebKit/commit/eb458f3f6ccb0add6e136fd9d1377897594de6ea
Author: Ahmad Saleem <[email protected]>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGeometryElement.getPointAtLength-04-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGPathElement.getTotalLength-01-expected.txt
M Source/WebCore/svg/SVGPathElement.cpp
Log Message:
-----------
SVGGeometryElement path query APIs should respect CSS 'd' property for
display:none elements
https://bugs.webkit.org/show_bug.cgi?id=304701
rdar://167195297
Reviewed by Taher Ali.
Per the SVG specification [1], getTotalLength() and getPointAtLength() should
compute path geometry based on the effective path data, which includes CSS 'd'
property values. Both APIs route through pathByteStream(), which currently only
checks renderer->style(). That style is null for non-rendered elements, so
display:none elements fail to read the CSS 'd' property.
Fix by falling back to computedStyle() when there is no renderer, allowing
display:none elements to access their CSS 'd' property values. This applies to
every caller of pathByteStream().
[1]
https://w3c.github.io/svgwg/svg2-draft/types.html#InterfaceSVGGeometryElement
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGeometryElement.getPointAtLength-04-expected.txt:
Progression
*
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGPathElement.getTotalLength-01-expected.txt:
Ditto
* Source/WebCore/svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::pathByteStream const):
Canonical link: https://commits.webkit.org/314654@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications