2021-05-12 05:47:12 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-12-04 15:02:33 -03:00
|
|
|
#include <AK/DeprecatedString.h>
|
2021-05-12 05:47:12 -03:00
|
|
|
#include <AK/Optional.h>
|
2022-09-13 12:42:39 -03:00
|
|
|
#include <LibJS/Heap/GCPtr.h>
|
2021-10-15 10:57:07 -03:00
|
|
|
#include <LibWeb/Forward.h>
|
2021-05-12 05:47:12 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2022-04-01 14:58:27 -03:00
|
|
|
bool prescan_should_abort(ByteBuffer const& input, size_t const& position);
|
|
|
|
|
bool prescan_is_whitespace_or_slash(u8 const& byte);
|
|
|
|
|
bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& position);
|
2022-12-04 15:02:33 -03:00
|
|
|
Optional<StringView> extract_character_encoding_from_meta_element(DeprecatedString const&);
|
2022-09-17 20:03:58 -03:00
|
|
|
JS::GCPtr<DOM::Attr> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position);
|
2022-12-04 15:02:33 -03:00
|
|
|
Optional<DeprecatedString> run_prescan_byte_stream_algorithm(DOM::Document&, ByteBuffer const& input);
|
|
|
|
|
DeprecatedString run_encoding_sniffing_algorithm(DOM::Document&, ByteBuffer const& input);
|
2021-05-12 05:47:12 -03:00
|
|
|
|
|
|
|
|
}
|