Title: [96557] trunk/Source/WebKit/chromium
Revision
96557
Author
[email protected]
Date
2011-10-03 16:54:26 -0700 (Mon, 03 Oct 2011)

Log Message

[chromium] Tweak WebCompositor API for input event handling to express three possible states
https://bugs.webkit.org/show_bug.cgi?id=69304

Reviewed by Darin Fisher.

* public/WebCompositorClient.h:
* src/WebCompositorImpl.cpp:
(WebKit::WebCompositorImpl::~WebCompositorImpl):
(WebKit::WebCompositorImpl::handleInputEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (96556 => 96557)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-03 23:22:54 UTC (rev 96556)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-03 23:54:26 UTC (rev 96557)
@@ -1,3 +1,15 @@
+2011-10-03  James Robinson  <[email protected]>
+
+        [chromium] Tweak WebCompositor API for input event handling to express three possible states
+        https://bugs.webkit.org/show_bug.cgi?id=69304
+
+        Reviewed by Darin Fisher.
+
+        * public/WebCompositorClient.h:
+        * src/WebCompositorImpl.cpp:
+        (WebKit::WebCompositorImpl::~WebCompositorImpl):
+        (WebKit::WebCompositorImpl::handleInputEvent):
+
 2011-10-03  Anders Carlsson  <[email protected]>
 
         Remove custom scrollbar painting hooks

Modified: trunk/Source/WebKit/chromium/public/WebCompositorClient.h (96556 => 96557)


--- trunk/Source/WebKit/chromium/public/WebCompositorClient.h	2011-10-03 23:22:54 UTC (rev 96556)
+++ trunk/Source/WebKit/chromium/public/WebCompositorClient.h	2011-10-03 23:54:26 UTC (rev 96557)
@@ -32,8 +32,16 @@
 public:
     // Callbacks invoked from the compositor thread.
     virtual void willShutdown() = 0;
-    virtual void didHandleInputEvent(bool processed) = 0;
 
+    // Exactly one of the following two callbacks will be invoked after every call to WebCompositor::handleInputEvent():
+
+    // Called when the WebCompositor handled the input event and no further processing is required.
+    virtual void didHandleInputEvent() = 0;
+
+    // Called when the WebCompositor did not handle the input event. If sendToWidget is true, the input event
+    // should be forwarded to the WebWidget associated with this compositor for further processing.
+    virtual void didNotHandleInputEvent(bool sendToWidget) = 0;
+
 protected:
     virtual ~WebCompositorClient() { }
 };

Modified: trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp (96556 => 96557)


--- trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp	2011-10-03 23:22:54 UTC (rev 96556)
+++ trunk/Source/WebKit/chromium/src/WebCompositorImpl.cpp	2011-10-03 23:54:26 UTC (rev 96557)
@@ -89,6 +89,9 @@
 
 WebCompositorImpl::~WebCompositorImpl()
 {
+    if (m_client)
+        m_client->willShutdown();
+
     ASSERT(s_compositorsLock);
     MutexLocker lock(*s_compositorsLock);
     ASSERT(s_compositors);
@@ -110,7 +113,7 @@
 {
     ASSERT(CCProxy::isImplThread());
     // FIXME: Do something interesting with the event here.
-    m_client->didHandleInputEvent(false);
+    m_client->didNotHandleInputEvent(true /* sendToWidget */);
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to