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
Notes: sideshowbarker 2024-07-18 08:53:10 +09:00
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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);
}