diff --git a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp index d8ba575232..c6887f89bd 100644 --- a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp +++ b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp @@ -96,6 +96,15 @@ ErrorOr process_blob_parts(Vector const& blob_parts, Optio return bytes; } +bool is_basic_latin(StringView view) +{ + for (auto code_point : view) { + if (code_point < 0x0020 || code_point > 0x007E) + return false; + } + return true; +} + Blob::Blob(ByteBuffer byte_buffer, String type) : m_byte_buffer(move(byte_buffer)) , m_type(move(type)) diff --git a/Userland/Libraries/LibWeb/FileAPI/Blob.h b/Userland/Libraries/LibWeb/FileAPI/Blob.h index 4bd8a56864..b9ff185a54 100644 --- a/Userland/Libraries/LibWeb/FileAPI/Blob.h +++ b/Userland/Libraries/LibWeb/FileAPI/Blob.h @@ -28,6 +28,7 @@ struct BlobPropertyBag { [[nodiscard]] ErrorOr convert_line_endings_to_native(String const& string); [[nodiscard]] ErrorOr process_blob_parts(Vector const& blob_parts, Optional const& options = {}); +[[nodiscard]] bool is_basic_latin(StringView view); class Blob : public RefCounted diff --git a/Userland/Libraries/LibWeb/FileAPI/File.cpp b/Userland/Libraries/LibWeb/FileAPI/File.cpp index 9548f3f7a7..4498789aef 100644 --- a/Userland/Libraries/LibWeb/FileAPI/File.cpp +++ b/Userland/Libraries/LibWeb/FileAPI/File.cpp @@ -8,15 +8,6 @@ namespace Web::FileAPI { -static bool is_basic_latin(StringView view) -{ - for (auto code_point : view) { - if (code_point < 0x0020 || code_point > 0x007E) - return false; - } - return true; -} - File::File(ByteBuffer byte_buffer, String file_name, String type, i64 last_modified) : Blob(move(byte_buffer), move(type)) , m_name(move(file_name))