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