mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibWeb: Don't clip to containing block when painting abspos descendants
This commit is contained in:
parent
f941b7aefe
commit
63c727a4a3
10 changed files with 37 additions and 25 deletions
|
@ -257,11 +257,14 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders
|
|||
return border_radius_data;
|
||||
}
|
||||
|
||||
void PaintableBox::before_children_paint(PaintContext& context, PaintPhase phase) const
|
||||
void PaintableBox::before_children_paint(PaintContext& context, PaintPhase phase, ShouldClipOverflow should_clip_overflow) const
|
||||
{
|
||||
if (!AK::first_is_one_of(phase, PaintPhase::Background, PaintPhase::Border, PaintPhase::Foreground))
|
||||
return;
|
||||
|
||||
if (should_clip_overflow == ShouldClipOverflow::No)
|
||||
return;
|
||||
|
||||
// FIXME: Support more overflow variations.
|
||||
auto clip_rect = absolute_padding_box_rect().to_rounded<int>();
|
||||
auto overflow_x = computed_values().overflow_x();
|
||||
|
@ -293,11 +296,14 @@ void PaintableBox::before_children_paint(PaintContext& context, PaintPhase phase
|
|||
}
|
||||
}
|
||||
|
||||
void PaintableBox::after_children_paint(PaintContext& context, PaintPhase phase) const
|
||||
void PaintableBox::after_children_paint(PaintContext& context, PaintPhase phase, ShouldClipOverflow should_clip_overflow) const
|
||||
{
|
||||
if (!AK::first_is_one_of(phase, PaintPhase::Background, PaintPhase::Border, PaintPhase::Foreground))
|
||||
return;
|
||||
|
||||
if (should_clip_overflow == ShouldClipOverflow::No)
|
||||
return;
|
||||
|
||||
// FIXME: Support more overflow variations.
|
||||
if (m_clipping_overflow) {
|
||||
context.painter().restore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue