mirror of
https://github.com/RGBCube/serenity
synced 2025-06-29 01:22:11 +00:00
LibWeb: Tokenize CSS numbers as doubles
Every later stage uses doubles, so dropping that precision right at the start of parsing is a little silly. :^)
This commit is contained in:
parent
c20df751c9
commit
1a5533e528
2 changed files with 3 additions and 3 deletions
|
@ -574,11 +574,11 @@ Number Tokenizer::consume_a_number()
|
|||
}
|
||||
|
||||
// https://www.w3.org/TR/css-syntax-3/#convert-string-to-number
|
||||
float Tokenizer::convert_a_string_to_a_number(StringView string)
|
||||
double Tokenizer::convert_a_string_to_a_number(StringView string)
|
||||
{
|
||||
// FIXME: We already found the whole part, fraction part and exponent during
|
||||
// validation, we could probably skip
|
||||
return string.to_float(AK::TrimWhitespace::No).release_value();
|
||||
return string.to_double(AK::TrimWhitespace::No).release_value();
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/css-syntax-3/#consume-name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue