diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp | 14 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp index 919070a595..7ec96151e9 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLEncodingDetection.cpp @@ -9,7 +9,7 @@ #include <AK/StringView.h> #include <AK/Utf8View.h> #include <LibTextCodec/Decoder.h> -#include <LibWeb/DOM/Attribute.h> +#include <LibWeb/DOM/Attr.h> #include <LibWeb/DOM/Document.h> #include <LibWeb/HTML/Parser/HTMLEncodingDetection.h> #include <ctype.h> @@ -96,7 +96,7 @@ Optional<StringView> extract_character_encoding_from_meta_element(String const& return TextCodec::get_standardized_encoding(encoding); } -JS::GCPtr<DOM::Attribute> prescan_get_attribute(DOM::Document& document, ByteBuffer const& input, size_t& position) +JS::GCPtr<DOM::Attr> prescan_get_attribute(DOM::Document& document, ByteBuffer const& input, size_t& position) { if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; @@ -111,7 +111,7 @@ JS::GCPtr<DOM::Attribute> prescan_get_attribute(DOM::Document& document, ByteBuf } 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 *DOM::Attribute::create(document, attribute_name.to_string(), ""); + return *DOM::Attr::create(document, attribute_name.to_string(), ""); else attribute_name.append_as_lowercase(input[position]); ++position; @@ -123,7 +123,7 @@ spaces: if (!prescan_skip_whitespace_and_slashes(input, position)) return {}; if (input[position] != '=') - return DOM::Attribute::create(document, attribute_name.to_string(), ""); + return DOM::Attr::create(document, attribute_name.to_string(), ""); ++position; value: @@ -136,13 +136,13 @@ value: ++position; for (; !prescan_should_abort(input, position); ++position) { if (input[position] == quote_character) - return DOM::Attribute::create(document, attribute_name.to_string(), attribute_value.to_string()); + return DOM::Attr::create(document, attribute_name.to_string(), attribute_value.to_string()); else attribute_value.append_as_lowercase(input[position]); } return {}; } else if (input[position] == '>') - return DOM::Attribute::create(document, attribute_name.to_string(), ""); + return DOM::Attr::create(document, attribute_name.to_string(), ""); else attribute_value.append_as_lowercase(input[position]); @@ -152,7 +152,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 DOM::Attribute::create(document, attribute_name.to_string(), attribute_value.to_string()); + return DOM::Attr::create(document, 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 0bda305d16..fd400ea21e 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(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); Optional<StringView> extract_character_encoding_from_meta_element(String const&); -JS::GCPtr<DOM::Attribute> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position); +JS::GCPtr<DOM::Attr> prescan_get_attribute(DOM::Document&, ByteBuffer const& input, size_t& position); Optional<String> run_prescan_byte_stream_algorithm(DOM::Document&, ByteBuffer const& input); String run_encoding_sniffing_algorithm(DOM::Document&, ByteBuffer const& input); |