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
commit a802fb2023
Notes: sideshowbarker 2024-07-17 11:30:05 +09:00
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;