mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 18:08:15 +02:00
LibJS+LibWeb+WebContent: Port JS::PropertyKey to UTF-16
This has quite a lot of fall out. But the majority of it is just type or UDL substitution, where the changes just fall through to other function calls. By changing property key storage to UTF-16, the main affected areas are: * NativeFunction names must now be UTF-16 * Bytecode identifiers must now be UTF-16 * Module/binding names must now be UTF-16
This commit is contained in:
Notes:
github-actions[bot]
2025-08-05 11:08:30 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/0efa98a57a5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5698
@@ -118,7 +118,7 @@ Variant<GC::Ref<DOM::HTMLCollection>, GC::Ref<DOM::Element>, Empty> HTMLAllColle
|
||||
return Empty {};
|
||||
|
||||
// 2. Return the result of getting the "all"-indexed or named element(s) from this, given nameOrIndex.
|
||||
return get_the_all_indexed_or_named_elements(name_or_index.value());
|
||||
return get_the_all_indexed_or_named_elements(Utf16FlyString::from_utf8(name_or_index.value()));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-nameditem
|
||||
@@ -211,7 +211,7 @@ Variant<GC::Ref<DOM::HTMLCollection>, GC::Ref<DOM::Element>, Empty> HTMLAllColle
|
||||
}
|
||||
|
||||
// 2. Return the result of getting the "all"-named element(s) from collection given nameOrIndex.
|
||||
return get_the_all_named_elements(name_or_index.as_string());
|
||||
return get_the_all_named_elements(name_or_index.as_string().view().to_utf8_but_should_be_ported_to_utf16());
|
||||
}
|
||||
|
||||
Optional<JS::Value> HTMLAllCollection::item_value(size_t index) const
|
||||
|
||||
Reference in New Issue
Block a user