1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

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
parent 58a0ca41a7
commit fd8c94c094

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
{