mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibWeb: Move StackingContext and PaintPhase into the Painting namespace
This commit is contained in:
parent
a4d51b3dc2
commit
f0d833a3d7
41 changed files with 105 additions and 103 deletions
|
@ -9,11 +9,19 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
namespace Web::Painting {
|
||||
|
||||
enum class PaintPhase {
|
||||
Background,
|
||||
Border,
|
||||
Foreground,
|
||||
FocusOutline,
|
||||
Overlay,
|
||||
};
|
||||
|
||||
class StackingContext {
|
||||
public:
|
||||
StackingContext(Box&, StackingContext* parent);
|
||||
StackingContext(Layout::Box&, StackingContext* parent);
|
||||
|
||||
StackingContext* parent() { return m_parent; }
|
||||
const StackingContext* parent() const { return m_parent; }
|
||||
|
@ -26,14 +34,14 @@ public:
|
|||
FocusAndOverlay,
|
||||
};
|
||||
|
||||
void paint_descendants(PaintContext&, Node&, StackingContextPaintPhase);
|
||||
void paint_descendants(PaintContext&, Layout::Node&, StackingContextPaintPhase);
|
||||
void paint(PaintContext&);
|
||||
HitTestResult hit_test(const Gfx::IntPoint&, HitTestType) const;
|
||||
Layout::HitTestResult hit_test(Gfx::IntPoint const&, Layout::HitTestType) const;
|
||||
|
||||
void dump(int indent = 0) const;
|
||||
|
||||
private:
|
||||
Box& m_box;
|
||||
Layout::Box& m_box;
|
||||
StackingContext* const m_parent { nullptr };
|
||||
Vector<StackingContext*> m_children;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue