mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Add support for handling drag-and-drop events of DOM elements
This allows dragging elements on the page and dropping them onto other elements. This does not yet support dragging text. The test added here is manual; the WPT tests rely heavily on WebDriver actions.
This commit is contained in:
Notes:
github-actions[bot]
2026-04-05 15:35:41 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/cfe7ddc8058 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8783
@@ -121,6 +121,7 @@ private:
|
||||
GC::Ptr<Painting::PaintableBox const> paint_root() const;
|
||||
|
||||
bool should_ignore_device_input_event() const;
|
||||
bool is_dragging_element() const;
|
||||
|
||||
void handle_gamepad_connected(SDL_JoystickID);
|
||||
void handle_gamepad_updated(SDL_JoystickID);
|
||||
@@ -139,7 +140,9 @@ private:
|
||||
|
||||
GC::Weak<DOM::Node> m_effective_legacy_mouse_pointer_position;
|
||||
|
||||
Optional<u32> m_mousedown_button;
|
||||
GC::Weak<DOM::Node> m_mousedown_target;
|
||||
Optional<CSSPixelPoint> m_mousedown_visual_viewport_position;
|
||||
int m_mousedown_click_count { 0 };
|
||||
|
||||
// https://w3c.github.io/pointerevents/#the-pointerdown-event
|
||||
|
||||
Reference in New Issue
Block a user