LibWeb: Make unknown webkit pseudo-elements safe to dump

This fixes a couple of crashes when dumping the style sheets on
ladybird.org
This commit is contained in:
Sam Atkins 2025-05-08 11:48:34 +01:00
parent 0925a32558
commit f0ce4f43a6
Notes: github-actions[bot] 2025-05-08 15:22:46 +00:00
2 changed files with 7 additions and 2 deletions

View file

@ -590,7 +590,7 @@ void dump_selector(StringBuilder& builder, CSS::Selector const& selector, int in
if (simple_selector.type == CSS::Selector::SimpleSelector::Type::PseudoElement) {
auto const& pseudo_element = simple_selector.pseudo_element();
builder.appendff(" pseudo_element={}", CSS::pseudo_element_name(pseudo_element.type()));
builder.appendff(" pseudo_element={}", pseudo_element.serialize());
auto pseudo_element_metadata = CSS::pseudo_element_metadata(pseudo_element.type());
switch (pseudo_element_metadata.parameter_type) {