mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 23:19:44 +00:00
LibWeb: Support relative lengths in stop-color
calcs
This commit is contained in:
parent
db439d224a
commit
3b52b1139a
Notes:
github-actions[bot]
2025-08-04 10:30:24 +00:00
Author: https://github.com/Calme1709
Commit: 3b52b1139a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5517
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
7 changed files with 32 additions and 25 deletions
|
@ -46,11 +46,11 @@ void SVGStopElement::apply_presentational_hints(GC::Ref<CSS::CascadedProperties>
|
|||
});
|
||||
}
|
||||
|
||||
Gfx::Color SVGStopElement::stop_color() const
|
||||
Gfx::Color SVGStopElement::stop_color()
|
||||
{
|
||||
if (auto computed_properties = this->computed_properties())
|
||||
return computed_properties->stop_color();
|
||||
return Color::Black;
|
||||
return computed_properties->color_or_fallback(CSS::PropertyID::StopColor, CSS::ColorResolutionContext::for_element({ *this }), CSS::InitialValues::stop_color());
|
||||
return CSS::InitialValues::stop_color();
|
||||
}
|
||||
|
||||
float SVGStopElement::stop_opacity() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue