LibWeb/CSS: Use case insensitive tag and attribute name in ancestor hash

Fixes #4793.
This commit is contained in:
Veeti Paananen 2025-05-18 07:27:01 +03:00 committed by Alexander Kalenik
commit 7c4fd9f624
Notes: github-actions[bot] 2025-05-21 12:55:41 +00:00
6 changed files with 18 additions and 5 deletions

View file

@ -3212,13 +3212,13 @@ void StyleComputer::compute_math_depth(ComputedProperties& style, DOM::Element c
static void for_each_element_hash(DOM::Element const& element, auto callback)
{
callback(element.local_name().hash());
callback(element.local_name().ascii_case_insensitive_hash());
if (element.id().has_value())
callback(element.id().value().hash());
for (auto const& class_ : element.class_names())
callback(class_.hash());
element.for_each_attribute([&](auto& attribute) {
callback(attribute.local_name().hash());
callback(attribute.lowercase_name().hash());
});
}