mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-29 11:07:16 +02:00
LibWeb: Port HTMLParser local name and value from DeprecatedString
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 11:30:54 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/d8635fe541 Pull-request: https://github.com/SerenityOS/serenity/pull/21376
@@ -1108,31 +1108,31 @@ _StartOfFunction:
|
||||
ON_WHITESPACE
|
||||
{
|
||||
m_current_token.last_attribute().name_end_position = nth_last_position(1);
|
||||
m_current_token.last_attribute().local_name = consume_current_builder();
|
||||
m_current_token.last_attribute().local_name = MUST(FlyString::from_deprecated_fly_string(consume_current_builder()));
|
||||
RECONSUME_IN(AfterAttributeName);
|
||||
}
|
||||
ON('/')
|
||||
{
|
||||
m_current_token.last_attribute().name_end_position = nth_last_position(1);
|
||||
m_current_token.last_attribute().local_name = consume_current_builder();
|
||||
m_current_token.last_attribute().local_name = MUST(FlyString::from_deprecated_fly_string(consume_current_builder()));
|
||||
RECONSUME_IN(AfterAttributeName);
|
||||
}
|
||||
ON('>')
|
||||
{
|
||||
m_current_token.last_attribute().name_end_position = nth_last_position(1);
|
||||
m_current_token.last_attribute().local_name = consume_current_builder();
|
||||
m_current_token.last_attribute().local_name = MUST(FlyString::from_deprecated_fly_string(consume_current_builder()));
|
||||
RECONSUME_IN(AfterAttributeName);
|
||||
}
|
||||
ON_EOF
|
||||
{
|
||||
m_current_token.last_attribute().name_end_position = nth_last_position(1);
|
||||
m_current_token.last_attribute().local_name = consume_current_builder();
|
||||
m_current_token.last_attribute().local_name = MUST(FlyString::from_deprecated_fly_string(consume_current_builder()));
|
||||
RECONSUME_IN(AfterAttributeName);
|
||||
}
|
||||
ON('=')
|
||||
{
|
||||
m_current_token.last_attribute().name_end_position = nth_last_position(1);
|
||||
m_current_token.last_attribute().local_name = consume_current_builder();
|
||||
m_current_token.last_attribute().local_name = MUST(FlyString::from_deprecated_fly_string(consume_current_builder()));
|
||||
SWITCH_TO(BeforeAttributeValue);
|
||||
}
|
||||
ON_ASCII_UPPER_ALPHA
|
||||
@@ -1238,7 +1238,7 @@ _StartOfFunction:
|
||||
{
|
||||
ON('"')
|
||||
{
|
||||
m_current_token.last_attribute().value = consume_current_builder();
|
||||
m_current_token.last_attribute().value = MUST(String::from_deprecated_string(consume_current_builder()));
|
||||
SWITCH_TO(AfterAttributeValueQuoted);
|
||||
}
|
||||
ON('&')
|
||||
@@ -1270,7 +1270,7 @@ _StartOfFunction:
|
||||
{
|
||||
ON('\'')
|
||||
{
|
||||
m_current_token.last_attribute().value = consume_current_builder();
|
||||
m_current_token.last_attribute().value = MUST(String::from_deprecated_string(consume_current_builder()));
|
||||
SWITCH_TO(AfterAttributeValueQuoted);
|
||||
}
|
||||
ON('&')
|
||||
@@ -1302,7 +1302,7 @@ _StartOfFunction:
|
||||
{
|
||||
ON_WHITESPACE
|
||||
{
|
||||
m_current_token.last_attribute().value = consume_current_builder();
|
||||
m_current_token.last_attribute().value = MUST(String::from_deprecated_string(consume_current_builder()));
|
||||
m_current_token.last_attribute().value_end_position = nth_last_position(1);
|
||||
SWITCH_TO(BeforeAttributeName);
|
||||
}
|
||||
@@ -1313,7 +1313,7 @@ _StartOfFunction:
|
||||
}
|
||||
ON('>')
|
||||
{
|
||||
m_current_token.last_attribute().value = consume_current_builder();
|
||||
m_current_token.last_attribute().value = MUST(String::from_deprecated_string(consume_current_builder()));
|
||||
m_current_token.last_attribute().value_end_position = nth_last_position(1);
|
||||
SWITCH_TO_AND_EMIT_CURRENT_TOKEN(Data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user