mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
AK+Everywhere: Remove now-unecessary use of ByteString with JSON types
This removes JsonObject::get_byte_string and JsonObject::to_byte_string.
This commit is contained in:
parent
4791ec35bf
commit
2c03de60da
Notes:
github-actions[bot]
2025-02-21 00:28:59 +00:00
Author: https://github.com/trflynn89
Commit: 2c03de60da
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3631
Reviewed-by: https://github.com/awesomekling ✅
17 changed files with 67 additions and 86 deletions
|
@ -149,14 +149,14 @@ PseudoClassMetadata pseudo_class_metadata(PseudoClass pseudo_class)
|
|||
pseudo_classes_data.for_each_member([&](auto& name, JsonValue const& value) {
|
||||
auto member_generator = generator.fork();
|
||||
auto& pseudo_class = value.as_object();
|
||||
auto argument_string = pseudo_class.get_byte_string("argument"sv).value();
|
||||
auto argument_string = pseudo_class.get_string("argument"sv).value();
|
||||
|
||||
bool is_valid_as_identifier = argument_string.is_empty();
|
||||
bool is_valid_as_function = !argument_string.is_empty();
|
||||
|
||||
if (argument_string.ends_with('?')) {
|
||||
is_valid_as_identifier = true;
|
||||
argument_string = argument_string.substring(0, argument_string.length() - 1);
|
||||
argument_string = MUST(argument_string.substring_from_byte_offset(0, argument_string.byte_count() - 1));
|
||||
}
|
||||
|
||||
String parameter_type = "None"_string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue