LibWeb: Stop overflow clip box aggregation on reached stacking context
This commit is contained in:
parent
87fa1c5e66
commit
6092d81e4d
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/6092d81e4d Pull-request: https://github.com/SerenityOS/serenity/pull/17591 Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 1 deletions
|
@ -317,8 +317,14 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders
|
|||
Optional<CSSPixelRect> PaintableBox::clip_rect() const
|
||||
{
|
||||
if (!m_clip_rect.has_value()) {
|
||||
if (containing_block() && containing_block()->paint_box())
|
||||
// NOTE: stacking context should not be crossed while aggregating rectangle to
|
||||
// clip `overflow: hidden` because intersecting rectangles with different
|
||||
// transforms doesn't make sense
|
||||
// TODO: figure out if there are cases when stacking context should be
|
||||
// crossed to calculate correct clip rect
|
||||
if (!stacking_context() && containing_block() && containing_block()->paint_box()) {
|
||||
m_clip_rect = containing_block()->paint_box()->clip_rect();
|
||||
}
|
||||
|
||||
auto overflow_x = computed_values().overflow_x();
|
||||
auto overflow_y = computed_values().overflow_y();
|
||||
|
|
Loading…
Add table
Reference in a new issue