mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb+UI: Add tooltip overriding and use it for <video> tags
This call is used to inform the chrome that it should display a tooltip now and avoid any hovering timers. This is used by <video> tags to display the volume percentage when it is changed.
This commit is contained in:
parent
0f7623dd83
commit
ceb9c3b797
Notes:
sideshowbarker
2024-07-17 01:55:29 +09:00
Author: https://github.com/circl-lastname
Commit: ceb9c3b797
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/368
11 changed files with 79 additions and 5 deletions
|
@ -318,6 +318,17 @@ Gfx::IntRect PageClient::page_did_request_fullscreen_window()
|
|||
return client().did_request_fullscreen_window(m_id);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_tooltip_override(Web::CSSPixelPoint position, ByteString const& title)
|
||||
{
|
||||
auto device_position = page().css_to_device_point(position);
|
||||
client().async_did_request_tooltip_override(m_id, { device_position.x(), device_position.y() }, title);
|
||||
}
|
||||
|
||||
void PageClient::page_did_stop_tooltip_override()
|
||||
{
|
||||
client().async_did_leave_tooltip_area(m_id);
|
||||
}
|
||||
|
||||
void PageClient::page_did_enter_tooltip_area(ByteString const& title)
|
||||
{
|
||||
client().async_did_enter_tooltip_area(m_id, title);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue