mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 14:09:42 +00:00
LibJS+LibWeb: Port interned bytecode strings to UTF-16
This was almost a no-op, except we intern JS exception messages. So the bulk of this patch is porting exception messages to UTF-16.
This commit is contained in:
parent
cf61171864
commit
70db474cf0
Notes:
github-actions[bot]
2025-08-14 08:28:16 +00:00
Author: https://github.com/trflynn89
Commit: 70db474cf0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5845
Reviewed-by: https://github.com/gmta ✅
162 changed files with 1405 additions and 1422 deletions
|
@ -151,7 +151,7 @@ WebIDL::ExceptionOr<GC::Ref<HTMLTableCellElement>> HTMLTableRowElement::insert_c
|
|||
|
||||
// 1. If index is less than −1 or greater than the number of elements in the cells collection, then throw an "IndexSizeError" DOMException.
|
||||
if (index < -1 || index > cells_collection_size)
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of cells"_string);
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of cells"_utf16);
|
||||
|
||||
// 2. Let table cell be the result of creating an element given this tr element's node document, "td", and the HTML namespace.
|
||||
auto& table_cell = static_cast<HTMLTableCellElement&>(*TRY(DOM::create_element(document(), HTML::TagNames::td, Namespace::HTML)));
|
||||
|
@ -176,7 +176,7 @@ WebIDL::ExceptionOr<void> HTMLTableRowElement::delete_cell(i32 index)
|
|||
|
||||
// 1. If index is less than −1 or greater than or equal to the number of elements in the cells collection, then throw an "IndexSizeError" DOMException.
|
||||
if (index < -1 || index >= cells_collection_size)
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of cells"_string);
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of cells"_utf16);
|
||||
|
||||
// 2. If index is −1, then remove the last element in the cells collection from its parent, or do nothing if the cells collection is empty.
|
||||
if (index == -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue