summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Parser/CSSParser.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-18 16:25:38 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-18 16:30:18 +0100
commitc628ebda0ff406494ec559fc913a7cb430bac785 (patch)
tree04ed6d67ef496221f4b5079248261b739bc4b352 /Libraries/LibHTML/Parser/CSSParser.cpp
parentda23864c8deb6ef999d4f5ed6cdbac30b040ec4f (diff)
downloadserenity-c628ebda0ff406494ec559fc913a7cb430bac785.zip
LibHTML: Use floating point numbers throughout the layout tree
Diffstat (limited to 'Libraries/LibHTML/Parser/CSSParser.cpp')
-rw-r--r--Libraries/LibHTML/Parser/CSSParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibHTML/Parser/CSSParser.cpp b/Libraries/LibHTML/Parser/CSSParser.cpp
index 64bca0b3fe..7e09edb579 100644
--- a/Libraries/LibHTML/Parser/CSSParser.cpp
+++ b/Libraries/LibHTML/Parser/CSSParser.cpp
@@ -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")