mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibTextCodec+LibWeb: Move isomorphic coders to LibTextCodec
This will be used outside of LibWeb.
This commit is contained in:
parent
0480934afb
commit
0fd80a8f99
Notes:
github-actions[bot]
2025-11-27 13:59:06 +00:00
Author: https://github.com/trflynn89
Commit: 0fd80a8f99
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6944
Reviewed-by: https://github.com/gmta ✅
17 changed files with 65 additions and 64 deletions
|
|
@ -13,13 +13,13 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibGC/Function.h>
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
#include <LibTextCodec/Decoder.h>
|
||||
#include <LibWeb/HTML/PromiseRejectionEvent.h>
|
||||
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
||||
#include <LibWeb/HTML/StructuredSerialize.h>
|
||||
#include <LibWeb/HTML/StructuredSerializeOptions.h>
|
||||
#include <LibWeb/HTML/UniversalGlobalScope.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/WebIDL/AbstractOperations.h>
|
||||
#include <LibWeb/WebIDL/DOMException.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
|
@ -71,7 +71,7 @@ WebIDL::ExceptionOr<String> UniversalGlobalScopeMixin::atob(String const& data)
|
|||
|
||||
// 3. Return decodedData.
|
||||
// decode_base64() returns a byte buffer. LibJS uses UTF-8 for strings. Use isomorphic decoding to convert bytes to UTF-8.
|
||||
return Infra::isomorphic_decode(decoded_data.value());
|
||||
return TextCodec::isomorphic_decode(decoded_data.value());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue