mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +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:
parent
bbfe0d3a82
commit
9303e9e76f
30 changed files with 163 additions and 158 deletions
|
@ -1361,7 +1361,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Element>> Document::create_element(String c
|
|||
namespace_ = Namespace::HTML;
|
||||
|
||||
// 6. Return the result of creating an element given this, localName, namespace, null, is, and with the synchronous custom elements flag set.
|
||||
return TRY(DOM::create_element(*this, local_name, namespace_, {}, move(is_value), true));
|
||||
return TRY(DOM::create_element(*this, MUST(FlyString::from_deprecated_fly_string(local_name)), namespace_, {}, move(is_value), true));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-createelementns
|
||||
|
@ -1387,7 +1387,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Element>> Document::create_element_ns(Optio
|
|||
}
|
||||
|
||||
// 4. Return the result of creating an element given document, localName, namespace, prefix, is, and with the synchronous custom elements flag set.
|
||||
return TRY(DOM::create_element(*this, extracted_qualified_name.local_name().to_deprecated_fly_string(), extracted_qualified_name.deprecated_namespace_(), extracted_qualified_name.deprecated_prefix(), move(is_value), true));
|
||||
return TRY(DOM::create_element(*this, extracted_qualified_name.local_name(), extracted_qualified_name.deprecated_namespace_(), extracted_qualified_name.deprecated_prefix(), move(is_value), true));
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<DocumentFragment> Document::create_document_fragment()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue