mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Generate pseudo-element code from JSON
Initially, this generates the enum and to/from-string functions. The JSON itself contains more data than that, but it's unused for now.
This commit is contained in:
parent
0ed2e71801
commit
ffa1dba96a
Notes:
github-actions[bot]
2025-03-24 09:51:30 +00:00
Author: https://github.com/AtkinsSJ
Commit: ffa1dba96a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4021
14 changed files with 244 additions and 106 deletions
|
@ -1401,7 +1401,7 @@ void Element::serialize_pseudo_elements_as_json(JsonArraySerializer<StringBuilde
|
|||
if (!pseudo_element)
|
||||
continue;
|
||||
auto object = MUST(children_array.add_object());
|
||||
MUST(object.add("name"sv, MUST(String::formatted("::{}", CSS::Selector::PseudoElementSelector::name(static_cast<CSS::PseudoElement>(i))))));
|
||||
MUST(object.add("name"sv, MUST(String::formatted("::{}", CSS::pseudo_element_name(static_cast<CSS::PseudoElement>(i))))));
|
||||
MUST(object.add("type"sv, "pseudo-element"));
|
||||
MUST(object.add("parent-id"sv, unique_id().value()));
|
||||
MUST(object.add("pseudo-element"sv, i));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue