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

LibWeb: Support MouseEvent.{pageX,pageY}

Unlike client{X,Y} which is relative to the current viewport, these
offsets are relative to the left edge of the document (i.e they take
scroll offset into account).
This commit is contained in:
Itamar 2022-12-31 16:40:36 +02:00 committed by Andreas Kling
parent f6862a4203
commit a802fb2023
5 changed files with 37 additions and 8 deletions

View file

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