mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-11 02:29:18 +00:00
LibWeb: Allow to pass pseudo-element type in computed properties getter
...and setter. We had lots of places where we check if pseudo-element type is specified and then use `pseudo_element_computed_properties()` or `computed_properties()`. This change moves these checks from caller side to the getter and setter.
This commit is contained in:
parent
86dc3ce001
commit
2fc405f1b2
Notes:
github-actions[bot]
2025-07-18 19:20:46 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 2fc405f1b2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5510
7 changed files with 48 additions and 70 deletions
|
@ -75,9 +75,7 @@ bool AbstractElement::is_before(AbstractElement const& other) const
|
|||
|
||||
GC::Ptr<CSS::ComputedProperties const> AbstractElement::computed_properties() const
|
||||
{
|
||||
if (m_pseudo_element.has_value())
|
||||
return m_element->pseudo_element_computed_properties(*m_pseudo_element);
|
||||
return m_element->computed_properties();
|
||||
return m_element->computed_properties(m_pseudo_element);
|
||||
}
|
||||
|
||||
HashMap<FlyString, CSS::StyleProperty> const& AbstractElement::custom_properties() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue