mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibWeb: Handle endings member of options being "native"
This patch passes the options argument to process_blob_parts() and makes use of the "convert line endings to native" algorithm when the endings member of options (BlobPropertyBag) is set to "native".
This commit is contained in:
parent
516ea4d758
commit
bbd9490683
3 changed files with 9 additions and 7 deletions
|
@ -28,7 +28,7 @@ File::File(ByteBuffer byte_buffer, String file_name, String type, i64 last_modif
|
|||
DOM::ExceptionOr<NonnullRefPtr<File>> File::create(Vector<BlobPart> const& file_bits, String const& file_name, Optional<FilePropertyBag> const& options)
|
||||
{
|
||||
// 1. Let bytes be the result of processing blob parts given fileBits and options.
|
||||
auto bytes = TRY_OR_RETURN_OOM(process_blob_parts(file_bits));
|
||||
auto bytes = TRY_OR_RETURN_OOM(process_blob_parts(file_bits, static_cast<Optional<BlobPropertyBag> const&>(*options)));
|
||||
|
||||
// 2. Let n be the fileName argument to the constructor.
|
||||
// NOTE: Underlying OS filesystems use differing conventions for file name; with constructed files, mandating UTF-16 lessens ambiquity when file names are converted to byte sequences.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue