mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
LibWeb: Implement functional pseudo-element parsing
"Functional" as in "it's a function token" and not "it works", because the behaviour for these is unimplemented. :^) This is modeled after the pseudo-class parsing, but with some changes based on things I don't like about that implementation. I've implemented the `<pt-name-selector>` parameter used by view-transitions for now, but nothing else.
This commit is contained in:
parent
5cf04a33ad
commit
88e11eea2d
Notes:
github-actions[bot]
2025-03-25 07:56:12 +00:00
Author: https://github.com/AtkinsSJ
Commit: 88e11eea2d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4063
8 changed files with 237 additions and 43 deletions
|
@ -586,7 +586,19 @@ void dump_selector(StringBuilder& builder, CSS::Selector const& selector, int in
|
|||
}
|
||||
|
||||
if (simple_selector.type == CSS::Selector::SimpleSelector::Type::PseudoElement) {
|
||||
builder.appendff(" pseudo_element={}", simple_selector.pseudo_element().name());
|
||||
auto const& pseudo_element = simple_selector.pseudo_element();
|
||||
builder.appendff(" pseudo_element={}", CSS::pseudo_element_name(pseudo_element.type()));
|
||||
auto pseudo_element_metadata = CSS::pseudo_element_metadata(pseudo_element.type());
|
||||
|
||||
switch (pseudo_element_metadata.parameter_type) {
|
||||
case CSS::PseudoElementMetadata::ParameterType::None:
|
||||
break;
|
||||
case CSS::PseudoElementMetadata::ParameterType::PTNameSelector: {
|
||||
auto const& [is_universal, value] = pseudo_element.pt_name_selector();
|
||||
builder.appendff("(is_universal={}, value='{}')", is_universal, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (simple_selector.type == CSS::Selector::SimpleSelector::Type::Attribute) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue