Title: [122987] trunk/Source/WebKit2
Revision
122987
Author
[email protected]
Date
2012-07-18 10:43:36 -0700 (Wed, 18 Jul 2012)

Log Message

[Qt] QQuickWebView shouldn't recieve mouse events while dialogs are active
https://bugs.webkit.org/show_bug.cgi?id=91634

Reviewed by Alexis Menard.

One side-effect of reimplementing childMouseEventFilter() in r122438 is that it can end up
bypassing the mouseArea mechanism used in QML dialogs and still forward some mouse events
over to the web process. We can rely on the same m_dialogActive mechanism already used for
touch events in there as well.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::childMouseEventFilter): ignore events and return early if a dialog is active.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (122986 => 122987)


--- trunk/Source/WebKit2/ChangeLog	2012-07-18 17:37:29 UTC (rev 122986)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-18 17:43:36 UTC (rev 122987)
@@ -1,5 +1,20 @@
 2012-07-18  Pierre Rossi  <[email protected]>
 
+        [Qt] QQuickWebView shouldn't recieve mouse events while dialogs are active
+        https://bugs.webkit.org/show_bug.cgi?id=91634
+
+        Reviewed by Alexis Menard.
+
+        One side-effect of reimplementing childMouseEventFilter() in r122438 is that it can end up
+        bypassing the mouseArea mechanism used in QML dialogs and still forward some mouse events
+        over to the web process. We can rely on the same m_dialogActive mechanism already used for
+        touch events in there as well.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebView::childMouseEventFilter): ignore events and return early if a dialog is active.
+
+2012-07-18  Pierre Rossi  <[email protected]>
+
         [Qt] Build fix for ENABLE_TOUCH_EVENTS=0
 
         Rubber-stamped by No'am Rosenthal.

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (122986 => 122987)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-07-18 17:37:29 UTC (rev 122986)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-07-18 17:43:36 UTC (rev 122987)
@@ -1660,6 +1660,12 @@
     if (!isVisible() || !isEnabled() || !s_flickableViewportEnabled)
         return QQuickFlickable::childMouseEventFilter(item, event);
 
+    Q_D(QQuickWebView);
+    if (d->m_dialogActive) {
+        event->ignore();
+        return false;
+    }
+
     // This function is used by MultiPointTouchArea and PinchArea to filter
     // touch events, thus to hinder the canvas from sending synthesized
     // mouse events to the Flickable implementation we need to reimplement
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to