mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 04:15:23 +03:00
LibWeb: Move PaintPhase enum out of Layout::Node
Now it's just Layout::PaintPhase instead of Layout::Node::PaintPhase.
This commit is contained in:
parent
d6c2a61fa1
commit
d129e68da8
Notes:
sideshowbarker
2024-07-19 01:04:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d129e68da89
@ -148,6 +148,7 @@ class SVGSVGElement;
|
||||
|
||||
namespace Web::Layout {
|
||||
enum class LayoutMode;
|
||||
enum class PaintPhase;
|
||||
class BlockBox;
|
||||
class BlockFormattingContext;
|
||||
class Box;
|
||||
|
@ -46,6 +46,14 @@ enum class LayoutMode {
|
||||
OnlyRequiredLineBreaks,
|
||||
};
|
||||
|
||||
enum class PaintPhase {
|
||||
Background,
|
||||
Border,
|
||||
Foreground,
|
||||
FocusOutline,
|
||||
Overlay,
|
||||
};
|
||||
|
||||
struct HitTestResult {
|
||||
RefPtr<Node> layout_node;
|
||||
int index_in_node { 0 };
|
||||
@ -117,14 +125,6 @@ public:
|
||||
virtual void handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
virtual void handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
|
||||
|
||||
enum class PaintPhase {
|
||||
Background,
|
||||
Border,
|
||||
Foreground,
|
||||
FocusOutline,
|
||||
Overlay,
|
||||
};
|
||||
|
||||
virtual void before_children_paint(PaintContext&, PaintPhase) {};
|
||||
virtual void paint(PaintContext&, PaintPhase);
|
||||
virtual void after_children_paint(PaintContext&, PaintPhase) {};
|
||||
|
@ -47,7 +47,7 @@ StackingContext::StackingContext(Box& box, StackingContext* parent)
|
||||
}
|
||||
}
|
||||
|
||||
void StackingContext::paint(PaintContext& context, Node::PaintPhase phase)
|
||||
void StackingContext::paint(PaintContext& context, PaintPhase phase)
|
||||
{
|
||||
if (!m_box.is_root()) {
|
||||
m_box.paint(context, phase);
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
StackingContext* parent() { return m_parent; }
|
||||
const StackingContext* parent() const { return m_parent; }
|
||||
|
||||
void paint(PaintContext&, Layout::Node::PaintPhase);
|
||||
void paint(PaintContext&, PaintPhase);
|
||||
HitTestResult hit_test(const Gfx::IntPoint&, HitTestType) const;
|
||||
|
||||
void dump(int indent = 0) const;
|
||||
|
Loading…
Reference in New Issue
Block a user