diff options
author | MacDue <macdue@dueutil.tech> | 2023-04-10 12:38:24 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-12 07:40:22 +0200 |
commit | ba7383d28ff6431d65485fd38c136da26c25c029 (patch) | |
tree | 9d90623fc19055d77756a1916fb44b1611ca2c4f | |
parent | f753a4f64049cb9af7bb33f5c20788e339a1cdec (diff) | |
download | serenity-ba7383d28ff6431d65485fd38c136da26c25c029.zip |
LibWeb: Allow floating point values when parsing SVG viewboxes
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/ViewBox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ViewBox> 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) { |