mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibWeb: Allow floating point values when parsing SVG viewboxes
This commit is contained in:
parent
f753a4f640
commit
ba7383d28f
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/ba7383d28f Pull-request: https://github.com/SerenityOS/serenity/pull/18271
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue