mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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
|
@ -81,6 +81,7 @@ struct ParsingParams {
|
|||
ParsingMode mode { ParsingMode::Normal };
|
||||
|
||||
Vector<RuleContext> rule_context;
|
||||
HashTable<FlyString> declared_namespaces;
|
||||
};
|
||||
|
||||
// The very large CSS Parser implementation code is broken up among several .cpp files:
|
||||
|
@ -543,6 +544,7 @@ private:
|
|||
bool context_allows_quirky_length() const;
|
||||
|
||||
Vector<RuleContext> m_rule_context;
|
||||
HashTable<FlyString> m_declared_namespaces;
|
||||
|
||||
Vector<PseudoClass> m_pseudo_class_context; // Stack of pseudo-class functions we're currently inside
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue