mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Make CSS::Parser::ComponentValue immutable
`ComponentValue` instances are never mutated, so let's make them immutable to indicate that they could potentially be cached in the future.
This commit is contained in:
parent
138135e0e6
commit
90b2142658
|
|
@ -24,12 +24,10 @@ public:
|
|||
~ComponentValue();
|
||||
|
||||
bool is_block() const { return m_value.has<SimpleBlock>(); }
|
||||
SimpleBlock& block() { return m_value.get<SimpleBlock>(); }
|
||||
SimpleBlock const& block() const { return m_value.get<SimpleBlock>(); }
|
||||
|
||||
bool is_function() const { return m_value.has<Function>(); }
|
||||
bool is_function(StringView name) const;
|
||||
Function& function() { return m_value.get<Function>(); }
|
||||
Function const& function() const { return m_value.get<Function>(); }
|
||||
|
||||
bool is_token() const { return m_value.has<Token>(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user