WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
257906
<animateTransform> broken with no type attribute
https://bugs.webkit.org/show_bug.cgi?id=257906
Summary
<animateTransform> broken with no type attribute
Ahmad Saleem
Reported
2023-06-09 13:18:10 PDT
Hi Team, While going through WPT failure, came across another, where Safari / WebKit is odd one out. WPT Test Link:
https://wpt.fyi/results/svg/animations/scripted/animatetransform-type-missing-value-default.html?label=experimental&label=master&aligned
WPT Live Link:
http://wpt.live/svg/animations/scripted/animatetransform-type-missing-value-default.html
_____ Blink Commit:
https://chromium.googlesource.com/chromium/src.git/+/5351b4d9ef755bfde1e07f994197d6f7ef8317d4
____ Just wanted to raise so we can track this failure and fix it. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2023-06-15 05:29:58 PDT
https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGAnimateTransformElement.cpp
Radar WebKit Bug Importer
Comment 2
2023-06-16 13:19:16 PDT
<
rdar://problem/110915695
>
Ahmad Saleem
Comment 3
2023-07-05 08:32:03 PDT
Changing this:
https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGAnimateTransformElement.cpp#36
from: , m_type(SVGTransformValue::SVG_TRANSFORM_UNKNOWN) to: , m_type(SVGTransformValue::SVG_TRANSFORM_TRANSLATE) _____ It progress one test. While we still fail last one, still looking into it.
Ahmad Saleem
Comment 4
2023-11-13 17:11:53 PST
static SVGTransformValue parseTypeAttribute(const String& value) { if (value.isNull()) return SVGTransformValue::SVG_TRANSFORM_TRANSLATE; auto transformType = SVGTransformable::parseTransformType(value); // Since parseTransformType() is also used when parsing transform lists, it accepts the value // "matrix". That value is however not recognized by the 'type' attribute, so treat it as invalid. if (transformType == SVGTransformValue::SVG_TRANSFORM_MATRIX) transformType = SVGTransformValue::SVG_TRANSFORM_UNKNOWN; return transformType; } void SVGAnimateTransformElement::attributeChanged(const QualifiedName& name, const AtomString& oldValue, const AtomString& newValue, AttributeModificationReason attributeModificationReason) { if (name == SVGNames::typeAttr) { auto oldTransformType = m_type; m_type = SVGTransformable::parseTransformType(newValue); if (m_type != oldTransformType) animationAttributeChanged(); return; } SVGAnimateElementBase::attributeChanged(name, oldValue, newValue, attributeModificationReason); } ___ Something like this but haven't tested or compiled locally.
Ahmad Saleem
Comment 5
2024-07-04 12:04:29 PDT
static std::optional<SVGTransformValue::SVGTransformType> parseTypeAttribute(const String& value) { if (value.isNull()) return SVGTransformValue::SVG_TRANSFORM_TRANSLATE; auto transformType = SVGTransformable::parseTransformType(value); // Since parseTransformType() is also used when parsing transform lists, it accepts the value // "matrix". That value is however not recognized by the 'type' attribute, so treat it as invalid. if (transformType == SVGTransformValue::SVG_TRANSFORM_TRANSLATE) transformType = SVGTransformValue::SVG_TRANSFORM_UNKNOWN; return transformType; } void SVGAnimateTransformElement::attributeChanged(const QualifiedName& name, const AtomString& oldValue, const AtomString& newValue, AttributeModificationReason attributeModificationReason) { if (name == SVGNames::typeAttr) { auto oldTransformType = m_type; m_type = parseTypeAttribute(newValue); if (m_type != oldTransformType) animationAttributeChanged(); } SVGAnimateElementBase::attributeChanged(name, oldValue, newValue, attributeModificationReason); } __ Get following error: assigning to 'SVGTransformValue::SVGTransformType' from incompatible type 'std::optional<SVGTransformValue::SVGTransformType>' m_type = parseTypeAttribute(newValue); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug