1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:17:35 +00:00

LibWeb: Rename HTMLToken::AttributeBuilder struct to Attribute

This does not contain StringBuilders anymore, so it can do with a
simpler name: Attribute.
This commit is contained in:
Max Wipfli 2021-07-14 23:17:35 +02:00 committed by Ali Mohammad Pur
parent d82f3eb085
commit f886aa15b8
2 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ public:
size_t column { 0 }; size_t column { 0 };
}; };
struct AttributeBuilder { struct Attribute {
String prefix; String prefix;
String local_name; String local_name;
String namespace_; String namespace_;
@ -206,7 +206,7 @@ private:
String tag_name; String tag_name;
bool self_closing { false }; bool self_closing { false };
bool self_closing_acknowledged { false }; bool self_closing_acknowledged { false };
Vector<AttributeBuilder> attributes; Vector<Attribute> attributes;
} m_tag; } m_tag;
// Type::Comment // Type::Comment

View file

@ -1013,7 +1013,7 @@ _StartOfFunction:
ON('=') ON('=')
{ {
log_parse_error(); log_parse_error();
auto new_attribute = HTMLToken::AttributeBuilder(); HTMLToken::Attribute new_attribute;
new_attribute.name_start_position = nth_last_position(1); new_attribute.name_start_position = nth_last_position(1);
m_current_builder.append_code_point(current_input_character.value()); m_current_builder.append_code_point(current_input_character.value());
m_current_token.m_tag.attributes.append(new_attribute); m_current_token.m_tag.attributes.append(new_attribute);
@ -1021,7 +1021,7 @@ _StartOfFunction:
} }
ANYTHING_ELSE ANYTHING_ELSE
{ {
auto new_attribute = HTMLToken::AttributeBuilder(); HTMLToken::Attribute new_attribute;
new_attribute.name_start_position = nth_last_position(1); new_attribute.name_start_position = nth_last_position(1);
m_current_token.m_tag.attributes.append(move(new_attribute)); m_current_token.m_tag.attributes.append(move(new_attribute));
RECONSUME_IN(AttributeName); RECONSUME_IN(AttributeName);
@ -1138,7 +1138,7 @@ _StartOfFunction:
} }
ANYTHING_ELSE 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(); m_current_token.m_tag.attributes.last().name_start_position = m_source_positions.last();
RECONSUME_IN(AttributeName); RECONSUME_IN(AttributeName);
} }