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:
Sam Atkins 2025-03-24 13:56:24 +00:00 committed by Andreas Kling
parent 5cf04a33ad
commit 88e11eea2d
Notes: github-actions[bot] 2025-03-25 07:56:12 +00:00
8 changed files with 237 additions and 43 deletions

View file

@ -778,7 +778,7 @@ Optional<String> KeyframeEffect::pseudo_element() const
{
if (!m_target_pseudo_selector.has_value())
return {};
return MUST(String::formatted("::{}", m_target_pseudo_selector->name()));
return m_target_pseudo_selector->serialize();
}
// https://drafts.csswg.org/web-animations-1/#dom-keyframeeffect-pseudoelement