LibWeb/CSS: Parse the ::slotted pseudo-element

This commit is contained in:
Shannon Booth 2025-07-12 16:15:06 +12:00 committed by Sam Atkins
parent 0151a088ad
commit 9054ff29f0
Notes: github-actions[bot] 2025-07-15 12:55:25 +00:00
10 changed files with 141 additions and 21 deletions

View file

@ -1286,7 +1286,8 @@ GC::Ref<CSS::CSSStyleDeclaration> Window::get_computed_style(DOM::Element& eleme
auto type = parse_pseudo_element_selector(CSS::Parser::ParsingParams(associated_document()), pseudo_element.value());
// 2. If type is failure, or is a ::slotted() or ::part() pseudo-element, let obj be null.
if (!type.has_value()) {
// FIXME: Handle ::part() here too when we support it.
if (!type.has_value() || type.value().type() == CSS::PseudoElement::Slotted) {
object = {};
}
// 3. Otherwise let obj be the given pseudo-element of elt.