mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +00:00
LibWeb+WebContent+headless-browser: Use CSSPixels for PageClient events
...and also for hit testing, which is involved in most of them. Much of this is temporary conversions and other awkwardness, which should resolve itself as the rest of LibWeb is converted to these new types. Hopefully. :thousandyakstare:
This commit is contained in:
parent
045aa8530c
commit
3c7bd5a317
27 changed files with 169 additions and 159 deletions
|
@ -122,29 +122,29 @@ DevicePixelRect Page::rounded_device_rect(CSSPixelRect rect) const
|
|||
};
|
||||
}
|
||||
|
||||
bool Page::handle_mousewheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y)
|
||||
bool Page::handle_mousewheel(DevicePixelPoint position, unsigned button, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y)
|
||||
{
|
||||
return top_level_browsing_context().event_handler().handle_mousewheel(position, button, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
||||
return top_level_browsing_context().event_handler().handle_mousewheel(device_to_css_point(position), button, buttons, modifiers, wheel_delta_x, wheel_delta_y);
|
||||
}
|
||||
|
||||
bool Page::handle_mouseup(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
bool Page::handle_mouseup(DevicePixelPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
{
|
||||
return top_level_browsing_context().event_handler().handle_mouseup(position, button, buttons, modifiers);
|
||||
return top_level_browsing_context().event_handler().handle_mouseup(device_to_css_point(position), button, buttons, modifiers);
|
||||
}
|
||||
|
||||
bool Page::handle_mousedown(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
bool Page::handle_mousedown(DevicePixelPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
{
|
||||
return top_level_browsing_context().event_handler().handle_mousedown(position, button, buttons, modifiers);
|
||||
return top_level_browsing_context().event_handler().handle_mousedown(device_to_css_point(position), button, buttons, modifiers);
|
||||
}
|
||||
|
||||
bool Page::handle_mousemove(Gfx::IntPoint position, unsigned buttons, unsigned modifiers)
|
||||
bool Page::handle_mousemove(DevicePixelPoint position, unsigned buttons, unsigned modifiers)
|
||||
{
|
||||
return top_level_browsing_context().event_handler().handle_mousemove(position, buttons, modifiers);
|
||||
return top_level_browsing_context().event_handler().handle_mousemove(device_to_css_point(position), buttons, modifiers);
|
||||
}
|
||||
|
||||
bool Page::handle_doubleclick(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
bool Page::handle_doubleclick(DevicePixelPoint position, unsigned button, unsigned buttons, unsigned modifiers)
|
||||
{
|
||||
return top_level_browsing_context().event_handler().handle_doubleclick(position, button, buttons, modifiers);
|
||||
return top_level_browsing_context().event_handler().handle_doubleclick(device_to_css_point(position), button, buttons, modifiers);
|
||||
}
|
||||
|
||||
bool Page::handle_keydown(KeyCode key, unsigned modifiers, u32 code_point)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue