mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Add spec steps to prescan a byte stream algorithm
Fix up the implementation as we go. Also change `ByteBuffer const&` into `ReadonlyBytes` everywhere, so we don't accidentally copy bytes.
This commit is contained in:
parent
f52632d48a
commit
b3c186ce64
Notes:
github-actions[bot]
2025-11-21 16:44:08 +00:00
Author: https://github.com/gmta
Commit: b3c186ce64
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6893
2 changed files with 124 additions and 36 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
|
||||
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
|
@ -14,9 +15,9 @@
|
|||
namespace Web::HTML {
|
||||
|
||||
Optional<StringView> extract_character_encoding_from_meta_element(ByteString const&);
|
||||
GC::Ptr<DOM::Attr> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position);
|
||||
Optional<ByteString> run_prescan_byte_stream_algorithm(DOM::Document&, ByteBuffer const& input);
|
||||
Optional<ByteString> run_bom_sniff(ByteBuffer const& input);
|
||||
ByteString run_encoding_sniffing_algorithm(DOM::Document&, ByteBuffer const& input, Optional<MimeSniff::MimeType> maybe_mime_type = {});
|
||||
GC::Ptr<DOM::Attr> prescan_get_attribute(DOM::Document&, ReadonlyBytes input, size_t& position);
|
||||
Optional<ByteString> run_prescan_byte_stream_algorithm(DOM::Document&, ReadonlyBytes input);
|
||||
Optional<ByteString> run_bom_sniff(ReadonlyBytes input);
|
||||
ByteString run_encoding_sniffing_algorithm(DOM::Document&, ReadonlyBytes input, Optional<MimeSniff::MimeType> maybe_mime_type = {});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue