<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>80542</bug_id>
          
          <creation_ts>2012-03-07 14:26:58 -0800</creation_ts>
          <short_desc>[Qt WK2] Disable/enable mouse events when displaying dialogs only for desktop view</short_desc>
          <delta_ts>2012-03-26 08:50:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dinu Jacob">dinu.jacob</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abecsi</cc>
    
    <cc>hausmann</cc>
    
    <cc>menard</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>573240</commentid>
    <comment_count>0</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-07 14:26:58 -0800</bug_when>
    <thetext>Mouse events are disabled when displaying dialogs and then enabled on dismissing them for both touch view and desktop views. This causes the mouse events to be enabled for touch views after dismissing any dialog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573242</commentid>
    <comment_count>1</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-07 14:28:43 -0800</bug_when>
    <thetext>Mouse events are enabled only for desktop view on creation. It seems wrong that they get enabled for touch view as well after a dialog is dismissed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573271</commentid>
    <comment_count>2</comment_count>
      <attachid>130701</attachid>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-07 14:57:21 -0800</bug_when>
    <thetext>Created attachment 130701
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573811</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-03-08 07:07:04 -0800</bug_when>
    <thetext>I wonder if they should be enabled all the way. This distinction between touch and desktop view makes less sense when you think of desktop computers with real touch screens and a mouse attached, or laptops like the dell latitude with touch screen and touch pad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573983</commentid>
    <comment_count>4</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-08 11:16:21 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I wonder if they should be enabled all the way. This distinction between touch and desktop view makes less sense when you think of desktop computers with real touch screens and a mouse attached, or laptops like the dell latitude with touch screen and touch pad.

A couple of questions:

- It seems like WebView will not receive the mouse events as flickable ( a child of webview )  always accepts the events.  Which means enabling/disabling the flag for WebView has no impact (though it would still be wrong to enable it after a dialog is dismissed). Is this right that flickable always accepts the mpuse events?

- If the mouse events are received by WebView and are sent down to WebPage, for such a device, wouldn’t it result in two sets of mouse events for a tap gesture as one set of fake mouse events are also generated for a tap gesture?
On a side note, on such devices, will Qt  still send mouse events for the touch events as well? (So, will the flickable for example receive two sets of mouse events in this case?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574698</commentid>
    <comment_count>5</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-03-09 00:29:05 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; I wonder if they should be enabled all the way. This distinction between touch and desktop view makes less sense when you think of desktop computers with real touch screens and a mouse attached, or laptops like the dell latitude with touch screen and touch pad.
&gt; 
&gt; A couple of questions:
&gt; 
&gt; - It seems like WebView will not receive the mouse events as flickable ( a child of webview )  always accepts the events.  Which means enabling/disabling the flag for WebView has no impact (though it would still be wrong to enable it after a dialog is dismissed). Is this right that flickable always accepts the mpuse events?

The Flickable reacting on mouse events was the reason why we needed to swallow real mouse events in MiniBrowser, and synthesize mouse events out of touch events in QtFlickProvider.

This should only be an issue when testing the flickable web view on desktop, so when setting the flag in the WebView we could also set flickable.setInteractive(false), which should disable the Flickable.

&gt; 
&gt; - If the mouse events are received by WebView and are sent down to WebPage, for such a device, wouldn’t it result in two sets of mouse events for a tap gesture as one set of fake mouse events are also generated for a tap gesture?
&gt; On a side note, on such devices, will Qt  still send mouse events for the touch events as well? (So, will the flickable for example receive two sets of mouse events in this case?)

In legacy mode (desktop / mouse mode) we do not have a Flickable at all, Qt only sends native mouse events and we should not synthesize touch events, hence there is no tap gesture in that case.
Note that this behaviour was recently fixed for MiniBrowser --desktop, since the mocking was not disabled by default.

The problems only arise for the mobile / flickable WebView, both when testing it on desktop (we have to do touch mocking for the WebView), and on the device (we let Qt synthesize mouse events for the URL bar).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574845</commentid>
    <comment_count>6</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-09 05:51:06 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #3)
&gt; &gt; &gt; I wonder if they should be enabled all the way. This distinction between touch and desktop view makes less sense when you think of desktop computers with real touch screens and a mouse attached, or laptops like the dell latitude with touch screen and touch pad.
&gt; &gt; 
&gt; &gt; A couple of questions:
&gt; &gt; 
&gt; &gt; - It seems like WebView will not receive the mouse events as flickable ( a child of webview )  always accepts the events.  Which means enabling/disabling the flag for WebView has no impact (though it would still be wrong to enable it after a dialog is dismissed). Is this right that flickable always accepts the mpuse events?
&gt; 
&gt; The Flickable reacting on mouse events was the reason why we needed to swallow real mouse events in MiniBrowser, and synthesize mouse events out of touch events in QtFlickProvider.
&gt; 

On a touch device with mouse, even though the mouse events are swallowed by MiniBrowser, wouldn&apos;t it still result in two sets of touch events (the synthesized touch events and the actual touch events) that would potentially mess up the gesture recognition? (And for a thirdparty client using the webView who doesn&apos;t filter the mouse events, flickable will end up receiving the native mouse events as well the mouse events synthesized by Qt).

&gt; This should only be an issue when testing the flickable web view on desktop, so when setting the flag in the WebView we could also set flickable.setInteractive(false), which should disable the Flickable.
&gt; 
I didn&apos;t quite follow this...
&gt; &gt; 
&gt; &gt; - If the mouse events are received by WebView and are sent down to WebPage, for such a device, wouldn’t it result in two sets of mouse events for a tap gesture as one set of fake mouse events are also generated for a tap gesture?
&gt; &gt; On a side note, on such devices, will Qt  still send mouse events for the touch events as well? (So, will the flickable for example receive two sets of mouse events in this case?)
&gt; 
&gt; In legacy mode (desktop / mouse mode) we do not have a Flickable at all, Qt only sends native mouse events and we should not synthesize touch events, hence there is no tap gesture in that case.
&gt; Note that this behaviour was recently fixed for MiniBrowser --desktop, since the mocking was not disabled by default.
&gt; 
&gt; The problems only arise for the mobile / flickable WebView, both when testing it on desktop (we have to do touch mocking for the WebView), and on the device (we let Qt synthesize mouse events for the URL bar).

Yes, it was the webView I was thinking of when mentioning the tapGesture.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574848</commentid>
    <comment_count>7</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-09 05:59:58 -0800</bug_when>
    <thetext>As flickable webView wouldn&apos;t receive the mouse events is there any benefit of enabling mouse events for it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>575509</commentid>
    <comment_count>8</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-03-10 05:58:18 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; As flickable webView wouldn&apos;t receive the mouse events is there any benefit of enabling mouse events for it?

Sorry, I was somewhat superficial when reading your questions and did not look at the patch.

If the Flickable is in use the mouse handling on the WebView has to be disabled since they will be delivered to the Flickable first, which is undesirable.
This is another reason why we need to subclass Flickable for the WebView item instead of internally instantiating it.

Qt only synthesizes mouse events for touch events which were not accepted, so if the touch event sent by the touch device would be accepted we would not receive a mouse event from Qt.

MiniBrowser and the WebView is indeed not yet prepared for the mentioned hybrid devices and fixing this is clearly not the scope of this bug.

For the currently supported configurations we should keep the distinction between the touch and desktop view, hence I think this patch is correct and fixes inconsistent behavior of the web view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>583057</commentid>
    <comment_count>9</comment_count>
    <who name="Dinu Jacob">dinu.jacob</who>
    <bug_when>2012-03-20 07:37:12 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; As flickable webView wouldn&apos;t receive the mouse events is there any benefit of enabling mouse events for it?
&gt; 
&gt; Sorry, I was somewhat superficial when reading your questions and did not look at the patch.
&gt; 
&gt; If the Flickable is in use the mouse handling on the WebView has to be disabled since they will be delivered to the Flickable first, which is undesirable.
&gt; This is another reason why we need to subclass Flickable for the WebView item instead of internally instantiating it.
&gt; 
&gt; Qt only synthesizes mouse events for touch events which were not accepted, so if the touch event sent by the touch device would be accepted we would not receive a mouse event from Qt.
&gt; 
&gt; MiniBrowser and the WebView is indeed not yet prepared for the mentioned hybrid devices and fixing this is clearly not the scope of this bug.
&gt; 
&gt; For the currently supported configurations we should keep the distinction between the touch and desktop view, hence I think this patch is correct and fixes inconsistent behavior of the web view.

Simon, can you take a look at this again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>587789</commentid>
    <comment_count>10</comment_count>
      <attachid>130701</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-26 08:50:25 -0700</bug_when>
    <thetext>Comment on attachment 130701
Patch

Clearing flags on attachment: 130701

Committed r112105: &lt;http://trac.webkit.org/changeset/112105&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>587790</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-26 08:50:31 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>130701</attachid>
            <date>2012-03-07 14:57:21 -0800</date>
            <delta_ts>2012-03-26 08:50:25 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>80542.patch</filename>
            <type>text/plain</type>
            <size>3420</size>
            <attacher name="Dinu Jacob">dinu.jacob</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCAzZjFjZDRjLi45NjhlY2U2IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDUgKzEsMjAg
QEAKIDIwMTItMDMtMDcgIERpbnUgSmFjb2IgIDxkaW51LmphY29iQG5va2lhLmNvbT4KIAorICAg
ICAgICBbUXQgV0syXSBEaXNhYmxlL2VuYWJsZSBtb3VzZSBldmVudHMgd2hlbiBkaXNwbGF5aW5n
IGRpYWxvZ3Mgb25seSBmb3IgZGVza3RvcCB2aWV3CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJr
aXQub3JnL3Nob3dfYnVnLmNnaT9pZD04MDU0MgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorICAgICAgIAorICAgICAgICAqIFVJUHJvY2Vzcy9BUEkvcXQvcXF1aWNrd2Vi
dmlldy5jcHA6CisgICAgICAgIChRUXVpY2tXZWJWaWV3TGVnYWN5UHJpdmF0ZTo6ZW5hYmxlTW91
c2VFdmVudHMpOgorICAgICAgICAoUVF1aW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