diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-07-14 23:17:35 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-07-17 16:24:57 +0430 |
commit | f886aa15b8665e0bb0e886506aa492c99347f1f7 (patch) | |
tree | d84c9d50c48293d4b72877188778101ba5641a10 /Userland/Libraries/LibWeb | |
parent | d82f3eb085fc29474fd7310ccc40540e5c2380c2 (diff) | |
download | serenity-f886aa15b8665e0bb0e886506aa492c99347f1f7.zip |
LibWeb: Rename HTMLToken::AttributeBuilder struct to Attribute
This does not contain StringBuilders anymore, so it can do with a
simpler name: Attribute.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h index daf9bfb47f..568bf25035 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLToken.h @@ -35,7 +35,7 @@ public: size_t column { 0 }; }; - struct AttributeBuilder { + struct Attribute { String prefix; String local_name; String namespace_; @@ -206,7 +206,7 @@ private: String tag_name; bool self_closing { false }; bool self_closing_acknowledged { false }; - Vector<AttributeBuilder> attributes; + Vector<Attribute> attributes; } m_tag; // Type::Comment diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp index c749dd2815..c69d6c6259 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp @@ -1013,7 +1013,7 @@ _StartOfFunction: ON('=') { log_parse_error(); - auto new_attribute = HTMLToken::AttributeBuilder(); + HTMLToken::Attribute new_attribute; new_attribute.name_start_position = nth_last_position(1); m_current_builder.append_code_point(current_input_character.value()); m_current_token.m_tag.attributes.append(new_attribute); @@ -1021,7 +1021,7 @@ _StartOfFunction: } ANYTHING_ELSE { - auto new_attribute = HTMLToken::AttributeBuilder(); + HTMLToken::Attribute new_attribute; new_attribute.name_start_position = nth_last_position(1); m_current_token.m_tag.attributes.append(move(new_attribute)); RECONSUME_IN(AttributeName); @@ -1138,7 +1138,7 @@ _StartOfFunction: } ANYTHING_ELSE { - m_current_token.m_tag.attributes.append(HTMLToken::AttributeBuilder()); + m_current_token.m_tag.attributes.append({}); m_current_token.m_tag.attributes.last().name_start_position = m_source_positions.last(); RECONSUME_IN(AttributeName); } |