WebContent: Send tooltip screen location in device coordinate space

This makes tooltips pop up in the right location when zoomed in and
using the Qt chrome.
This commit is contained in:
Andreas Kling 2024-04-26 10:42:18 +02:00
commit e6c0b4631f
Notes: sideshowbarker 2024-07-17 06:33:00 +09:00

View file

@ -325,7 +325,8 @@ void PageClient::page_did_request_scroll_to(Web::CSSPixelPoint scroll_position)
void PageClient::page_did_enter_tooltip_area(Web::CSSPixelPoint content_position, ByteString const& title)
{
client().async_did_enter_tooltip_area(m_id, { content_position.x().to_int(), content_position.y().to_int() }, title);
auto device_position = page().css_to_device_point(content_position);
client().async_did_enter_tooltip_area(m_id, { device_position.x(), device_position.y() }, title);
}
void PageClient::page_did_leave_tooltip_area()