From fd8c94c09469ffbef7c42d08b0ce0605ddd0b8d7 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 18 Oct 2021 15:26:56 +0100 Subject: [PATCH] LibWeb: Make 'auto' LengthStyleValues return 'auto' identifier I think I broke this in my previous StyleValue clean-up. This prevented properties like `foo: auto;` from parsing, if they did not accept Lengths. --- Userland/Libraries/LibWeb/CSS/StyleValue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index a8e8e16c98..fc0f976315 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -955,8 +955,10 @@ public: virtual bool has_auto() const override { return m_length.is_auto(); } virtual bool has_length() const override { return true; } + virtual bool has_identifier() const override { return has_auto(); } virtual String to_string() const override { return m_length.to_string(); } virtual Length to_length() const override { return m_length; } + virtual ValueID to_identifier() const override { return has_auto() ? ValueID::Auto : ValueID::Invalid; } virtual bool equals(StyleValue const& other) const override {