mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibWeb: Use widget override cursors
This commit is contained in:
parent
7a2faecc15
commit
5872cb398c
2 changed files with 4 additions and 8 deletions
|
@ -357,9 +357,7 @@ void InProcessWebView::load_html(const StringView& html, const URL& url)
|
|||
|
||||
bool InProcessWebView::load(const URL& url)
|
||||
{
|
||||
if (window())
|
||||
window()->set_cursor(Gfx::StandardCursor::None);
|
||||
|
||||
set_override_cursor(Gfx::StandardCursor::None);
|
||||
return page().main_frame().loader().load(url, FrameLoader::Type::Navigation);
|
||||
}
|
||||
|
||||
|
@ -378,7 +376,7 @@ LayoutDocument* InProcessWebView::layout_root()
|
|||
void InProcessWebView::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
|
||||
{
|
||||
scroll_into_view(rect, true, true);
|
||||
window()->set_cursor(Gfx::StandardCursor::None);
|
||||
set_override_cursor(Gfx::StandardCursor::None);
|
||||
}
|
||||
|
||||
void InProcessWebView::load_empty_document()
|
||||
|
|
|
@ -137,16 +137,14 @@ void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebCo
|
|||
|
||||
void OutOfProcessWebView::notify_server_did_hover_link(Badge<WebContentClient>, const URL& url)
|
||||
{
|
||||
if (window())
|
||||
window()->set_cursor(Gfx::StandardCursor::Hand);
|
||||
set_override_cursor(Gfx::StandardCursor::Hand);
|
||||
if (on_link_hover)
|
||||
on_link_hover(url);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_unhover_link(Badge<WebContentClient>)
|
||||
{
|
||||
if (window())
|
||||
window()->set_cursor(Gfx::StandardCursor::None);
|
||||
set_override_cursor(Gfx::StandardCursor::None);
|
||||
if (on_link_hover)
|
||||
on_link_hover({});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue