LibWeb: Rename PaintableBox::clip_rect()

This commit is contained in:
Aliaksandr Kalenik 2023-03-19 20:28:30 +03:00 committed by Andreas Kling
parent 7ddacef3b5
commit dcc4868a3c
Notes: sideshowbarker 2024-07-17 09:39:38 +09:00
2 changed files with 4 additions and 4 deletions
Userland/Libraries/LibWeb/Painting

View file

@ -314,7 +314,7 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders
return border_radius_data;
}
Optional<CSSPixelRect> PaintableBox::clip_rect() const
Optional<CSSPixelRect> PaintableBox::calculate_overflow_clipped_rect() const
{
if (!m_clip_rect.has_value()) {
// NOTE: stacking context should not be crossed while aggregating rectangle to
@ -323,7 +323,7 @@ Optional<CSSPixelRect> PaintableBox::clip_rect() const
// 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();
m_clip_rect = containing_block()->paint_box()->calculate_overflow_clipped_rect();
}
auto overflow_x = computed_values().overflow_x();
@ -347,7 +347,7 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph
return;
// FIXME: Support more overflow variations.
auto clip_rect = this->clip_rect();
auto clip_rect = this->calculate_overflow_clipped_rect();
auto overflow_x = computed_values().overflow_x();
auto overflow_y = computed_values().overflow_y();

View file

@ -98,7 +98,7 @@ public:
return m_overflow_data->scrollable_overflow_rect;
}
Optional<CSSPixelRect> clip_rect() const;
Optional<CSSPixelRect> calculate_overflow_clipped_rect() const;
void set_overflow_data(Optional<OverflowData> data) { m_overflow_data = move(data); }
void set_containing_line_box_fragment(Optional<Layout::LineBoxFragmentCoordinate>);