Serenity Operating System
at master 24 lines 866 B view raw
1/* 2 * Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <AK/DeprecatedString.h> 10#include <AK/Optional.h> 11#include <LibJS/Heap/GCPtr.h> 12#include <LibWeb/Forward.h> 13 14namespace Web::HTML { 15 16bool prescan_should_abort(ByteBuffer const& input, size_t const& position); 17bool prescan_is_whitespace_or_slash(u8 const& byte); 18bool prescan_skip_whitespace_and_slashes(ByteBuffer const& input, size_t& position); 19Optional<StringView> extract_character_encoding_from_meta_element(DeprecatedString const&); 20JS::GCPtr<DOM::Attr> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position); 21Optional<DeprecatedString> run_prescan_byte_stream_algorithm(DOM::Document&, ByteBuffer const& input); 22DeprecatedString run_encoding_sniffing_algorithm(DOM::Document&, ByteBuffer const& input); 23 24}