1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

LibWeb: Hang StackingContext off of the paint boxes

Stacking contexts have nothing to do with layout and everything with
painting, so let's keep them in Painting::Box.
This commit is contained in:
Andreas Kling 2022-03-10 10:38:13 +01:00
parent cc8e429126
commit 9f5cbcaad3
10 changed files with 39 additions and 38 deletions

View file

@ -10,7 +10,6 @@
#include <LibGfx/Rect.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/BorderPainting.h>
#include <LibWeb/Painting/StackingContext.h>
namespace Web::Layout {
@ -30,11 +29,6 @@ public:
bool is_body() const;
Painting::StackingContext* stacking_context() { return m_stacking_context; }
Painting::StackingContext const* stacking_context() const { return m_stacking_context; }
void set_stacking_context(NonnullOwnPtr<Painting::StackingContext> context) { m_stacking_context = move(context); }
Painting::StackingContext* enclosing_stacking_context();
virtual void paint(PaintContext&, Painting::PaintPhase) override;
virtual void paint_border(PaintContext& context);
virtual void paint_box_shadow(PaintContext& context);
@ -63,8 +57,6 @@ protected:
private:
virtual bool is_box() const final { return true; }
OwnPtr<Painting::StackingContext> m_stacking_context;
};
template<>