1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:58:11 +00:00

LibWeb: Include scrollable overflow in the "absolute paint rect"

This finally fixes the issue where stacking contexts that have either a
transform or opacity != 1 would clip their descendants to the root of
the stacking context.
This commit is contained in:
Andreas Kling 2023-07-12 18:59:44 +02:00
parent bf25568703
commit 158caf1b91

View file

@ -104,6 +104,13 @@ CSSPixelRect PaintableBox::compute_absolute_paint_rect() const
{
// FIXME: This likely incomplete:
auto rect = absolute_border_box_rect();
if (has_scrollable_overflow()) {
auto scrollable_overflow_rect = this->scrollable_overflow_rect().value();
if (computed_values().overflow_x() == CSS::Overflow::Visible)
rect.unite_horizontally(scrollable_overflow_rect);
if (computed_values().overflow_y() == CSS::Overflow::Visible)
rect.unite_vertically(scrollable_overflow_rect);
}
auto resolved_box_shadow_data = resolve_box_shadow_data();
for (auto const& shadow : resolved_box_shadow_data) {
if (shadow.placement == ShadowPlacement::Inner)