Skip to content

Commit 42a0c29

Browse files
Ahmad-S792Ahmad Saleem
authored andcommitted
[SVG2] Change default value of fx and fy to 50% for SVGRadialGradient
https://bugs.webkit.org/show_bug.cgi?id=306976 rdar://169645572 Reviewed by Said Abou-Hallawa. This patch aligns with Web Specification [1]: As per web specification change, the initial value for 'fx' and 'fy' is now '50%' and this change follows it. [1] w3c/svgwg@762c875 * Source/WebCore/svg/SVGRadialGradientElement.h: * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGAnimatedLength-initial-values-expected.txt: Progressions Canonical link: https://commits.webkit.org/306811@main
1 parent b001965 commit 42a0c29

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGAnimatedLength-initial-values-expected.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.cy (r
9191
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.cy (invalid value)
9292
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.r (remove)
9393
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.r (invalid value)
94-
FAIL SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fx (remove) assert_equals: initial before expected "50%" but got "0"
95-
FAIL SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fx (invalid value) assert_equals: initial before expected "50%" but got "0"
96-
FAIL SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fy (remove) assert_equals: initial before expected "50%" but got "0"
97-
FAIL SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fy (invalid value) assert_equals: initial before expected "50%" but got "0"
94+
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fx (remove)
95+
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fx (invalid value)
96+
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fy (remove)
97+
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fy (invalid value)
9898
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fr (remove)
9999
PASS SVGAnimatedLength, initial values, SVGRadialGradientElement.prototype.fr (invalid value)
100100
PASS SVGAnimatedLength, initial values, SVGRectElement.prototype.x (remove)

Source/WebCore/svg/SVGRadialGradientElement.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class SVGRadialGradientElement final : public SVGGradientElement {
6767
Ref<SVGAnimatedLength> m_cx { SVGAnimatedLength::create(this, SVGLengthMode::Width, "50%"_s) };
6868
Ref<SVGAnimatedLength> m_cy { SVGAnimatedLength::create(this, SVGLengthMode::Height, "50%"_s) };
6969
Ref<SVGAnimatedLength> m_r { SVGAnimatedLength::create(this, SVGLengthMode::Other, "50%"_s) };
70-
Ref<SVGAnimatedLength> m_fx { SVGAnimatedLength::create(this, SVGLengthMode::Width) };
71-
Ref<SVGAnimatedLength> m_fy { SVGAnimatedLength::create(this, SVGLengthMode::Height) };
70+
Ref<SVGAnimatedLength> m_fx { SVGAnimatedLength::create(this, SVGLengthMode::Width, "50%"_s) };
71+
Ref<SVGAnimatedLength> m_fy { SVGAnimatedLength::create(this, SVGLengthMode::Height, "50%"_s) };
7272
Ref<SVGAnimatedLength> m_fr { SVGAnimatedLength::create(this, SVGLengthMode::Other, "0%"_s) };
7373
};
7474

0 commit comments

Comments
 (0)