1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

LibWeb: Skip painting of empty stacking contexts in GPU painter

Fixes crashing on https://twinings.co.uk/ that was happening because
of 0 size texture allocation.
This commit is contained in:
Aliaksandr Kalenik 2023-12-01 00:49:53 +01:00 committed by Andreas Kling
parent c28f6828c9
commit cc2008ea0d

View file

@ -93,6 +93,9 @@ CommandResult PaintingCommandExecutorGPU::set_font(Gfx::Font const&)
CommandResult PaintingCommandExecutorGPU::push_stacking_context(float opacity, bool is_fixed_position, Gfx::IntRect const& source_paintable_rect, Gfx::IntPoint post_transform_translation, CSS::ImageRendering, StackingContextTransform transform, Optional<StackingContextMask>)
{
if (source_paintable_rect.is_empty())
return CommandResult::SkipStackingContext;
m_stacking_contexts.last().stacking_context_depth++;
painter().save();
if (is_fixed_position) {