diff --git a/Userland/Libraries/LibWeb/DOM/Attribute.h b/Userland/Libraries/LibWeb/DOM/Attribute.h index 1a95988870..5261a5bf7d 100644 --- a/Userland/Libraries/LibWeb/DOM/Attribute.h +++ b/Userland/Libraries/LibWeb/DOM/Attribute.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling + * Copyright (c) 2018-2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ @@ -8,7 +8,7 @@ #include -namespace Web { +namespace Web::DOM { class Attribute { public: diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp index 70a1fbab03..460e0a3872 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp @@ -94,7 +94,7 @@ Optional extract_character_encoding_from_meta_element(String const& stri return TextCodec::get_standardized_encoding(encoding); } -Optional prescan_get_attribute(const ByteBuffer& input, size_t& position) +Optional prescan_get_attribute(const ByteBuffer& input, size_t& position) { if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; @@ -109,7 +109,7 @@ Optional prescan_get_attribute(const ByteBuffer& input, size_t& posit } else if (input[position] == '\t' || input[position] == '\n' || input[position] == '\f' || input[position] == '\r' || input[position] == ' ') goto spaces; else if (input[position] == '/' || input[position] == '>') - return Attribute(attribute_name.to_string(), ""); + return DOM::Attribute(attribute_name.to_string(), ""); else attribute_name.append_as_lowercase(input[position]); ++position; @@ -121,7 +121,7 @@ spaces: if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; if (input[position] != '=') - return Attribute(attribute_name.to_string(), ""); + return DOM::Attribute(attribute_name.to_string(), ""); ++position; value: @@ -134,13 +134,13 @@ value: ++position; for (; !prescan_should_abort(input, position); ++position) { if (input[position] == quote_character) - return Attribute(attribute_name.to_string(), attribute_value.to_string()); + return DOM::Attribute(attribute_name.to_string(), attribute_value.to_string()); else attribute_value.append_as_lowercase(input[position]); } return {}; } else if (input[position] == '>') - return Attribute(attribute_name.to_string(), ""); + return DOM::Attribute(attribute_name.to_string(), ""); else attribute_value.append_as_lowercase(input[position]); @@ -150,7 +150,7 @@ value: for (; !prescan_should_abort(input, position); ++position) { if (input[position] == '\t' || input[position] == '\n' || input[position] == '\f' || input[position] == '\r' || input[position] == ' ' || input[position] == '>') - return Attribute(attribute_name.to_string(), attribute_value.to_string()); + return DOM::Attribute(attribute_name.to_string(), attribute_value.to_string()); else attribute_value.append_as_lowercase(input[position]); } diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h index eff8190d95..4d9a1e9ab2 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h @@ -16,7 +16,7 @@ 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); Optional extract_character_encoding_from_meta_element(String const&); -Optional prescan_get_attribute(const ByteBuffer& input, size_t& position); +Optional prescan_get_attribute(const ByteBuffer& input, size_t& position); Optional run_prescan_byte_stream_algorithm(const ByteBuffer& input); String run_encoding_sniffing_algorithm(const ByteBuffer& input);