mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03: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:
parent
d82f3eb085
commit
f886aa15b8
Notes:
sideshowbarker
2024-07-18 08:53:10 +09:00
Author: https://github.com/MaxWipfli Commit: https://github.com/SerenityOS/serenity/commit/f886aa15b86 Pull-request: https://github.com/SerenityOS/serenity/pull/8784 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/alimpfard
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user