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

LibWeb: Fix calculation of MouseEvent::client_{x,y}

MouseEvent.client{X,Y} should be relative to the viewport.
This commit is contained in:
Itamar 2022-12-31 16:04:48 +02:00 committed by Andreas Kling
parent 3dccee6025
commit 66ee08c3dc
2 changed files with 19 additions and 5 deletions

View file

@ -41,6 +41,7 @@ private:
bool focus_previous_element();
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;
Layout::InitialContainingBlock* layout_root();
Layout::InitialContainingBlock const* layout_root() const;