mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
AK: Port URL::m_fragment from DeprecatedString to String
This commit is contained in:
parent
5663a2d3b4
commit
9d60f23abc
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/shannonbooth
Commit: 9d60f23abc
Pull-request: https://github.com/SerenityOS/serenity/pull/20510
Reviewed-by: https://github.com/ADKaster ✅
21 changed files with 68 additions and 76 deletions
|
@ -87,9 +87,9 @@ JS::GCPtr<SVGGradientElement const> SVGGradientElement::linked_gradient() const
|
|||
if (auto href = link; !href.is_empty()) {
|
||||
auto url = document().parse_url(href);
|
||||
auto id = url.fragment();
|
||||
if (id.is_empty())
|
||||
if (!id.has_value() || id->is_empty())
|
||||
return {};
|
||||
auto element = document().get_element_by_id(id);
|
||||
auto element = document().get_element_by_id(id->to_deprecated_string());
|
||||
if (!element)
|
||||
return {};
|
||||
if (!is<SVGGradientElement>(*element))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue