[Qt WK2] Disable/enable mouse events when displaying dialogs only for desktop view
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 15:50:09 +0000 (15:50 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 15:50:09 +0000 (15:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80542

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-03-26
Reviewed by Simon Hausmann.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewLegacyPrivate::enableMouseEvents):
(QQuickWebViewLegacyPrivate::disableMouseEvents):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::enableMouseEvents):
(QQuickWebViewPrivate::disableMouseEvents):
(QQuickWebViewLegacyPrivate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h

index a981bb8..6bb3539 100644 (file)
@@ -1,3 +1,18 @@
+2012-03-26  Dinu Jacob  <dinu.jacob@nokia.com>
+
+        [Qt WK2] Disable/enable mouse events when displaying dialogs only for desktop view
+        https://bugs.webkit.org/show_bug.cgi?id=80542
+
+        Reviewed by Simon Hausmann.
+       
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewLegacyPrivate::enableMouseEvents):
+        (QQuickWebViewLegacyPrivate::disableMouseEvents):
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate::enableMouseEvents):
+        (QQuickWebViewPrivate::disableMouseEvents):
+        (QQuickWebViewLegacyPrivate):
+
 2012-03-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
         [Qt] Make sure that purged directly composited images are re-created before a layer's sync.
index 87d402d..03124d9 100644 (file)
@@ -137,20 +137,6 @@ bool QQuickWebViewPrivate::transparentBackground() const
     return webPageProxy->drawsTransparentBackground();
 }
 
-void QQuickWebViewPrivate::enableMouseEvents()
-{
-    Q_Q(QQuickWebView);
-    q->setAcceptedMouseButtons(Qt::MouseButtonMask);
-    q->setAcceptHoverEvents(true);
-}
-
-void QQuickWebViewPrivate::disableMouseEvents()
-{
-    Q_Q(QQuickWebView);
-    q->setAcceptedMouseButtons(Qt::NoButton);
-    q->setAcceptHoverEvents(false);
-}
-
 QPointF QQuickWebViewPrivate::pageItemPos()
 {
     ASSERT(pageView);
@@ -504,6 +490,20 @@ void QQuickWebViewLegacyPrivate::updateViewportSize()
     webPageProxy->drawingArea()->setVisibleContentsRect(IntRect(IntPoint(), viewportSize), 1, FloatPoint());
 }
 
+void QQuickWebViewLegacyPrivate::enableMouseEvents()
+{
+    Q_Q(QQuickWebView);
+    q->setAcceptedMouseButtons(Qt::MouseButtonMask);
+    q->setAcceptHoverEvents(true);
+}
+
+void QQuickWebViewLegacyPrivate::disableMouseEvents()
+{
+    Q_Q(QQuickWebView);
+    q->setAcceptedMouseButtons(Qt::NoButton);
+    q->setAcceptHoverEvents(false);
+}
+
 QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate(QQuickWebView* viewport)
     : QQuickWebViewPrivate(viewport)
     , pageIsSuspended(true)
index 88b11c6..cc41ee4 100644 (file)
@@ -66,8 +66,8 @@ public:
 
     virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
 
-    void enableMouseEvents();
-    void disableMouseEvents();
+    virtual void enableMouseEvents() { }
+    virtual void disableMouseEvents() { }
 
     virtual QPointF pageItemPos();
     virtual void updateContentsSize(const QSizeF&) { }
@@ -178,6 +178,8 @@ public:
     virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
 
     virtual void updateViewportSize();
+    virtual void enableMouseEvents();
+    virtual void disableMouseEvents();
 };
 
 class QQuickWebViewFlickablePrivate : public QQuickWebViewPrivate {