mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Use separate restore() for each ApplyOpacity display list item
ApplyOpacity internally calls canvas.saveLayer() which requires a matching canvas.restore() to be called. Fixes missing header on https://supabase.com/
This commit is contained in:
parent
a486c86eee
commit
a7bd3704c5
Notes:
github-actions[bot]
2024-12-01 15:34:06 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: a7bd3704c5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2683
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,7 @@ void SVGSVGPaintable::paint_svg_box(PaintContext& context, PaintableBox const& s
|
||||||
|
|
||||||
auto const& filter = svg_box.computed_values().filter();
|
auto const& filter = svg_box.computed_values().filter();
|
||||||
auto masking_area = svg_box.get_masking_area();
|
auto masking_area = svg_box.get_masking_area();
|
||||||
auto needs_to_save_state = computed_values.opacity() < 1 || svg_box.has_css_transform() || svg_box.get_masking_area().has_value();
|
auto needs_to_save_state = svg_box.has_css_transform() || svg_box.get_masking_area().has_value();
|
||||||
|
|
||||||
if (needs_to_save_state) {
|
if (needs_to_save_state) {
|
||||||
context.display_list_recorder().save();
|
context.display_list_recorder().save();
|
||||||
|
@ -99,6 +99,10 @@ void SVGSVGPaintable::paint_svg_box(PaintContext& context, PaintableBox const& s
|
||||||
context.display_list_recorder().restore();
|
context.display_list_recorder().restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (computed_values.opacity() < 1) {
|
||||||
|
context.display_list_recorder().restore();
|
||||||
|
}
|
||||||
|
|
||||||
if (needs_to_save_state) {
|
if (needs_to_save_state) {
|
||||||
context.display_list_recorder().restore();
|
context.display_list_recorder().restore();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue