mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Partially implement MouseEvent.movementX/movementY
Currently doesn't handle the mouse leaving and entering the window per the spec, and uses clientX/Y instead of screenX/Y. See FIXMEs.
This commit is contained in:
parent
ebb7079795
commit
e0e67a2b27
Notes:
sideshowbarker
2024-07-17 03:25:24 +09:00
Author: https://github.com/circl-lastname
Commit: e0e67a2b27
Pull-request: https://github.com/SerenityOS/serenity/pull/20749
Reviewed-by: https://github.com/ADKaster ✅
5 changed files with 51 additions and 8 deletions
|
@ -44,6 +44,7 @@ private:
|
|||
bool fire_keyboard_event(FlyString const& event_name, HTML::BrowsingContext& browsing_context, KeyCode key, unsigned modifiers, u32 code_point);
|
||||
CSSPixelPoint compute_mouse_event_client_offset(CSSPixelPoint event_page_position) const;
|
||||
CSSPixelPoint compute_mouse_event_page_offset(CSSPixelPoint event_client_offset) const;
|
||||
CSSPixelPoint compute_mouse_event_movement(CSSPixelPoint event_client_offset) const;
|
||||
|
||||
struct Target {
|
||||
JS::GCPtr<Painting::Paintable> paintable;
|
||||
|
@ -63,6 +64,8 @@ private:
|
|||
NonnullOwnPtr<EditEventHandler> m_edit_event_handler;
|
||||
|
||||
WeakPtr<DOM::EventTarget> m_mousedown_target;
|
||||
|
||||
Optional<CSSPixelPoint> m_mousemove_previous_client_offset;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue