mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibWeb/SVG: Implement resolution for a subset of SVG filters
This commit is contained in:
parent
5d85959f5f
commit
635adc8aa7
Notes:
github-actions[bot]
2025-07-09 17:08:27 +00:00
Author: https://github.com/ananas-dev
Commit: 635adc8aa7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5028
Reviewed-by: https://github.com/gmta ✅
10 changed files with 161 additions and 17 deletions
|
@ -1049,7 +1049,7 @@ void CanvasRenderingContext2D::set_filter(String filter)
|
|||
item.visit(
|
||||
[&](CSS::FilterOperation::Blur const& blur_filter) {
|
||||
float radius = blur_filter.resolved_radius(*layout_node);
|
||||
auto new_filter = Gfx::Filter::blur(radius);
|
||||
auto new_filter = Gfx::Filter::blur(radius, radius);
|
||||
|
||||
drawing_state().filter = drawing_state().filter.has_value()
|
||||
? Gfx::Filter::compose(new_filter, *drawing_state().filter)
|
||||
|
@ -1093,6 +1093,11 @@ void CanvasRenderingContext2D::set_filter(String filter)
|
|||
drawing_state().filter = drawing_state().filter.has_value()
|
||||
? Gfx::Filter::compose(new_filter, *drawing_state().filter)
|
||||
: new_filter;
|
||||
},
|
||||
[&](CSS::URL const& url) {
|
||||
(void)url;
|
||||
// FIXME: Resolve the SVG filter
|
||||
dbgln("FIXME: SVG filters are not implemented for Canvas2D");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue