Просмотр исходного кода

LibWeb: Delete m_clipping_overflow in PaintableBox

Aliaksandr Kalenik 11 месяцев назад
Родитель
Сommit
c47ec26bcd

+ 1 - 3
Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

@@ -530,7 +530,6 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph
 
     if (clip_rect().has_value()) {
         auto overflow_clip_rect = clip_rect().value();
-        m_clipping_overflow = true;
         context.display_list_recorder().save();
         context.display_list_recorder().add_clip_rect(context.enclosing_device_rect(overflow_clip_rect).to_type<int>());
         auto const& border_radii_clips = this->border_radii_clips();
@@ -551,8 +550,7 @@ void PaintableBox::clear_clip_overflow_rect(PaintContext& context, PaintPhase ph
     if (!AK::first_is_one_of(phase, PaintPhase::Background, PaintPhase::Border, PaintPhase::TableCollapsedBorder, PaintPhase::Foreground, PaintPhase::Outline))
         return;
 
-    if (m_clipping_overflow) {
-        m_clipping_overflow = false;
+    if (clip_rect().has_value()) {
         context.display_list_recorder().restore();
     }
 }

+ 0 - 2
Userland/Libraries/LibWeb/Painting/PaintableBox.h

@@ -244,8 +244,6 @@ private:
     Optional<CSSPixelRect> mutable m_absolute_rect;
     Optional<CSSPixelRect> mutable m_absolute_paint_rect;
 
-    mutable bool m_clipping_overflow { false };
-
     RefPtr<ScrollFrame const> m_enclosing_scroll_frame;
     RefPtr<ClipFrame const> m_enclosing_clip_frame;