mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 22:19:50 +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
|
@ -110,7 +110,7 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show()
|
|||
|
||||
// 2. If this has an open attribute, then throw an "InvalidStateError" DOMException.
|
||||
if (has_attribute(AttributeNames::open))
|
||||
return WebIDL::InvalidStateError::create(realm(), "Dialog already open"_string);
|
||||
return WebIDL::InvalidStateError::create(realm(), "Dialog already open"_utf16);
|
||||
|
||||
// 3. If the result of firing an event named beforetoggle, using ToggleEvent,
|
||||
// with the cancelable attribute initialized to true, the oldState attribute initialized to "closed",
|
||||
|
@ -185,19 +185,19 @@ WebIDL::ExceptionOr<void> HTMLDialogElement::show_a_modal_dialog(HTMLDialogEleme
|
|||
|
||||
// 2. If subject has an open attribute, then throw an "InvalidStateError" DOMException.
|
||||
if (subject.has_attribute(AttributeNames::open))
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog already open"_string);
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog already open"_utf16);
|
||||
|
||||
// 3. If subject's node document is not fully active, then throw an "InvalidStateError" DOMException.
|
||||
if (!subject.document().is_fully_active())
|
||||
return WebIDL::InvalidStateError::create(realm, "Document is not fully active"_string);
|
||||
return WebIDL::InvalidStateError::create(realm, "Document is not fully active"_utf16);
|
||||
|
||||
// 4. If subject is not connected, then throw an "InvalidStateError" DOMException.
|
||||
if (!subject.is_connected())
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog not connected"_string);
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog not connected"_utf16);
|
||||
|
||||
// 5. If subject is in the popover showing state, then throw an "InvalidStateError" DOMException.
|
||||
if (subject.popover_visibility_state() == PopoverVisibilityState::Showing)
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog already open as popover"_string);
|
||||
return WebIDL::InvalidStateError::create(realm, "Dialog already open as popover"_utf16);
|
||||
|
||||
// 6. If the result of firing an event named beforetoggle, using ToggleEvent,
|
||||
// with the cancelable attribute initialized to true, the oldState attribute initialized to "closed",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue