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

LibWeb: Move StackingContext and PaintPhase into the Painting namespace

This commit is contained in:
Andreas Kling 2022-03-10 02:13:28 +01:00
parent a4d51b3dc2
commit f0d833a3d7
41 changed files with 105 additions and 103 deletions

View file

@ -26,14 +26,6 @@ enum class LayoutMode {
OnlyRequiredLineBreaks,
};
enum class PaintPhase {
Background,
Border,
Foreground,
FocusOutline,
Overlay,
};
struct HitTestResult {
RefPtr<Node> layout_node;
int index_in_node { 0 };
@ -92,10 +84,10 @@ public:
virtual void handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y);
virtual void before_children_paint(PaintContext&, PaintPhase) {};
virtual void paint(PaintContext&, PaintPhase) = 0;
virtual void paint_fragment(PaintContext&, const LineBoxFragment&, PaintPhase) const { }
virtual void after_children_paint(PaintContext&, PaintPhase) {};
virtual void before_children_paint(PaintContext&, Painting::PaintPhase) {};
virtual void paint(PaintContext&, Painting::PaintPhase) = 0;
virtual void paint_fragment(PaintContext&, const LineBoxFragment&, Painting::PaintPhase) const { }
virtual void after_children_paint(PaintContext&, Painting::PaintPhase) {};
// These are used to optimize hot is<T> variants for some classes where dynamic_cast is too slow.
virtual bool is_box() const { return false; }