mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-15 21:41:58 +00:00
LibWeb: Make sure we run selectors for mixed-case tag names
Before this change, we would never apply CSS rules where the selector had a mixed-case tag name. This happened because our rule caches would key them on the lowercased tag name, but we didn't lowercase the tag name when fetching things from the cache. This uncovered the fact that the SVG2 spec has a bunch of style applied to non-rendered elements in a way that doesn't match other browsers. Instead of blindly following the spec, we now match other browsers.
This commit is contained in:
parent
61df035612
commit
b3fd939628
Notes:
github-actions[bot]
2025-07-09 12:37:53 +00:00
Author: https://github.com/awesomekling
Commit: b3fd939628
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5369
Reviewed-by: https://github.com/gmta ✅
5 changed files with 11 additions and 10 deletions
|
@ -3280,7 +3280,7 @@ void RuleCache::for_each_matching_rules(DOM::Element const& element, Optional<Ps
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (auto it = rules_by_tag_name.find(element.local_name()); it != rules_by_tag_name.end()) {
|
||||
if (auto it = rules_by_tag_name.find(element.lowercased_local_name()); it != rules_by_tag_name.end()) {
|
||||
if (callback(it->value) == IterationDecision::Break)
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue