2021-05-12 05:47:12 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
|
2025-11-21 08:48:34 -03:00
|
|
|
* Copyright (c) 2025, Jelle Raaijmakers <jelle@ladybird.org>
|
2021-05-12 05:47:12 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-12-16 11:19:34 -03:00
|
|
|
#include <AK/ByteString.h>
|
2021-05-12 05:47:12 -03:00
|
|
|
#include <AK/Optional.h>
|
2024-11-14 12:01:23 -03:00
|
|
|
#include <LibGC/Ptr.h>
|
2021-10-15 10:57:07 -03:00
|
|
|
#include <LibWeb/Forward.h>
|
2025-11-26 15:32:39 -03:00
|
|
|
#include <LibWeb/MimeSniff/MimeType.h>
|
2021-05-12 05:47:12 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2023-12-16 11:19:34 -03:00
|
|
|
Optional<StringView> extract_character_encoding_from_meta_element(ByteString const&);
|
2025-11-21 08:48:34 -03:00
|
|
|
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 = {});
|
2021-05-12 05:47:12 -03:00
|
|
|
|
|
|
|
|
}
|