From dcc4868a3c6e3595f3f79f94c7e2f9afe4901abd Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 19 Mar 2023 20:28:30 +0300 Subject: [PATCH] LibWeb: Rename `PaintableBox::clip_rect()` --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 6 +++--- Userland/Libraries/LibWeb/Painting/PaintableBox.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 9e08873765..4dcbf262df 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -314,7 +314,7 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders return border_radius_data; } -Optional PaintableBox::clip_rect() const +Optional 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 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(); diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.h b/Userland/Libraries/LibWeb/Painting/PaintableBox.h index c76b769684..f425f506c4 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.h +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.h @@ -98,7 +98,7 @@ public: return m_overflow_data->scrollable_overflow_rect; } - Optional clip_rect() const; + Optional calculate_overflow_clipped_rect() const; void set_overflow_data(Optional data) { m_overflow_data = move(data); } void set_containing_line_box_fragment(Optional);