mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-04 08:01:51 +00:00
LibWeb/CSS: Limit case-insensitive default comparison to HTML attributes
The HTML spec gives us a list of HTML attributes that must have their values compared case-insensitively by default (when the attribute selector does not specify a case-sensitiveness). However, ifwe have a namespace, then we are not looking for an HTML attribute, so this should not apply. Gets us 8 more WPT subtest passes.
This commit is contained in:
parent
d9113e45f0
commit
ecdfb96a0a
Notes:
github-actions[bot]
2025-05-16 15:43:04 +00:00
Author: https://github.com/AtkinsSJ
Commit: ecdfb96a0a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4756
Reviewed-by: https://github.com/shannonbooth
2 changed files with 11 additions and 10 deletions
|
@ -303,6 +303,7 @@ static inline bool matches_attribute(CSS::Selector::SimpleSelector::Attribute co
|
|||
// See: https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors
|
||||
if (element.document().is_html_document()
|
||||
&& element.namespace_uri() == Namespace::HTML
|
||||
&& attribute.qualified_name.namespace_type == CSS::Selector::SimpleSelector::QualifiedName::NamespaceType::Default
|
||||
&& attribute_name.is_one_of(
|
||||
HTML::AttributeNames::accept, HTML::AttributeNames::accept_charset, HTML::AttributeNames::align,
|
||||
HTML::AttributeNames::alink, HTML::AttributeNames::axis, HTML::AttributeNames::bgcolor, HTML::AttributeNames::charset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue