mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
LibWeb: Leave tooltip or unhover link only if page entered/hovered one
Before, on a mouse-move event, if the hovered html element did not have a tooltip or it was not a link, `page_did_leave_tooltip_area()` and `page_did_unhover_link()` virtual functions would get called. Now, the page remembers if it is in a tooltip area or hovering a link and only informs of leaving or unhovering only if it was.
This commit is contained in:
parent
318fc62b53
commit
d48831e893
Notes:
github-actions[bot]
2024-12-10 13:30:47 +00:00
Author: https://github.com/ronak69
Commit: d48831e893
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1411
2 changed files with 19 additions and 3 deletions
|
@ -121,6 +121,12 @@ public:
|
|||
bool is_webdriver_active() const { return m_is_webdriver_active; }
|
||||
void set_is_webdriver_active(bool b) { m_is_webdriver_active = b; }
|
||||
|
||||
bool is_hovering_link() const { return m_is_hovering_link; }
|
||||
void set_is_hovering_link(bool b) { m_is_hovering_link = b; }
|
||||
|
||||
bool is_in_tooltip_area() const { return m_is_in_tooltip_area; }
|
||||
void set_is_in_tooltip_area(bool b) { m_is_in_tooltip_area = b; }
|
||||
|
||||
Gfx::StandardCursor current_cursor() const { return m_current_cursor; }
|
||||
void set_current_cursor(Gfx::StandardCursor cursor) { m_current_cursor = cursor; }
|
||||
|
||||
|
@ -249,6 +255,9 @@ private:
|
|||
// The webdriver-active flag is set to true when the user agent is under remote control. It is initially false.
|
||||
bool m_is_webdriver_active { false };
|
||||
|
||||
bool m_is_hovering_link { false };
|
||||
bool m_is_in_tooltip_area { false };
|
||||
|
||||
Gfx::StandardCursor m_current_cursor { Gfx::StandardCursor::Arrow };
|
||||
|
||||
DevicePixelPoint m_window_position {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue