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

LibWeb: Use paintable to represent event tracking node

The use of layout nodes likely predated the paintable tree, but now
there is no point in introducing another level of indirection.
This commit is contained in:
Aliaksandr Kalenik 2024-01-14 10:14:36 +01:00 committed by Andreas Kling
parent ad59fb7cf0
commit 31e5b5f5de
6 changed files with 24 additions and 14 deletions

View file

@ -12,6 +12,7 @@
#include <Kernel/API/KeyCode.h>
#include <LibGUI/Forward.h>
#include <LibGfx/Forward.h>
#include <LibJS/Heap/Cell.h>
#include <LibJS/Heap/GCPtr.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Page/EditEventHandler.h>
@ -33,10 +34,12 @@ public:
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
bool handle_keyup(KeyCode, unsigned modifiers, u32 code_point);
void set_mouse_event_tracking_layout_node(Layout::Node*);
void set_mouse_event_tracking_paintable(Painting::Paintable*);
void set_edit_event_handler(NonnullOwnPtr<EditEventHandler> value) { m_edit_event_handler = move(value); }
void visit_edges(JS::Cell::Visitor& visitor) const;
private:
bool focus_next_element();
bool focus_previous_element();
@ -59,7 +62,7 @@ private:
bool m_in_mouse_selection { false };
WeakPtr<Layout::Node> m_mouse_event_tracking_layout_node;
JS::GCPtr<Painting::Paintable> m_mouse_event_tracking_paintable;
NonnullOwnPtr<EditEventHandler> m_edit_event_handler;