mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibWeb: Fix accidentally skipping post-paint actions for positioned SCs
Regressed in 2a067b5601
.
I could not find anything obviously broken by this, but it definitely
was unintentional on my part.
This commit is contained in:
parent
fdb27c5851
commit
2d154bf90a
Notes:
sideshowbarker
2024-07-16 23:51:07 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/2d154bf90a Pull-request: https://github.com/SerenityOS/serenity/pull/20733
1 changed files with 3 additions and 2 deletions
|
@ -230,6 +230,7 @@ void StackingContext::paint_internal(PaintContext& context) const
|
|||
|
||||
// At this point, `paintable_box` is a positioned descendant with z-index: auto.
|
||||
// FIXME: This is basically duplicating logic found elsewhere in this same function. Find a way to make this more elegant.
|
||||
auto exit_decision = TraversalDecision::Continue;
|
||||
auto* parent_paintable = paintable.parent();
|
||||
if (parent_paintable)
|
||||
parent_paintable->before_children_paint(context, PaintPhase::Foreground);
|
||||
|
@ -239,7 +240,7 @@ void StackingContext::paint_internal(PaintContext& context) const
|
|||
containing_block_paintable->apply_clip_overflow_rect(context, PaintPhase::Foreground);
|
||||
if (auto* child = paintable.stacking_context_rooted_here()) {
|
||||
paint_child(context, *child);
|
||||
return TraversalDecision::SkipChildrenAndContinue;
|
||||
exit_decision = TraversalDecision::SkipChildrenAndContinue;
|
||||
} else {
|
||||
paint_node_as_stacking_context(paintable, context);
|
||||
}
|
||||
|
@ -248,7 +249,7 @@ void StackingContext::paint_internal(PaintContext& context) const
|
|||
if (containing_block_paintable)
|
||||
containing_block_paintable->clear_clip_overflow_rect(context, PaintPhase::Foreground);
|
||||
|
||||
return TraversalDecision::Continue;
|
||||
return exit_decision;
|
||||
});
|
||||
|
||||
// Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index order
|
||||
|
|
Loading…
Add table
Reference in a new issue