mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb/CSS: Parse the ::slotted pseudo-element
This commit is contained in:
parent
0151a088ad
commit
9054ff29f0
Notes:
github-actions[bot]
2025-07-15 12:55:25 +00:00
Author: https://github.com/shannonbooth
Commit: 9054ff29f0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5414
Reviewed-by: https://github.com/AtkinsSJ ✅
10 changed files with 141 additions and 21 deletions
|
@ -31,7 +31,7 @@ public:
|
|||
FlyString value {};
|
||||
};
|
||||
|
||||
using Value = Variant<Empty, PTNameSelector>;
|
||||
using Value = Variant<Empty, PTNameSelector, NonnullRefPtr<Selector>>;
|
||||
|
||||
explicit PseudoElementSelector(PseudoElement type, Value value = {})
|
||||
: m_type(type)
|
||||
|
@ -60,10 +60,13 @@ public:
|
|||
|
||||
PTNameSelector const& pt_name_selector() const { return m_value.get<PTNameSelector>(); }
|
||||
|
||||
// NOTE: This can't (currently) be a CompoundSelector due to cyclic dependencies.
|
||||
Selector const& compound_selector() const { return m_value.get<NonnullRefPtr<Selector>>(); }
|
||||
|
||||
private:
|
||||
PseudoElement m_type;
|
||||
String m_name;
|
||||
Variant<Empty, PTNameSelector> m_value;
|
||||
Value m_value;
|
||||
};
|
||||
|
||||
struct SimpleSelector {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue