mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
LibWeb: Port get_element_by_id from DeprecatedFlyString
We needed to keep the old versions of these functions around before all of the IDL interfaces were ported over to new AK String, but now that is done, we can remove the deprecated versions of these functions.
This commit is contained in:
parent
b37aab1277
commit
48f367adbb
6 changed files with 12 additions and 22 deletions
|
@ -19,15 +19,10 @@ template<typename NodeType>
|
|||
class NonElementParentNode {
|
||||
public:
|
||||
JS::GCPtr<Element const> get_element_by_id(FlyString const& id) const
|
||||
{
|
||||
return get_element_by_id(id.to_deprecated_fly_string());
|
||||
}
|
||||
|
||||
JS::GCPtr<Element const> get_element_by_id(DeprecatedFlyString const& id) const
|
||||
{
|
||||
JS::GCPtr<Element const> found_element;
|
||||
static_cast<NodeType const*>(this)->template for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) {
|
||||
if (element.deprecated_attribute(HTML::AttributeNames::id) == id) {
|
||||
if (element.attribute(HTML::AttributeNames::id) == id) {
|
||||
found_element = &element;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
@ -37,15 +32,10 @@ public:
|
|||
}
|
||||
|
||||
JS::GCPtr<Element> get_element_by_id(FlyString const& id)
|
||||
{
|
||||
return get_element_by_id(id.to_deprecated_fly_string());
|
||||
}
|
||||
|
||||
JS::GCPtr<Element> get_element_by_id(DeprecatedFlyString const& id)
|
||||
{
|
||||
JS::GCPtr<Element> found_element;
|
||||
static_cast<NodeType*>(this)->template for_each_in_inclusive_subtree_of_type<Element>([&](auto& element) {
|
||||
if (element.deprecated_attribute(HTML::AttributeNames::id) == id) {
|
||||
if (element.attribute(HTML::AttributeNames::id) == id) {
|
||||
found_element = &element;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue