Bug 100296

Summary: [WK2][Qt] Enable hover and mouse events in flickable WebView
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, cmarcelo, hausmann, kenneth, lokesh.kumar.goel, menard, svillar, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sergio Villar Senin 2012-10-24 15:23:42 PDT
[WK2][Qt] Enable hover and mouse events in flickable WebView
Comment 1 Sergio Villar Senin 2012-10-24 15:29:04 PDT
Created attachment 170488 [details]
Patch
Comment 2 Sergio Villar Senin 2012-10-24 15:37:16 PDT
So this is basically a follow up of a discussion that started in bug 80542. It was mentioned that hybrid devices (mixing touch and pointing interfaces) like the ones that will be likely shipped with Windows 8 or devices with pointing controllers (similar to Wii) will likely use a flickable webview and would require mouse event handling.

Apart from that I talked to Kenneth on IRC and he told me that the idea of the WebKitQt maintainers is to move towards having all the functionality of the legacy webView to the flickable one. So this might be a step in the right direction.

I was not sure if I should include a patch to the MiniBrowser also, because right now it's generating touch events from mouse events and we might think about removing that. I guess it was done for testing purposes or the like, but don't know all the details as I'm more familiar with the Gtk+ port.
Comment 3 Andras Becsi 2012-10-25 03:20:00 PDT
(In reply to comment #2)
> So this is basically a follow up of a discussion that started in bug 80542. It was mentioned that hybrid devices (mixing touch and pointing interfaces) like the ones that will be likely shipped with Windows 8 or devices with pointing controllers (similar to Wii) will likely use a flickable webview and would require mouse event handling.

Since http://trac.webkit.org/changeset/124455 the code paths for mouse and touch are unified and mouse events were enabled for the flickable webview also.

> 
> Apart from that I talked to Kenneth on IRC and he told me that the idea of the WebKitQt maintainers is to move towards having all the functionality of the legacy webView to the flickable one. So this might be a step in the right direction.
> 
> I was not sure if I should include a patch to the MiniBrowser also, because right now it's generating touch events from mouse events and we might think about removing that. I guess it was done for testing purposes or the like, but don't know all the details as I'm more familiar with the Gtk+ port.

MiniBrowser also does multi-touch mocking for mouse events when pressing the Ctrl key which is useful for testing pinch-zoom on a desktop without a touch device, thus it should remain as is for testing purposes.
Comment 4 Andras Becsi 2012-10-25 03:23:11 PDT
Comment on attachment 170488 [details]
Patch

Enabling hover events should be safe now, I think, so the patch looks OK.
Comment 5 Andras Becsi 2012-10-25 05:01:14 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > So this is basically a follow up of a discussion that started in bug 80542. It was mentioned that hybrid devices (mixing touch and pointing interfaces) like the ones that will be likely shipped with Windows 8 or devices with pointing controllers (similar to Wii) will likely use a flickable webview and would require mouse event handling.
> 
> Since http://trac.webkit.org/changeset/124455 the code paths for mouse and touch are unified and mouse events were enabled for the flickable webview also.
> 

That said, having a device that has both mouse and touch capabilities might result in some unexpected behaviour, especially because the gesture recognition logic is not prepared for some possible corner cases with alternating input events.
This should be addressed later.
Comment 6 Sergio Villar Senin 2012-10-25 15:35:39 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > So this is basically a follow up of a discussion that started in bug 80542. It was mentioned that hybrid devices (mixing touch and pointing interfaces) like the ones that will be likely shipped with Windows 8 or devices with pointing controllers (similar to Wii) will likely use a flickable webview and would require mouse event handling.
> > 
> > Since http://trac.webkit.org/changeset/124455 the code paths for mouse and touch are unified and mouse events were enabled for the flickable webview also.
> > 
> 
> That said, having a device that has both mouse and touch capabilities might result in some unexpected behaviour, especially because the gesture recognition logic is not prepared for some possible corner cases with alternating input events.
> This should be addressed later.

That's true but might be it should be addressed in a separate bug. So anything to change in the current patch?
Comment 7 Andras Becsi 2012-10-30 09:51:47 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #3)
> > > (In reply to comment #2)
> > > > So this is basically a follow up of a discussion that started in bug 80542. It was mentioned that hybrid devices (mixing touch and pointing interfaces) like the ones that will be likely shipped with Windows 8 or devices with pointing controllers (similar to Wii) will likely use a flickable webview and would require mouse event handling.
> > > 
> > > Since http://trac.webkit.org/changeset/124455 the code paths for mouse and touch are unified and mouse events were enabled for the flickable webview also.
> > > 
> > 
> > That said, having a device that has both mouse and touch capabilities might result in some unexpected behaviour, especially because the gesture recognition logic is not prepared for some possible corner cases with alternating input events.
> > This should be addressed later.
> 
> That's true but might be it should be addressed in a separate bug. So anything to change in the current patch?

The patch is fine.
Of course other issues we find in relation to mouse and touch at the same time should be addressed in separate bugs.
Comment 8 Sergio Villar Senin 2012-10-30 10:08:15 PDT
Comment on attachment 170488 [details]
Patch

Clearing flags on attachment: 170488

Committed r132919: <http://trac.webkit.org/changeset/132919>
Comment 9 Sergio Villar Senin 2012-10-30 10:08:20 PDT
All reviewed patches have been landed.  Closing bug.