mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +00:00
HTMLEncodingDetection: Use mime type in encoding sniffing
Also added proper spec comments. Fixes at least one WPT test that was failing previously: https://wpt.live/encoding/single-byte-decoder.window.html?document
This commit is contained in:
parent
dae6200c1d
commit
c1a14f66ad
Notes:
github-actions[bot]
2024-10-12 14:15:30 +00:00
Author: https://github.com/0x4261756D
Commit: c1a14f66ad
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1707
3 changed files with 67 additions and 28 deletions
|
@ -19,6 +19,7 @@ bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& positi
|
|||
Optional<StringView> extract_character_encoding_from_meta_element(ByteString const&);
|
||||
JS::GCPtr<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);
|
||||
ByteString run_encoding_sniffing_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 = {});
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue