Hi Team, While looking into 'SVGLength', I stumbled across another failing tests from Blink Commit. Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/c686b61c567b5d3be546a4e228912141155a25ca Test Case: https://jsfiddle.net/ucswaop3/show ^ Safari fails (even WebKit ToT) following: > Test unit types that don't have a corresponding IDL constant Both Chrome Canary 122 and Firefox Nightly 123 pass this test so marking this as 'BrowserCompat'. ___ Web-Spec: https://svgwg.org/svg2-draft/types.html#__svg__SVGLength__valueAsString Chrome / Blink bug title > should not throw (setter) or return "0" on "new" units. __ Although reading 'web-spec', it also expect 'emptyString', while we return nothing: https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGLengthValue.cpp#326 ExceptionOr<void> SVGLengthValue::setValueAsString(StringView string) { if (string.isEmpty()) return { }; __ Should we remove this also? __ Just wanted to raise to get input and also fix failing test case. Thanks!
https://searchfox.org/wubkat/rev/c22ca98693565713efde37e8311190dd00e165ef/Source/WebCore/svg/SVGLengthValue.cpp#326 Proper link to code, I was exploring.
<rdar://problem/120959223>
We get `SyntaxError` on failing this test case, so it could be: ExceptionOr<void> SVGLengthValue::setValueAsString(StringView string) { if (string.isEmpty()) return { }; return readCharactersForParsing(string, [&](auto buffer) -> ExceptionOr<void> { auto convertedNumber = parseNumber(buffer, SuffixSkippingPolicy::DontSkip); if (!convertedNumber) return Exception { ExceptionCode::SyntaxError }; auto lengthType = parseLengthType(buffer); if (lengthType == SVGLengthType::Unknown) return Exception { ExceptionCode::SyntaxError }; m_lengthType = lengthType; m_valueInSpecifiedUnits = *convertedNumber; return { }; }); } __ In both above `SyntaxError` area.