1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibWeb: Add FlyString variants of get_element_by_id

Unfortunately we can't port these functions entirely over to FlyString
from DeprecatedString as Document includes NonElementParentNode and has
not yet been ported over to new AK string. In the mean time, this should
help up in porting over NonElementParentNode itself.
This commit is contained in:
Shannon Booth 2023-09-11 18:23:48 +12:00 committed by Sam Atkins
parent b2f3aa1c76
commit 3e0849eb4f
3 changed files with 13 additions and 2 deletions

View file

@ -49,7 +49,7 @@ Optional<Gfx::PaintStyle const&> SVGGraphicsElement::svg_paint_computed_value_to
auto const& url = paint_value->as_url();
if (!url.fragment().has_value())
return {};
auto gradient = document().get_element_by_id(url.fragment()->to_deprecated_string());
auto gradient = document().get_element_by_id(url.fragment().value());
if (!gradient)
return {};
if (is<SVG::SVGGradientElement>(*gradient))