Notify ChromeClient when touch-event handlers are installed/removed.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 20:21:15 +0000 (20:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 20:21:15 +0000 (20:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77440

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-02-15
Reviewed by Darin Fisher and Ryosuke Niwa.

Source/WebCore:

Keep a count of the number of touch-event handlers and notify the
embedder when the count changes. Depending on the count, the embedder
can decide whether or not to dispatch touch events to webkit.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAddTouchEventHandler):
(WebCore):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/Document.h:
(WebCore::Document::touchEventHandlerCount):
(Document):
* dom/Node.cpp:
(WebCore::isTouchEventType):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::numTouchEventHandlersChanged):
* page/ChromeClient.h:
(ChromeClient):
* page/Frame.cpp:
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::notifyChromeClientTouchEventHandlerCountChanged):
(WebCore):
* page/Frame.h:
(Frame):

Source/WebKit/chromium:

* public/WebViewClient.h:
(WebKit::WebViewClient::numberOfTouchEventHandlersChanged):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::numTouchEventHandlersChanged):
(WebKit):
* src/ChromeClientImpl.h:
(ChromeClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::numberOfTouchEventHandlersChanged):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.h:
(WebCore::ChromeClientEfl::numTouchEventHandlersChanged):

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.h:
(WebKit::ChromeClient::numTouchEventHandlersChanged):

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.h:
(WebCore::ChromeClientQt::numTouchEventHandlersChanged):

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.h:
(WebChromeClient::numTouchEventHandlersChanged):

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.h:
(WebKit::ChromeClientWinCE::numTouchEventHandlersChanged):

Source/WebKit/wx:

* WebKitSupport/ChromeClientWx.h:
(WebCore::ChromeClientWx::numTouchEventHandlersChanged):

Source/WebKit2:

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::numTouchEventHandlersChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Node.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebViewClient.h
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index be36e7f..cc9fca6 100644 (file)
@@ -1,3 +1,37 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        Keep a count of the number of touch-event handlers and notify the
+        embedder when the count changes. Depending on the count, the embedder
+        can decide whether or not to dispatch touch events to webkit.
+
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::didAddTouchEventHandler):
+        (WebCore):
+        (WebCore::Document::didRemoveTouchEventHandler):
+        * dom/Document.h:
+        (WebCore::Document::touchEventHandlerCount):
+        (Document):
+        * dom/Node.cpp:
+        (WebCore::isTouchEventType):
+        (WebCore::tryAddEventListener):
+        (WebCore::tryRemoveEventListener):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyChromeClient::numTouchEventHandlersChanged):
+        * page/ChromeClient.h:
+        (ChromeClient):
+        * page/Frame.cpp:
+        (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
+        (WebCore::Frame::notifyChromeClientTouchEventHandlerCountChanged):
+        (WebCore):
+        * page/Frame.h:
+        (Frame):
+
 2012-02-15  Eric Carlson  <eric.carlson@apple.com>
 
         Unset the active flag when TextTrackCues go away
index 30bf5bf..8f4aec1 100644 (file)
@@ -437,6 +437,7 @@ Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML)
     , m_writeRecursionIsTooDeep(false)
     , m_writeRecursionDepth(0)
     , m_wheelEventHandlerCount(0)
+    , m_touchEventHandlerCount(0)
     , m_pendingTasksTimer(this, &Document::pendingTasksTimerFired)
 {
     m_document = this;
@@ -5410,6 +5411,23 @@ void Document::didRemoveWheelEventHandler()
     wheelEventHandlerCountChanged(this);
 }
 
+void Document::didAddTouchEventHandler()
+{
+    ++m_touchEventHandlerCount;
+    Frame* mainFrame = page() ? page()->mainFrame() : 0;
+    if (mainFrame)
+        mainFrame->notifyChromeClientTouchEventHandlerCountChanged();
+}
+
+void Document::didRemoveTouchEventHandler()
+{
+    ASSERT(m_touchEventHandlerCount > 0);
+    --m_touchEventHandlerCount;
+    Frame* mainFrame = page() ? page()->mainFrame() : 0;
+    if (mainFrame)
+        mainFrame->notifyChromeClientTouchEventHandlerCountChanged();
+}
+
 bool Document::visualUpdatesAllowed() const
 {
     return !settings()
index a4bdad6..97a8d5e 100644 (file)
@@ -1113,6 +1113,10 @@ public:
     void didAddWheelEventHandler();
     void didRemoveWheelEventHandler();
 
+    unsigned touchEventHandlerCount() const { return m_touchEventHandlerCount; }
+    void didAddTouchEventHandler();
+    void didRemoveTouchEventHandler();
+
     bool visualUpdatesAllowed() const;
 
 #if ENABLE(MICRODATA)
@@ -1449,6 +1453,7 @@ private:
     unsigned m_writeRecursionDepth;
     
     unsigned m_wheelEventHandlerCount;
+    unsigned m_touchEventHandlerCount;
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     RefPtr<ScriptedAnimationController> m_scriptedAnimationController;
index 8b094be..9ecf002 100644 (file)
@@ -2479,6 +2479,11 @@ static inline HashSet<SVGElementInstance*> instancesForSVGElement(Node* node)
 }
 #endif
 
+static inline bool isTouchEventType(const AtomicString& eventType)
+{
+    return eventType == eventNames().touchstartEvent || eventType == eventNames().touchmoveEvent || eventType == eventNames().touchendEvent || eventType == eventNames().touchcancelEvent;
+}
+
 static inline bool tryAddEventListener(Node* targetNode, const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
 {
     if (!targetNode->EventTarget::addEventListener(eventType, listener, useCapture))
@@ -2488,6 +2493,8 @@ static inline bool tryAddEventListener(Node* targetNode, const AtomicString& eve
         document->addListenerTypeIfNeeded(eventType);
         if (eventType == eventNames().mousewheelEvent)
             document->didAddWheelEventHandler();
+        else if (isTouchEventType(eventType))
+            document->didAddTouchEventHandler();
     }
         
     return true;
@@ -2537,6 +2544,8 @@ static inline bool tryRemoveEventListener(Node* targetNode, const AtomicString&
     if (Document* document = targetNode->document()) {
         if (eventType == eventNames().mousewheelEvent)
             document->didRemoveWheelEventHandler();
+        else if (isTouchEventType(eventType))
+            document->didRemoveTouchEventHandler();
     }
     
     return true;
index 2eb24a3..a2641f7 100644 (file)
@@ -233,7 +233,8 @@ public:
     virtual void needTouchEvents(bool) { }
 #endif
     
-    virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numWheelEventHandlersChanged(unsigned) OVERRIDE { }
+    virtual void numTouchEventHandlersChanged(unsigned) OVERRIDE { }
     
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return false; }
 };
index 486625a..33b1c4b 100644 (file)
@@ -325,6 +325,7 @@ namespace WebCore {
         virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, FrameLoader::PageDismissalType) const { UNUSED_PARAM(dialogMessage); return true; }
 
         virtual void numWheelEventHandlersChanged(unsigned) = 0;
+        virtual void numTouchEventHandlersChanged(unsigned) = 0;
         
         virtual bool isSVGImageChromeClient() const { return false; }
 
index ca9cc9a..575e736 100644 (file)
@@ -293,8 +293,10 @@ void Frame::setDocument(PassRefPtr<Document> newDoc)
     if (m_doc)
         m_doc->updateViewportArguments();
 
-    if (m_page && m_page->mainFrame() == this)
+    if (m_page && m_page->mainFrame() == this) {
         notifyChromeClientWheelEventHandlerCountChanged();
+        notifyChromeClientTouchEventHandlerCountChanged();
+    }
 }
 
 #if ENABLE(ORIENTATION_EVENTS)
@@ -1020,16 +1022,30 @@ void Frame::notifyChromeClientWheelEventHandlerCountChanged() const
 {
     // Ensure that this method is being called on the main frame of the page.
     ASSERT(m_page && m_page->mainFrame() == this);
-    
+
     unsigned count = 0;
     for (const Frame* frame = this; frame; frame = frame->tree()->traverseNext()) {
         if (frame->document())
             count += frame->document()->wheelEventHandlerCount();
     }
-    
+
     m_page->chrome()->client()->numWheelEventHandlersChanged(count);
 }
 
+void Frame::notifyChromeClientTouchEventHandlerCountChanged() const
+{
+    // Ensure that this method is being called on the main frame of the page.
+    ASSERT(m_page && m_page->mainFrame() == this);
+
+    unsigned count = 0;
+    for (const Frame* frame = this; frame; frame = frame->tree()->traverseNext()) {
+        if (frame->document())
+            count += frame->document()->touchEventHandlerCount();
+    }
+
+    m_page->chrome()->client()->numTouchEventHandlersChanged(count);
+}
+
 #if !PLATFORM(MAC) && !PLATFORM(WIN)
 struct ScopedFramePaintingState {
     ScopedFramePaintingState(Frame* theFrame, RenderObject* theRenderer)
index 18da5f3..a7ac619 100644 (file)
@@ -195,6 +195,7 @@ namespace WebCore {
 
         // Should only be called on the main frame of a page.
         void notifyChromeClientWheelEventHandlerCountChanged() const;
+        void notifyChromeClientTouchEventHandlerCountChanged() const;
 
     // ========
 
index 53adb7c..81aeea6 100644 (file)
@@ -1,3 +1,23 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * public/WebViewClient.h:
+        (WebKit::WebViewClient::numberOfTouchEventHandlersChanged):
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::numTouchEventHandlersChanged):
+        (WebKit):
+        * src/ChromeClientImpl.h:
+        (ChromeClientImpl):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::numberOfTouchEventHandlersChanged):
+        (WebKit):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-02-15  Anders Carlsson  <andersca@apple.com>
 
         Remove ScrollableArea::handleGestureEvent
index 1b42a48..b656fd5 100644 (file)
@@ -263,6 +263,7 @@ public:
     virtual void focusedNodeChanged(const WebNode&) { }
 
     virtual void numberOfWheelEventHandlersChanged(unsigned) { }
+    virtual void numberOfTouchEventHandlersChanged(unsigned) { }
 
     // Indicates two things:
     //   1) This view may have a new layout now.
index fb07b4c..45a8138 100644 (file)
@@ -1018,6 +1018,11 @@ void ChromeClientImpl::numWheelEventHandlersChanged(unsigned numberOfWheelHandle
     m_webView->numberOfWheelEventHandlersChanged(numberOfWheelHandlers);
 }
 
+void ChromeClientImpl::numTouchEventHandlersChanged(unsigned numberOfTouchHandlers)
+{
+    m_webView->numberOfTouchEventHandlersChanged(numberOfTouchHandlers);
+}
+
 #if ENABLE(POINTER_LOCK)
 bool ChromeClientImpl::requestPointerLock()
 {
index 8fd2488..23e02ff 100644 (file)
@@ -204,6 +204,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const;
     virtual void numWheelEventHandlersChanged(unsigned);
+    virtual void numTouchEventHandlersChanged(unsigned);
 
 #if ENABLE(POINTER_LOCK)
     virtual bool requestPointerLock();
index 3acf924..ef10643 100644 (file)
@@ -805,6 +805,12 @@ void WebViewImpl::numberOfWheelEventHandlersChanged(unsigned numberOfWheelHandle
 #endif
 }
 
+void WebViewImpl::numberOfTouchEventHandlersChanged(unsigned numberOfTouchHandlers)
+{
+    if (m_client)
+        m_client->numberOfTouchEventHandlersChanged(numberOfTouchHandlers);
+}
+
 #if !OS(DARWIN)
 // Mac has no way to open a context menu based on a keyboard event.
 bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
index 197f582..d42b2cb 100644 (file)
@@ -322,6 +322,7 @@ public:
     bool touchEvent(const WebTouchEvent&);
 
     void numberOfWheelEventHandlersChanged(unsigned);
+    void numberOfTouchEventHandlersChanged(unsigned);
 
     // Handles context menu events orignated via the the keyboard. These
     // include the VK_APPS virtual key and the Shift+F10 combine. Code is
index ef1e4bc..9a38bb0 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/ChromeClientEfl.h:
+        (WebCore::ChromeClientEfl::numTouchEventHandlersChanged):
+
 2012-02-15  Gustavo Lima Chaves  <glima@profusion.mobi>
 
         [EFL] Add missing libsoup to (pkgconfig) dependency requirements
index 4b47c73..8251225 100644 (file)
@@ -173,6 +173,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
     virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numTouchEventHandlersChanged(unsigned) { }
 
     Evas_Object* m_view;
     KURL m_hoveredLinkURL;
index cfe823e..31bc88a 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/ChromeClientGtk.h:
+        (WebKit::ChromeClient::numTouchEventHandlersChanged):
+
 2012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
 
         [Texmap] Divide TextureMapperNode.cpp to 3 files.
index 5d3082d..9d2105d 100644 (file)
@@ -159,6 +159,7 @@ namespace WebKit {
 
         virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; }
         virtual void numWheelEventHandlersChanged(unsigned) { }
+        virtual void numTouchEventHandlersChanged(unsigned) { }
 
 #if USE(ACCELERATED_COMPOSITING) 
         virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
index c48fe0b..8803156 100644 (file)
@@ -1,3 +1,12 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/WebChromeClient.h:
+
 2012-02-14  Matt Lilek  <mrl@apple.com>
 
         Don't ENABLE_DASHBOARD_SUPPORT unconditionally on all Mac platforms
index 48ff09b..66fa060 100644 (file)
@@ -189,6 +189,7 @@ public:
 #endif
     
     virtual void numWheelEventHandlersChanged(unsigned) OVERRIDE { }
+    virtual void numTouchEventHandlersChanged(unsigned) OVERRIDE { }
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const OVERRIDE { return false; }
 private:
     WebView *m_webView;
index f3f7b4c..4e6af8f 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/ChromeClientQt.h:
+        (WebCore::ChromeClientQt::numTouchEventHandlersChanged):
+
 2012-02-15  Simon Hausmann  <simon.hausmann@nokia.com>
 
         Unreviewed Qt 4.x build fix.
index 6a576d9..3d45b7b 100644 (file)
@@ -192,6 +192,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
     virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numTouchEventHandlersChanged(unsigned) { }
 
     QWebPage* m_webPage;
     KURL lastHoverURL;
index 119da17..169e98b 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/WebChromeClient.h:
+        (WebChromeClient::numTouchEventHandlersChanged):
+
 2012-02-14  Alexey Proskuryakov  <ap@apple.com>
 
         [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
index b6aeb1c..2a9a8fe 100644 (file)
@@ -177,6 +177,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
     virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numTouchEventHandlersChanged(unsigned) { }
 
 private:
     COMPtr<IWebUIDelegate> uiDelegate();
index 6d2a7e6..7466db7 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebCoreSupport/ChromeClientWinCE.h:
+        (WebKit::ChromeClientWinCE::numTouchEventHandlersChanged):
+
 2011-12-19  Sam Weinig  <sam@webkit.org>
 
         More PlatformEvent cleanup
index 006e010..613783a 100644 (file)
@@ -177,6 +177,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
     virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numTouchEventHandlersChanged(unsigned) { }
 
 private:
     WebView* m_webView;
index b45b350..05be84b 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * WebKitSupport/ChromeClientWx.h:
+        (WebCore::ChromeClientWx::numTouchEventHandlersChanged):
+
 2012-01-30  Kevin Ollivier  <kevino@theolliviers.com>
 
         [wx] Unreviewed. Build fix, add JavaScriptCore/runtime
index dcd164f..2b6cdef 100644 (file)
@@ -151,6 +151,7 @@ public:
 
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const { return true; }
     virtual void numWheelEventHandlersChanged(unsigned) { }
+    virtual void numTouchEventHandlersChanged(unsigned) { }
     
     virtual bool hasOpenedPopup() const;
 
index a7aa22e..3e5cc08 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
+
+        Notify ChromeClient when touch-event handlers are installed/removed.
+        https://bugs.webkit.org/show_bug.cgi?id=77440
+
+        Reviewed by Darin Fisher and Ryosuke Niwa.
+
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::numTouchEventHandlersChanged):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2012-02-15  Patrick Gansterer  <paroga@webkit.org>
 
         [CMake] Move RunLoop to WebCore/platform
index dd68e1f..9761c15 100644 (file)
@@ -220,6 +220,7 @@ private:
     virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const OVERRIDE;
     
     virtual void numWheelEventHandlersChanged(unsigned) OVERRIDE;
+    virtual void numTouchEventHandlersChanged(unsigned) OVERRIDE { }
 
     String m_cachedToolTip;
     mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;