summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-06-01 17:27:18 +0100
committerAndreas Kling <kling@serenityos.org>2023-06-01 21:04:21 +0200
commit7ce4cbfe1d6a3c5cf6dcc6d1059a0a9f8beb4a82 (patch)
treed8e3d604bec5ef62cd75089efab6a618fa8f07da /Userland
parent8889635ba7006114f32b620b0e45c52140cc462d (diff)
downloadserenity-7ce4cbfe1d6a3c5cf6dcc6d1059a0a9f8beb4a82.zip
LibWeb: Convert NumberStyleValue from float to double
We have double precision in the parser, and currently use doubles for most of layout, so we might as well keep that extra precision inside NumberStyleValue too.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/NumberStyleValue.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/NumberStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/NumberStyleValue.h
index 08464947fb..c04c4ff8fc 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/NumberStyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/NumberStyleValue.h
@@ -15,25 +15,25 @@ namespace Web::CSS {
class NumberStyleValue : public StyleValueWithDefaultOperators<NumberStyleValue> {
public:
- static ErrorOr<ValueComparingNonnullRefPtr<NumberStyleValue>> create(float value)
+ static ErrorOr<ValueComparingNonnullRefPtr<NumberStyleValue>> create(double value)
{
return adopt_nonnull_ref_or_enomem(new (nothrow) NumberStyleValue(value));
}
- float number() const { return m_value; }
+ double number() const { return m_value; }
virtual ErrorOr<String> to_string() const override;
bool properties_equal(NumberStyleValue const& other) const { return m_value == other.m_value; }
private:
- explicit NumberStyleValue(float value)
+ explicit NumberStyleValue(double value)
: StyleValueWithDefaultOperators(Type::Number)
, m_value(value)
{
}
- float m_value { 0 };
+ double m_value { 0 };
};
}