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.
This commit is contained in:
Sam Atkins 2021-10-18 15:26:56 +01:00 committed by Andreas Kling
commit fd8c94c094
Notes: sideshowbarker 2024-07-18 02:11:26 +09:00

View file

@ -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
{