2021-05-12 10:47:12 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Optional.h>
|
|
|
|
#include <AK/String.h>
|
2021-10-15 09:57:07 -04:00
|
|
|
#include <LibWeb/Forward.h>
|
2021-05-12 10:47:12 +02:00
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
|
|
bool prescan_should_abort(const ByteBuffer& input, const size_t& position);
|
|
|
|
bool prescan_is_whitespace_or_slash(const u8& byte);
|
|
|
|
bool prescan_skip_whitespace_and_slashes(const ByteBuffer& input, size_t& position);
|
2022-03-21 00:09:28 +01:00
|
|
|
Optional<StringView> extract_character_encoding_from_meta_element(String const&);
|
2021-10-15 09:57:07 -04:00
|
|
|
RefPtr<DOM::Attribute> prescan_get_attribute(DOM::Document&, const ByteBuffer& input, size_t& position);
|
|
|
|
Optional<String> run_prescan_byte_stream_algorithm(DOM::Document&, const ByteBuffer& input);
|
|
|
|
String run_encoding_sniffing_algorithm(DOM::Document&, const ByteBuffer& input);
|
2021-05-12 10:47:12 +02:00
|
|
|
|
|
|
|
}
|