Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 38b65cc65f133e6e5ac0afbf9a24149897e556b1
https://github.com/WebKit/WebKit/commit/38b65cc65f133e6e5ac0afbf9a24149897e556b1
Author: Ahmad Saleem <[email protected]>
Date: 2025-11-26 (Wed, 26 Nov 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGAnimatedLength-initial-values-expected.txt
M Source/WebCore/svg/SVGFilterElement.cpp
M Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
M Source/WebCore/svg/SVGLengthList.cpp
M Source/WebCore/svg/SVGLengthValue.cpp
M Source/WebCore/svg/SVGLengthValue.h
M Source/WebCore/svg/SVGLinearGradientElement.cpp
M Source/WebCore/svg/SVGMarkerElement.cpp
M Source/WebCore/svg/SVGMaskElement.cpp
M Source/WebCore/svg/SVGRadialGradientElement.cpp
M Source/WebCore/svg/SVGSVGElement.cpp
Log Message:
-----------
Fix to return `initial value` for SVG Length in case of parser error and
being invalid
https://bugs.webkit.org/show_bug.cgi?id=279379
rdar://136102554
Reviewed by Darin Adler.
Our current implementation for initial values was not taking account when
there was any parser error or when the value was empty string or null, this
patch fixes the bug by ensuring that we return the initial value as per
web-standard in those cases.
NOTE: We still fail test about `fx` and `fy`, where the initial value fallback
is unclear in specification, so this patch does not fix those cases.
* Source/WebCore/svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::attributeChanged):
* Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::attributeChanged):
* Source/WebCore/svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::parse):
* Source/WebCore/svg/SVGLengthValue.cpp:
(WebCore::SVGLengthValue::construct):
* Source/WebCore/svg/SVGLengthValue.h:
(WebCore::SVGLengthValue::construct):
* Source/WebCore/svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::attributeChanged):
* Source/WebCore/svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::attributeChanged):
* Source/WebCore/svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::attributeChanged):
* Source/WebCore/svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::attributeChanged):
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::attributeChanged):
*
imported/w3c/web-platform-tests/svg/types/scripted/SVGAnimatedLength-initial-values-expected.txt:
Progressions
Canonical link: https://commits.webkit.org/303577@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications