diff --git a/Tests/LibWeb/Layout/expected/svg/svg-negative-elliptical-arg-number.txt b/Tests/LibWeb/Layout/expected/svg/svg-negative-elliptical-arg-number.txt new file mode 100644 index 0000000000..ec27a54b6c --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/svg-negative-elliptical-arg-number.txt @@ -0,0 +1,7 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x116 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x100 children: inline + line 0 width: 100, height: 100, bottom: 100, baseline: 48 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] + SVGSVGBox at (8,8) content-size 100x100 [SVG] children: not-inline + SVGGeometryBox at (8,9.999999) content-size 100x48 children: not-inline diff --git a/Tests/LibWeb/Layout/input/svg/svg-negative-elliptical-arg-number.html b/Tests/LibWeb/Layout/input/svg/svg-negative-elliptical-arg-number.html new file mode 100644 index 0000000000..436c375015 --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg/svg-negative-elliptical-arg-number.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp b/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp index 9649eb38e7..eb111fbb75 100644 --- a/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp +++ b/Userland/Libraries/LibWeb/SVG/AttributeParser.cpp @@ -343,10 +343,10 @@ Vector AttributeParser::parse_coordinate_pair_triplet() Vector AttributeParser::parse_elliptical_arg_argument() { Vector numbers; - numbers.append(parse_nonnegative_number()); + numbers.append(parse_number()); if (match_comma_whitespace()) parse_comma_whitespace(); - numbers.append(parse_nonnegative_number()); + numbers.append(parse_number()); if (match_comma_whitespace()) parse_comma_whitespace(); numbers.append(parse_number());