diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h index 59e6b86063..c435454f80 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/NumericStyleValue.h @@ -25,11 +25,10 @@ public: return adopt_nonnull_ref_or_enomem(new (nothrow) NumericStyleValue(value)); } - virtual bool has_length() const override { return to_number() == 0; } + virtual bool has_length() const override { return number() == 0; } virtual Length to_length() const override { return Length::make_px(0); } - virtual bool has_number() const override { return true; } - virtual float to_number() const override + float number() const { return m_value.visit( [](float value) { return value; }, |