diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-16 00:51:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-16 01:39:47 +0200 |
commit | cb895edad40529faa61e2418c100d3a77bdf1a39 (patch) | |
tree | 183b2e75dcc184eb4c51bb526e674f52849ebe45 /Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp | |
parent | 2d4650714f7b09e305b5cbb84c46191503be27dd (diff) | |
download | serenity-cb895edad40529faa61e2418c100d3a77bdf1a39.zip |
LibWeb: Move Attribute into the DOM namespace
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<String> extract_character_encoding_from_meta_element(String const& stri return TextCodec::get_standardized_encoding(encoding); } -Optional<Attribute> prescan_get_attribute(const ByteBuffer& input, size_t& position) +Optional<DOM::Attribute> prescan_get_attribute(const ByteBuffer& input, size_t& position) { if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; @@ -109,7 +109,7 @@ Optional<Attribute> 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]); } |