Title: [135787] trunk/Source/WebKit/chromium
Revision
135787
Author
commit-qu...@webkit.org
Date
2012-11-26 16:39:53 -0800 (Mon, 26 Nov 2012)

Log Message

Add hasTouchEventhandlersAt to WebView API
https://bugs.webkit.org/show_bug.cgi?id=102541

Patch by Yusuf Ozuysal <yus...@google.com> on 2012-11-26
Reviewed by James Robinson.

Adds hasTouchEventHandlersAt to WebWidget API to check for touch event handlers at a
given point. This will be used to distinguish between events not processed by
touch event handlers and event not hitting any touch event handlers. Both are
returning the same ACK message currently. Default implementation returns true to
continue the same behavior as we currently have.

* public/WebWidget.h:
(WebWidget):
(WebKit::WebWidget::hasTouchEventHandlersAt):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::hasTouchEventHandlersAt):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (135786 => 135787)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-11-27 00:17:49 UTC (rev 135786)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-11-27 00:39:53 UTC (rev 135787)
@@ -1,3 +1,25 @@
+2012-11-26  Yusuf Ozuysal  <yus...@google.com>
+
+        Add hasTouchEventhandlersAt to WebView API
+        https://bugs.webkit.org/show_bug.cgi?id=102541
+
+        Reviewed by James Robinson.
+
+        Adds hasTouchEventHandlersAt to WebWidget API to check for touch event handlers at a
+        given point. This will be used to distinguish between events not processed by
+        touch event handlers and event not hitting any touch event handlers. Both are
+        returning the same ACK message currently. Default implementation returns true to
+        continue the same behavior as we currently have.
+
+        * public/WebWidget.h:
+        (WebWidget):
+        (WebKit::WebWidget::hasTouchEventHandlersAt):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::hasTouchEventHandlersAt):
+        (WebKit):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-11-26  James Simonsen  <simon...@chromium.org>
 
         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest

Modified: trunk/Source/WebKit/chromium/public/WebWidget.h (135786 => 135787)


--- trunk/Source/WebKit/chromium/public/WebWidget.h	2012-11-27 00:17:49 UTC (rev 135786)
+++ trunk/Source/WebKit/chromium/public/WebWidget.h	2012-11-27 00:39:53 UTC (rev 135787)
@@ -157,6 +157,9 @@
     // the event has been processed, false otherwise.
     virtual bool handleInputEvent(const WebInputEvent&) { return false; }
 
+    // Check whether the given point hits any registered touch event handlers.
+    virtual bool hasTouchEventHandlersAt(const WebPoint&) { return true; }
+
     // Called to inform the WebWidget that mouse capture was lost.
     virtual void mouseCaptureLost() { }
 

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (135786 => 135787)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-27 00:17:49 UTC (rev 135786)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-11-27 00:39:53 UTC (rev 135787)
@@ -1274,6 +1274,11 @@
         m_client->hasTouchEventHandlers(hasTouchHandlers);
 }
 
+bool WebViewImpl::hasTouchEventHandlersAt(const WebPoint& point)
+{
+    return true;
+}
+
 #if !OS(DARWIN)
 // Mac has no way to open a context menu based on a keyboard event.
 bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (135786 => 135787)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-11-27 00:17:49 UTC (rev 135786)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-11-27 00:39:53 UTC (rev 135787)
@@ -152,6 +152,7 @@
     virtual void setNeedsRedraw();
     virtual bool isInputThrottled() const;
     virtual bool handleInputEvent(const WebInputEvent&);
+    virtual bool hasTouchEventHandlersAt(const WebPoint&);
     virtual void mouseCaptureLost();
     virtual void setFocus(bool enable);
     virtual bool setComposition(
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to