mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Treat CSS selectors containing undeclared namespaces as invalid
Selectors containing undeclared namespaces should be considered invalid, not just not matching any elements. Gains us 3 new WPT passes.
This commit is contained in:
parent
5fcf3d0b05
commit
6584ae0080
Notes:
github-actions[bot]
2025-06-24 11:52:28 +00:00
Author: https://github.com/Calme1709
Commit: 6584ae0080
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5184
Reviewed-by: https://github.com/AtkinsSJ ✅
17 changed files with 157 additions and 11 deletions
|
@ -47,7 +47,7 @@ WebIDL::ExceptionOr<u32> CSSGroupingRule::insert_rule(StringView rule, u32 index
|
|||
{
|
||||
// The insertRule(rule, index) method must return the result of invoking insert a CSS rule rule into the child CSS
|
||||
// rules at index, with the nested flag set.
|
||||
TRY(m_rules->insert_a_css_rule(rule, index, CSSRuleList::Nested::Yes));
|
||||
TRY(m_rules->insert_a_css_rule(rule, index, CSSRuleList::Nested::Yes, m_parent_style_sheet->declared_namespaces()));
|
||||
|
||||
// AD-HOC: The spec doesn't say where to set the parent rule, so we'll do it here.
|
||||
m_rules->item(index)->set_parent_rule(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue