mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +00:00
LibWeb: Restore painter state if push_stacking_context() has failed
If `SkipStackingContext` is returned we also need to restore saved painter state because corresponding pop_stacking_context command that is supposed to do that will be skipped. Fixes https://github.com/SerenityOS/serenity/issues/22092
This commit is contained in:
parent
2732dd3633
commit
504aef470a
1 changed files with 1 additions and 0 deletions
|
@ -166,6 +166,7 @@ CommandResult PaintingCommandExecutorCPU::push_stacking_context(
|
||||||
// with execution of commands outside of this stacking context.
|
// with execution of commands outside of this stacking context.
|
||||||
// FIXME: Change the get_region_bitmap() API to return ErrorOr<Optional<Bitmap>> and exit the execution of commands here
|
// FIXME: Change the get_region_bitmap() API to return ErrorOr<Optional<Bitmap>> and exit the execution of commands here
|
||||||
// if we run out of memory.
|
// if we run out of memory.
|
||||||
|
painter().restore();
|
||||||
return CommandResult::SkipStackingContext;
|
return CommandResult::SkipStackingContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue