mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb/CSS: Allow Selector::absolutized() to return null
It's possible for absolutizing a selector to return an invalid selector (eg, it could cause `:has()` inside `:has()`) so we need to be able to express that.
This commit is contained in:
parent
3a43fa9e35
commit
da31c10ce1
Notes:
github-actions[bot]
2024-11-14 19:08:23 +00:00
Author: https://github.com/AtkinsSJ
Commit: da31c10ce1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2340
3 changed files with 31 additions and 14 deletions
|
@ -222,7 +222,7 @@ public:
|
|||
|
||||
String serialize() const;
|
||||
|
||||
SimpleSelector absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
Optional<SimpleSelector> absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
};
|
||||
|
||||
enum class Combinator {
|
||||
|
@ -240,7 +240,7 @@ public:
|
|||
Combinator combinator { Combinator::None };
|
||||
Vector<SimpleSelector> simple_selectors;
|
||||
|
||||
CompoundSelector absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
Optional<CompoundSelector> absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
};
|
||||
|
||||
static NonnullRefPtr<Selector> create(Vector<CompoundSelector>&& compound_selectors)
|
||||
|
@ -254,7 +254,7 @@ public:
|
|||
Optional<PseudoElement> const& pseudo_element() const { return m_pseudo_element; }
|
||||
NonnullRefPtr<Selector> relative_to(SimpleSelector const&) const;
|
||||
bool contains_the_nesting_selector() const { return m_contains_the_nesting_selector; }
|
||||
NonnullRefPtr<Selector> absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
RefPtr<Selector> absolutized(SimpleSelector const& selector_for_nesting) const;
|
||||
u32 specificity() const;
|
||||
String serialize() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue