LibWeb: Store custom properties in an OrderedHashMap

We are expected to preserve their order within a style declaration, so
let's do that. Passes 1 tracked WPT subtest.
This commit is contained in:
Sam Atkins 2025-09-18 11:44:56 +01:00 committed by Jelle Raaijmakers
commit 95aceb6ec9
Notes: github-actions[bot] 2025-09-18 13:00:16 +00:00
11 changed files with 30 additions and 31 deletions

View file

@ -88,12 +88,12 @@ GC::Ptr<CSS::ComputedProperties const> AbstractElement::computed_properties() co
return m_element->computed_properties(m_pseudo_element);
}
HashMap<FlyString, CSS::StyleProperty> const& AbstractElement::custom_properties() const
OrderedHashMap<FlyString, CSS::StyleProperty> const& AbstractElement::custom_properties() const
{
return m_element->custom_properties(m_pseudo_element);
}
void AbstractElement::set_custom_properties(HashMap<FlyString, CSS::StyleProperty>&& custom_properties)
void AbstractElement::set_custom_properties(OrderedHashMap<FlyString, CSS::StyleProperty>&& custom_properties)
{
m_element->set_custom_properties(m_pseudo_element, move(custom_properties));
}