mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +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
|
@ -39,7 +39,7 @@ protected:
|
|||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
||||
JS::GCPtr<SVGGradientElement const> xlink_href() const;
|
||||
JS::GCPtr<SVGGradientElement const> linked_gradient() const;
|
||||
|
||||
Gfx::AffineTransform gradient_paint_transform(SVGPaintContext const&) const;
|
||||
|
||||
|
@ -52,8 +52,8 @@ protected:
|
|||
callback(stop);
|
||||
});
|
||||
if (!color_stops_found) {
|
||||
if (auto href = xlink_href())
|
||||
href->for_each_color_stop(callback);
|
||||
if (auto gradient = linked_gradient())
|
||||
gradient->for_each_color_stop(callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue