mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Use correct case-sensitivity when matching attribute selectors
Also removed get_attribute_with_lowercase_qualified_name because it was buggy, duplicated logic, and now unused.
This commit is contained in:
parent
a2cf1d17fd
commit
ba0cc7fe46
Notes:
github-actions[bot]
2024-11-23 08:51:33 +00:00
Author: https://github.com/Gingeh
Commit: ba0cc7fe46
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2478
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 12 additions and 29 deletions
|
@ -219,8 +219,7 @@ static inline bool matches_attribute(CSS::Selector::SimpleSelector::Attribute co
|
|||
|
||||
auto const& attribute_name = attribute.qualified_name.name.name;
|
||||
|
||||
auto const* attr = element.namespace_uri() == Namespace::HTML ? element.attributes()->get_attribute_with_lowercase_qualified_name(attribute_name)
|
||||
: element.attributes()->get_attribute(attribute_name);
|
||||
auto const* attr = element.attributes()->get_attribute(attribute_name);
|
||||
|
||||
if (attribute.match_type == CSS::Selector::SimpleSelector::Attribute::MatchType::HasAttribute) {
|
||||
// Early way out in case of an attribute existence selector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue