mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00: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
Notes:
github-actions[bot]
2024-11-06 09:44:33 +00:00
Author: https://github.com/yyny Commit: https://github.com/LadybirdBrowser/ladybird/commit/90b21426580 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2093 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 0 additions and 2 deletions
|
@ -24,12 +24,10 @@ public:
|
||||||
~ComponentValue();
|
~ComponentValue();
|
||||||
|
|
||||||
bool is_block() const { return m_value.has<SimpleBlock>(); }
|
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>(); }
|
SimpleBlock const& block() const { return m_value.get<SimpleBlock>(); }
|
||||||
|
|
||||||
bool is_function() const { return m_value.has<Function>(); }
|
bool is_function() const { return m_value.has<Function>(); }
|
||||||
bool is_function(StringView name) const;
|
bool is_function(StringView name) const;
|
||||||
Function& function() { return m_value.get<Function>(); }
|
|
||||||
Function const& function() const { return m_value.get<Function>(); }
|
Function const& function() const { return m_value.get<Function>(); }
|
||||||
|
|
||||||
bool is_token() const { return m_value.has<Token>(); }
|
bool is_token() const { return m_value.has<Token>(); }
|
||||||
|
|
Loading…
Reference in a new issue