mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 04:32:51 +00:00
LibHTML: Use floating point numbers throughout the layout tree
This commit is contained in:
parent
da23864c8d
commit
c628ebda0f
Notes:
sideshowbarker
2024-07-19 11:09:31 +09:00
Author: https://github.com/awesomekling
Commit: c628ebda0f
15 changed files with 59 additions and 52 deletions
|
@ -28,7 +28,7 @@ NonnullRefPtr<StyleValue> parse_css_value(const StringView& view)
|
|||
char* endptr = nullptr;
|
||||
long value = strtol(String(view).characters(), &endptr, 10);
|
||||
if (endptr && ((!*endptr) || (endptr[0] == 'p' && endptr[1] == 'x' && endptr[2] == '\0')))
|
||||
return LengthStyleValue::create(Length(value, Length::Type::Absolute));
|
||||
return LengthStyleValue::create(Length((float)value, Length::Type::Absolute));
|
||||
if (string == "inherit")
|
||||
return InheritStyleValue::create();
|
||||
if (string == "initial")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue