Truly independent web browser
LibWeb: Parse SVGAnimatedNumber attributes as CSS numbers
Andreas Kling4b3aa805e0cf
diff --git a/Libraries/LibWeb/Rust/src/svg/attribute_parser.rs b/Libraries/LibWeb/Rust/src/svg/attribute_parser.rsindex e7d0074987e..2190fd92f8e 100644--- a/Libraries/LibWeb/Rust/src/svg/attribute_parser.rs+++ b/Libraries/LibWeb/Rust/src/svg/attribute_parser.rs@@ -47,6 +47,31 @@ fn parse_number_percentage(input: Input<'_>) -> Option<NumberPercentage> {parser.done().then_some(NumberPercentage { value, is_percentage })}+// https://svgwg.org/svg2-draft/types.html#syntax+fn parse_number(input: Input<'_>) -> Option<f32> {+ let mut parser = Parser::new(input);+ parser.parse_whitespace();+ let value = parser.parse_css_number().ok()?;+ parser.parse_whitespace();+ parser.done().then_some(value)+}++// https://drafts.fxtf.org/filter-effects/#typedef-number-optional-number+// <number-optional-number> = <number> <number>?+fn parse_number_optional_number(input: Input<'_>) -> Option<(f32, Option<f32>)> {+ let mut parser = Parser::new(input);+ parser.parse_whitespace();+ let first = parser.parse_css_number().ok()?;+ parser.parse_whitespace();+ if parser.done() {+ return Some((first, None));+ }+ parser.parse_optional_comma_whitespace();+ let second = parser.parse_css_number().ok()?;+ parser.parse_whitespace();+ parser.done().then_some((first, Some(second)))+}+fn parse_points(input: Input<'_>) -> Vec<[f32; 2]> {let mut parser = Parser::new(input);parser.parse_whitespace();@@ -363,6 +388,31 @@ pub extern "C" fn rust_parse_svg_integer(input: FfiUtf16View<'_>, value: &mut i3true}+#[unsafe(no_mangle)]+pub extern "C" fn rust_parse_svg_number(input: FfiUtf16View<'_>, value: &mut f32) -> bool {+ let Some(parsed_value) = with_input(input, parse_number).flatten() else {+ return false;+ };+ *value = parsed_value;+ true+}++#[unsafe(no_mangle)]+pub extern "C" fn rust_parse_svg_number_optional_number(+ input: FfiUtf16View<'_>,+ first: &mut f32,+ second: &mut f32,+ has_second: &mut bool,+) -> bool {+ let Some((parsed_first, parsed_second)) = with_input(input, parse_number_optional_number).flatten() else {+ return false;+ };+ *first = parsed_first;+ *second = parsed_second.unwrap_or(0.0);+ *has_second = parsed_second.is_some();+ true+}+#[unsafe(no_mangle)]pub extern "C" fn rust_parse_svg_number_percentage(input: FfiUtf16View<'_>,@@ -509,6 +559,16 @@ mod tests {}));assert_eq!(parse_number_percentage(input("12px")), None);+ assert_eq!(parse_number(input(" +5 ")), Some(5.0));+ assert_eq!(parse_number(input(".5")), Some(0.5));+ assert_eq!(parse_number(input("5.")), None);+ assert_eq!(parse_number(input("--3")), None);+ assert_eq!(parse_number(input("3 4")), None);+ assert_eq!(parse_number(input("")), None);+ assert_eq!(parse_number_optional_number(input(" 3 ")), Some((3.0, None)));+ assert_eq!(parse_number_optional_number(input("3, 4")), Some((3.0, Some(4.0))));+ assert_eq!(parse_number_optional_number(input("3 abc")), None);+ assert_eq!(parse_number_optional_number(input("3,")), None);}#[test]diff --git a/Libraries/LibWeb/Rust/src/svg/parser.rs b/Libraries/LibWeb/Rust/src/svg/parser.rsindex b73127e51d7..04daf98388a 100644--- a/Libraries/LibWeb/Rust/src/svg/parser.rs+++ b/Libraries/LibWeb/Rust/src/svg/parser.rs@@ -122,6 +122,23 @@ impl<'a> Parser<'a> {Ok(sign * self.parse_nonnegative_number()?)}+ // https://svgwg.org/svg2-draft/types.html#syntax+ // A <number> as CSS defines it, which unlike a number in path data does not allow a dot that is not followed by a digit.+ pub(super) fn parse_css_number(&mut self) -> Result<f32, ()> {+ let start = self.position;+ let number = self.parse_number()?;+ let dot = u16::from(b'.');+ let is_digit = |unit: u16| (u16::from(b'0')..=u16::from(b'9')).contains(&unit);+ for index in start..self.position {+ if self.input.code_unit_at(index) == dot+ && (index + 1 == self.position || !is_digit(self.input.code_unit_at(index + 1)))+ {+ return Err(());+ }+ }+ Ok(number)+ }+// https://www.w3.org/TR/SVG11/paths.html#PathDataBNFpub(super) fn parse_nonnegative_number(&mut self) -> Result<f32, ()> {let starts_with_digit = self.current_ascii().is_some_and(|unit| unit.is_ascii_digit());diff --git a/Libraries/LibWeb/SVG/AttributeParsing.cpp b/Libraries/LibWeb/SVG/AttributeParsing.cppindex 18b132e7c6f..0d4440438a6 100644--- a/Libraries/LibWeb/SVG/AttributeParsing.cpp+++ b/Libraries/LibWeb/SVG/AttributeParsing.cpp@@ -38,6 +38,24 @@ float NumberPercentage::resolve_relative_to(float length) constreturn m_value * length;}+Optional<float> parse_number(Utf16View input)+{+ float value;+ if (!RustFFI::rust_parse_svg_number(ffi_svg_input(input), &value))+ return {};+ return value;+}++Optional<NumberOptionalNumber> parse_number_optional_number(Utf16View input)+{+ float first;+ float second;+ bool has_second;+ if (!RustFFI::rust_parse_svg_number_optional_number(ffi_svg_input(input), &first, &second, &has_second))+ return {};+ return NumberOptionalNumber { first, has_second ? Optional<float> { second } : OptionalNone {} };+}+Optional<NumberPercentage> parse_number_percentage(Utf16View input){float value;diff --git a/Libraries/LibWeb/SVG/AttributeParsing.h b/Libraries/LibWeb/SVG/AttributeParsing.hindex 6839df6aaf1..e0f920b986e 100644--- a/Libraries/LibWeb/SVG/AttributeParsing.h+++ b/Libraries/LibWeb/SVG/AttributeParsing.h@@ -122,6 +122,14 @@ private:};WEB_API Optional<i32> parse_integer(Utf16View);+WEB_API Optional<float> parse_number(Utf16View);++struct NumberOptionalNumber {+ float first { 0 };+ Optional<float> second;+};+WEB_API Optional<NumberOptionalNumber> parse_number_optional_number(Utf16View);+WEB_API Optional<NumberPercentage> parse_number_percentage(Utf16View);WEB_API Vector<Gfx::FloatPoint> parse_points(Utf16View);WEB_API Optional<Vector<Transform>> parse_transform(Utf16View);diff --git a/Libraries/LibWeb/SVG/SVGAnimatedNumber.cpp b/Libraries/LibWeb/SVG/SVGAnimatedNumber.cppindex c1079a5fec5..9188eb7c4d6 100644--- a/Libraries/LibWeb/SVG/SVGAnimatedNumber.cpp+++ b/Libraries/LibWeb/SVG/SVGAnimatedNumber.cpp@@ -18,10 +18,11 @@ GC::Ref<SVGAnimatedNumber> SVGAnimatedNumber::create(DOM::QualifiedName reflected_attribute,float initial_value,SupportsSecondValue supports_second_value,- ValueRepresented value_represented)+ ValueRepresented value_represented,+ AcceptsPercentage accepts_percentage){return GC::Heap::the().allocate<SVGAnimatedNumber>(element, move(reflected_attribute), initial_value,- supports_second_value, value_represented);+ supports_second_value, value_represented, accepts_percentage);}SVGAnimatedNumber::SVGAnimatedNumber(@@ -29,12 +30,14 @@ SVGAnimatedNumber::SVGAnimatedNumber(DOM::QualifiedName reflected_attribute,float initial_value,SupportsSecondValue supports_second_value,- ValueRepresented value_represented)+ ValueRepresented value_represented,+ AcceptsPercentage accepts_percentage): m_element(element), m_reflected_attribute(move(reflected_attribute)), m_initial_value(initial_value), m_supports_second_value(supports_second_value), m_value_represented(value_represented)+ , m_accepts_percentage(accepts_percentage){}@@ -60,19 +63,17 @@ void SVGAnimatedNumber::set_base_val(float new_value)if (m_supports_second_value == SupportsSecondValue::Yes) {// 1. Let current be the value of the reflected attribute (using the attribute's initial value if it is not// present or invalid).- auto current = m_element->get_attribute_value(m_reflected_attribute.local_name(), m_reflected_attribute.namespace_());- auto current_values = current.split_view(' ', SplitBehavior::Nothing);+ auto current = parse_number_optional_number(m_element->get_attribute_value(m_reflected_attribute.local_name(), m_reflected_attribute.namespace_()))+ .value_or({ m_initial_value, {} });// 2. Let first be the first number in current.- auto first = current_values.size() > 0 ? parse_value_or_initial(current_values[0]) : m_initial_value;+ auto first = current.first;// 3. Let second be the second number in current if it has been explicitly specified, and if not, the implicit// value as described in the definition of the attribute.// NB: All known usages of <number-optional-number> specify that a missing second number defaults to the value// of the first number.- auto second = current_values.size() > 1 && !current_values[1].is_empty()- ? parse_value_or_initial(current_values[1])- : first;+ auto second = current.second.value_or(first);// 4. If this SVGAnimatedNumber object reflects the first number, then set first to value. Otherwise, set second// to value.@@ -110,10 +111,12 @@ float SVGAnimatedNumber::anim_val() constfloat SVGAnimatedNumber::parse_value_or_initial(Utf16View number_value) const{- auto value = parse_number_percentage(number_value);- if (!value.has_value())+ if (m_accepts_percentage == AcceptsPercentage::Yes) {+ if (auto value = parse_number_percentage(number_value); value.has_value())+ return value->value();return m_initial_value;- return value.release_value().value();+ }+ return parse_number(number_value).value_or(m_initial_value);}// https://svgwg.org/svg2-draft/types.html#__svg__SVGAnimatedNumber__baseVal@@ -125,12 +128,14 @@ float SVGAnimatedNumber::get_base_or_anim_value() const// 2. If the reflected attribute is defined to take an number followed by an optional second number, then:if (m_supports_second_value == SupportsSecondValue::Yes) {- // 1. If this SVGAnimatedNumber object reflects the first number, then return the first value in value.- auto values = value.split_view(' ', SplitBehavior::Nothing);- if (values.is_empty())+ // NB: A value that does not parse as a whole is invalid, so both numbers take the initial value.+ auto values = parse_number_optional_number(value);+ if (!values.has_value())return m_initial_value;++ // 1. If this SVGAnimatedNumber object reflects the first number, then return the first value in value.if (m_value_represented == ValueRepresented::First)- return parse_value_or_initial(values[0]);+ return values->first;// 2. Otherwise, this SVGAnimatedNumber object reflects the second number. Return the second value in value if// it has been explicitly specified, and if not, return the implicit value as described in the definition of@@ -138,9 +143,7 @@ float SVGAnimatedNumber::get_base_or_anim_value() const// NB: All known usages of <number-optional-number> specify that a missing second number defaults to the value// of the first number.VERIFY(m_value_represented == ValueRepresented::Second);- if (values.size() > 1 && !values[1].is_empty())- return parse_value_or_initial(values[1]);- return parse_value_or_initial(values[0]);+ return values->second.value_or(values->first);}// 3. Otherwise, the reflected attribute is defined to take a single number value. Return value.diff --git a/Libraries/LibWeb/SVG/SVGAnimatedNumber.h b/Libraries/LibWeb/SVG/SVGAnimatedNumber.hindex 4c3de64ddc0..28952ed5fb5 100644--- a/Libraries/LibWeb/SVG/SVGAnimatedNumber.h+++ b/Libraries/LibWeb/SVG/SVGAnimatedNumber.h@@ -28,12 +28,18 @@ public:Second,};+ enum class AcceptsPercentage : u8 {+ Yes,+ No,+ };+[[nodiscard]] static GC::Ref<SVGAnimatedNumber> create(GC::Ref<SVGElement>,DOM::QualifiedName reflected_attribute,float initial_value,SupportsSecondValue = SupportsSecondValue::No,- ValueRepresented = ValueRepresented::First);+ ValueRepresented = ValueRepresented::First,+ AcceptsPercentage = AcceptsPercentage::No);virtual ~SVGAnimatedNumber() override;float base_val() const;@@ -42,7 +48,7 @@ public:float anim_val() const;private:- SVGAnimatedNumber(GC::Ref<SVGElement>, DOM::QualifiedName, float, SupportsSecondValue, ValueRepresented);+ SVGAnimatedNumber(GC::Ref<SVGElement>, DOM::QualifiedName, float, SupportsSecondValue, ValueRepresented, AcceptsPercentage);virtual void visit_edges(GC::Cell::Visitor&) override;@@ -54,6 +60,7 @@ private:float m_initial_value;SupportsSecondValue m_supports_second_value;ValueRepresented m_value_represented;+ AcceptsPercentage m_accepts_percentage;};}diff --git a/Libraries/LibWeb/SVG/SVGStopElement.cpp b/Libraries/LibWeb/SVG/SVGStopElement.cppindex 1a00f70f9e0..6f55ee592b7 100644--- a/Libraries/LibWeb/SVG/SVGStopElement.cpp+++ b/Libraries/LibWeb/SVG/SVGStopElement.cpp@@ -37,7 +37,8 @@ float SVGStopElement::stop_opacity() constGC::Ref<SVGAnimatedNumber> SVGStopElement::offset(){if (!m_stop_offset)- m_stop_offset = SVGAnimatedNumber::create(*this, DOM::QualifiedName { AttributeNames::offset, OptionalNone {}, OptionalNone {} }, 0.f);+ m_stop_offset = SVGAnimatedNumber::create(*this, DOM::QualifiedName { AttributeNames::offset, OptionalNone {}, OptionalNone {} }, 0.f,+ SVGAnimatedNumber::SupportsSecondValue::No, SVGAnimatedNumber::ValueRepresented::First, SVGAnimatedNumber::AcceptsPercentage::Yes);return *m_stop_offset;}diff --git a/Tests/LibWeb/Text/expected/SVG/svg-feGaussianBlur-stdDeviation.txt b/Tests/LibWeb/Text/expected/SVG/svg-feGaussianBlur-stdDeviation.txtindex bc5b6dccb71..a17e2d0f727 100644--- a/Tests/LibWeb/Text/expected/SVG/svg-feGaussianBlur-stdDeviation.txt+++ b/Tests/LibWeb/Text/expected/SVG/svg-feGaussianBlur-stdDeviation.txt@@ -2,7 +2,7 @@ gb1 stdDeviationX: 125 stdDeviationY: 125gb2 stdDeviationX: 50 stdDeviationY: 100.0999984741211gb3 stdDeviationX: 0 stdDeviationY: 0gb4 stdDeviationX: 0 stdDeviationY: 0-gb5 stdDeviationX: 1 stdDeviationY: 2+gb5 stdDeviationX: 0 stdDeviationY: 0gm stdDeviationX: 50 stdDeviationY: 0gm stdDeviationX: 50 stdDeviationY: 3gm stdDeviationX: 2 stdDeviationY: 0diff --git a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txt b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txtindex e7456ec57e4..c6dbb6f615b 100644--- a/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/svg/types/scripted/SVGAnimatedNumber-invalid-values.txt@@ -2,15 +2,15 @@ Harness status: OKFound 100 tests-71 Pass-29 Fail+88 Pass+12 FailPass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (spaces around the value)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (newlines around the value)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (tabs around the value)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (empty string)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (unit suffix)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (trailing junk)-Fail SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (trailing dot)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (two signs)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (lone sign)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.slope (content attribute is not rewritten)@@ -22,7 +22,7 @@ Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.protPass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (empty string)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (unit suffix)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (trailing junk)-Fail SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (trailing dot)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (two signs)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (lone sign)Pass SVGAnimatedNumber, invalid values, SVGComponentTransferFunctionElement.prototype.intercept (content attribute is not rewritten)@@ -34,7 +34,7 @@ Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (tabPass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (empty string)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (unit suffix)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (trailing junk)-Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (trailing dot)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (two signs)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (lone sign)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.dx (content attribute is not rewritten)@@ -58,7 +58,7 @@ Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLengthPass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (empty string)Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (unit suffix)Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (trailing junk)-Fail SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (trailing dot)Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (two signs)Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (lone sign)Pass SVGAnimatedNumber, invalid values, SVGGeometryElement.prototype.pathLength (content attribute is not rewritten)@@ -70,7 +70,7 @@ Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (tabsPass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (empty string)Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (unit suffix)Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (trailing junk)-Fail SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (trailing dot)+Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (trailing dot)Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (two signs)Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (lone sign)Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (content attribute is not rewritten)@@ -78,29 +78,29 @@ Pass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (a sePass SVGAnimatedNumber, invalid values, SVGFECompositeElement.prototype.k2 (accepted number syntax)Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (one number, surrounded by whitespace)Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (two numbers, surrounded by whitespace)-Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3,4")-Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3, 4")-Fail SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3,4")+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (comma separated, "3, 4")+Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "3 abc")Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "3px")Pass SVGAnimatedNumber, invalid values, SVGFEGaussianBlurElement.prototype.stdDeviation (both revert, "")Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (one number, surrounded by whitespace)Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (two numbers, surrounded by whitespace)-Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3,4")-Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3, 4")-Fail SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3,4")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (comma separated, "3, 4")+Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "3 abc")Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "3px")Pass SVGAnimatedNumber, invalid values, SVGFEDropShadowElement.prototype.stdDeviation (both revert, "")Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (one number, surrounded by whitespace)Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (two numbers, surrounded by whitespace)-Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3,4")-Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3, 4")-Fail SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3,4")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (comma separated, "3, 4")+Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "3 abc")Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "3px")Pass SVGAnimatedNumber, invalid values, SVGFEMorphologyElement.prototype.radius (both revert, "")Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (one number, surrounded by whitespace)Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (two numbers, surrounded by whitespace)-Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3,4")-Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3, 4")-Fail SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "3 abc")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3,4")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (comma separated, "3, 4")+Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "3 abc")Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "3px")Pass SVGAnimatedNumber, invalid values, SVGFETurbulenceElement.prototype.baseFrequency (both revert, "")\ No newline at end of file