mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +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:
parent
58a0ca41a7
commit
fd8c94c094
Notes:
sideshowbarker
2024-07-18 02:11:26 +09:00
Author: https://github.com/AtkinsSJ
Commit: fd8c94c094
Pull-request: https://github.com/SerenityOS/serenity/pull/10530
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue