Bug 153740

Summary: [GTK] WebKitWebView should send crossing events to the WebProcess
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, commit-queue, gustavo, mcatanzaro, mrobinson
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 153990, 153995    
Bug Blocks: 187545    
Attachments:
Description Flags
Patch mcatanzaro: review+

Description Carlos Garcia Campos 2016-02-01 05:12:09 PST
We don't currently handle crossing events in the web view (enter/leave). That's why if you hover a scrollbar and leave the window, the scrollbar is still rendered as hovered.
Comment 1 Carlos Garcia Campos 2016-02-01 05:20:19 PST
Created attachment 270383 [details]
Patch

I'll try to make a layout test for this once bug #153479 is fixed.
Comment 2 WebKit Commit Bot 2016-02-01 05:22:22 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2016-02-07 09:21:28 PST
Comment on attachment 270383 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=270383&action=review

r=me with a test

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:816
> +    // if the coordinates of the leave event are for example (25.2, -0.9), the WebProcess will receive (25, 0) and any hit test will success

success -> succeed

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:817
> +    // because those coorindates are inside the web view.

coorindates -> coordinates
Comment 4 Carlos Garcia Campos 2016-02-08 01:15:17 PST
I'll add the test once bug #153479 is fixed, let's not block this on that.
Comment 5 Carlos Garcia Campos 2016-02-08 08:59:51 PST
Committed r196253: <http://trac.webkit.org/changeset/196253>
Comment 6 WebKit Commit Bot 2016-02-08 10:24:20 PST
Re-opened since this is blocked by bug 153990
Comment 7 Carlos Garcia Campos 2016-02-08 10:58:05 PST
Crashes were not actually introduced by this patch, but for some reason I don't know yet, it happens after this patch. It only affects WTR, because it forces the events IPC messages to be synchronous, and it ends up in an infinite loop.

#0  0x00007ffff5bbb133 in IPC::Connection::sendMessage(std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, unsigned int, bool) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1  0x00007ffff5bbc48c in IPC::Connection::sendSyncMessage(unsigned long, std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, std::chrono::duration<long, std::ratio<1l, 1000l> >, unsigned int) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007ffff5bbb1f5 in IPC::Connection::sendMessage(std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, unsigned int, bool) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007ffff5c20e37 in WebKit::ChildProcessProxy::sendMessage(std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, unsigned int) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007ffff5c5c02a in bool WebKit::ChildProcessProxy::send<Messages::WebPage::MouseEvent>(Messages::WebPage::MouseEvent&&, unsigned long, unsigned int) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007ffff5c4579c in WebKit::WebPageProxy::handleMouseEvent(WebKit::NativeWebMouseEvent const&) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#6  0x00007ffff5c5170a in WebKit::WebPageProxy::didReceiveEvent(unsigned int, bool) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#7  0x00007ffff5e686f7 in WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#8  0x00007ffff5bbf039 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::MessageDecoder&) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#9  0x00007ffff5c75102 in WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#10 0x00007ffff5bbb546 in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::MessageDecoder, std::default_delete<IPC::MessageDecoder> >) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#11 0x00007ffff5bbb89e in IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#12 0x00007ffff5bbb4a1 in IPC::Connection::dispatchSyncMessage(IPC::MessageDecoder&) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#13 0x00007ffff5bbb5bd in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::MessageDecoder, std::default_delete<IPC::MessageDecoder> >) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#14 0x00007ffff5bbb89e in IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#15 0x00007ffff5bbbd8f in IPC::Connection::waitForSyncReply(unsigned long, std::chrono::duration<long, std::ratio<1l, 1000l> >, unsigned int) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#16 0x00007ffff5bbc4b8 in IPC::Connection::sendSyncMessage(unsigned long, std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, std::chrono::duration<long, std::ratio<1l, 1000l> >, unsigned int) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#17 0x00007ffff5bbb1f5 in IPC::Connection::sendMessage(std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, unsigned int, bool) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#18 0x00007ffff5c20e37 in WebKit::ChildProcessProxy::sendMessage(std::unique_ptr<IPC::MessageEncoder, std::default_delete<IPC::MessageEncoder> >, unsigned int) ()
   from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
......

I'll file a separate bug report for this problem
Comment 8 Carlos Garcia Campos 2016-02-08 11:42:53 PST
Committed r196265: <http://trac.webkit.org/changeset/196265>