diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-27 10:55:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-28 14:17:44 +0100 |
commit | 1d058238106fa1b2571bd412fc4b0fb64d6c48c4 (patch) | |
tree | 80be0bea438757975305e0357b89606205f2992f /Userland/Libraries/LibWeb/Layout/Box.h | |
parent | 916bbf591022922bb129de0458d03654ee2ff1a4 (diff) | |
download | serenity-1d058238106fa1b2571bd412fc4b0fb64d6c48c4.zip |
LibWeb: Store Layout::Box overflow data in Optional instead of OwnPtr
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Box.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Box.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h index a84b35e0f2..557c4548b9 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.h +++ b/Userland/Libraries/LibWeb/Layout/Box.h @@ -108,16 +108,16 @@ public: bool has_intrinsic_height() const { return intrinsic_height().has_value(); } bool has_intrinsic_aspect_ratio() const { return intrinsic_aspect_ratio().has_value(); } - bool has_overflow() const { return m_overflow_data; } + bool has_overflow() const { return m_overflow_data.has_value(); } Optional<Gfx::FloatRect> scrollable_overflow_rect() const { - if (!m_overflow_data) + if (!m_overflow_data.has_value()) return {}; return m_overflow_data->scrollable_overflow_rect; } - void set_overflow_data(OwnPtr<OverflowData> data) { m_overflow_data = move(data); } + void set_overflow_data(Optional<OverflowData> data) { m_overflow_data = move(data); } virtual void before_children_paint(PaintContext&, PaintPhase) override; virtual void after_children_paint(PaintContext&, PaintPhase) override; @@ -146,7 +146,7 @@ private: OwnPtr<StackingContext> m_stacking_context; - OwnPtr<OverflowData> m_overflow_data; + Optional<OverflowData> m_overflow_data; }; template<> |