mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibWeb: Support legacy xlink:href attribute for linked gradients
...and rename the related functions to something more descriptive.
This commit is contained in:
parent
cc8c4266f5
commit
439735fd35
6 changed files with 37 additions and 35 deletions
|
@ -33,10 +33,10 @@ protected:
|
|||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
JS::GCPtr<SVGLinearGradientElement const> linear_gradient_xlink_href() const
|
||||
JS::GCPtr<SVGLinearGradientElement const> linked_linear_gradient() const
|
||||
{
|
||||
if (auto href = xlink_href(); href && is<SVGLinearGradientElement>(*href))
|
||||
return &verify_cast<SVGLinearGradientElement>(*href);
|
||||
if (auto gradient = linked_gradient(); gradient && is<SVGLinearGradientElement>(*gradient))
|
||||
return &verify_cast<SVGLinearGradientElement>(*gradient);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue