From ba7383d28ff6431d65485fd38c136da26c25c029 Mon Sep 17 00:00:00 2001 From: MacDue Date: Mon, 10 Apr 2023 12:38:24 +0100 Subject: LibWeb: Allow floating point values when parsing SVG viewboxes --- Userland/Libraries/LibWeb/SVG/ViewBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/SVG/ViewBox.cpp b/Userland/Libraries/LibWeb/SVG/ViewBox.cpp index 844f4ae07b..2b948fe4f6 100644 --- a/Userland/Libraries/LibWeb/SVG/ViewBox.cpp +++ b/Userland/Libraries/LibWeb/SVG/ViewBox.cpp @@ -30,7 +30,7 @@ Optional try_parse_view_box(StringView string) while (!lexer.is_eof()) { lexer.consume_while([](auto ch) { return is_ascii_space(ch); }); auto token = lexer.consume_until([](auto ch) { return is_ascii_space(ch) && ch != ','; }); - auto maybe_number = token.to_int(); + auto maybe_number = token.to_float(); if (!maybe_number.has_value()) return {}; switch (state) { -- cgit v1.2.3