mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:07:34 +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
|
@ -165,8 +165,10 @@ JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name(Deprecated
|
|||
|
||||
// https://dom.spec.whatwg.org/#concept-getelementsbytagnamens
|
||||
// NOTE: This method is only exposed on Document and Element, but is in ParentNode to prevent code duplication.
|
||||
JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name_ns(DeprecatedFlyString const& nullable_namespace, DeprecatedFlyString const& local_name)
|
||||
JS::NonnullGCPtr<HTMLCollection> ParentNode::get_elements_by_tag_name_ns(DeprecatedFlyString const& nullable_namespace, DeprecatedFlyString const& deprecated_local_name)
|
||||
{
|
||||
auto local_name = MUST(FlyString::from_deprecated_fly_string(deprecated_local_name));
|
||||
|
||||
// 1. If namespace is the empty string, set it to null.
|
||||
DeprecatedString namespace_ = nullable_namespace;
|
||||
if (namespace_.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue