mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/SVG: Remove remaining user of of old try_resolve_url_to()
This commit is contained in:
parent
326933cd93
commit
094c2bbc89
Notes:
github-actions[bot]
2025-04-30 16:39:33 +00:00
Author: https://github.com/AtkinsSJ
Commit: 094c2bbc89
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4531
2 changed files with 1 additions and 17 deletions
|
@ -79,19 +79,6 @@ protected:
|
|||
|
||||
Gfx::AffineTransform m_transform = {};
|
||||
|
||||
template<typename T>
|
||||
GC::Ptr<T> try_resolve_url_to(URL::URL const& url) const
|
||||
{
|
||||
if (!url.fragment().has_value())
|
||||
return {};
|
||||
auto node = document().get_element_by_id(*url.fragment());
|
||||
if (!node)
|
||||
return {};
|
||||
if (is<T>(*node))
|
||||
return static_cast<T&>(*node);
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
GC::Ptr<T> try_resolve_url_to(CSS::URL const& url) const
|
||||
{
|
||||
|
|
|
@ -24,10 +24,7 @@ GC::Ptr<SVGGeometryElement const> SVGTextPathElement::path_or_shape() const
|
|||
auto href = get_attribute(AttributeNames::href);
|
||||
if (!href.has_value())
|
||||
return {};
|
||||
auto url = document().url().complete_url(*href);
|
||||
if (!url.has_value())
|
||||
return {};
|
||||
return try_resolve_url_to<SVGGeometryElement const>(*url);
|
||||
return try_resolve_url_to<SVGGeometryElement const>(*href);
|
||||
}
|
||||
|
||||
void SVGTextPathElement::initialize(JS::Realm& realm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue