mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Port Element::local_name and TagNames from Deprecated String
Which pretty much needs to be done together due to the amount of places where they are compared together. This also involves porting over StackOfOpenElements over to FlyString from DeprecatedFly string to prevent a gazillion calls to `.to_deprecated_fly_string` calls in HTMLParser.
This commit is contained in:
committed by
Sam Atkins
parent
bbfe0d3a82
commit
9303e9e76f
@@ -485,7 +485,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_element(DOM::Element cons
|
||||
// 1. If the require well-formed flag is set (its value is true), and this node's localName attribute contains the character ":" (U+003A COLON) or does not match the XML Name production,
|
||||
// then throw an exception; the serialization of this node would not be a well-formed element.
|
||||
if (require_well_formed == RequireWellFormed::Yes) {
|
||||
if (element.local_name().view().contains(':'))
|
||||
if (element.local_name().bytes_as_string_view().contains(':'))
|
||||
return WebIDL::InvalidStateError::create(realm, "Element's local name contains a colon"_fly_string);
|
||||
|
||||
// FIXME: Check element's local name against the XML Char production.
|
||||
|
||||
Reference in New Issue
Block a user