[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

andersca at apple.com andersca at apple.com
Fri Jan 21 14:39:11 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 9997306287927bdb32516e15a078d7ae1ceab5bc
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 23 23:55:41 2010 +0000

    2010-12-23  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Simon Fraser.
    
            Ensure that we are not getting too many mouse move events
            https://bugs.webkit.org/show_bug.cgi?id=51568
            <rdar://problem/7881470>
            <rdar://problem/8735512>
    
            Implement throttling of mouse move events.
    
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::WebPageProxy):
            Initialize m_processingMouseMoveEvent to false.
    
            (WebKit::WebPageProxy::handleMouseEvent):
            If we're already processing a mouse move events, just update
            m_nextMouseMoveEvent and return.
    
            (WebKit::WebPageProxy::didReceiveEvent):
            If we received a mouse move event, send the next mouse move event if there is one.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74591 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2c0f774..5e16028 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2010-12-23  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Ensure that we are not getting too many mouse move events
+        https://bugs.webkit.org/show_bug.cgi?id=51568
+        <rdar://problem/7881470>
+        <rdar://problem/8735512>
+
+        Implement throttling of mouse move events.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        Initialize m_processingMouseMoveEvent to false.
+
+        (WebKit::WebPageProxy::handleMouseEvent):
+        If we're already processing a mouse move events, just update 
+        m_nextMouseMoveEvent and return.
+ 
+        (WebKit::WebPageProxy::didReceiveEvent):
+        If we received a mouse move event, send the next mouse move event if there is one.
+
 2010-12-23  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index cd26b24..ed32f25 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -109,6 +109,7 @@ WebPageProxy::WebPageProxy(WebContext* context, WebPageGroup* pageGroup, uint64_
     , m_syncMimeTypePolicyAction(PolicyUse)
     , m_syncMimeTypePolicyDownloadID(0)
     , m_processingWheelEvent(false)
+    , m_processingMouseMoveEvent(false)
     , m_pageID(pageID)
     , m_mainFrameHasCustomRepresentation(false)
 {
@@ -553,6 +554,15 @@ void WebPageProxy::handleMouseEvent(const WebMouseEvent& event)
     // NOTE: This does not start the responsiveness timer because mouse move should not indicate interaction.
     if (event.type() != WebEvent::MouseMove)
         process()->responsivenessTimer()->start();
+    else {
+        if (m_processingMouseMoveEvent) {
+            m_nextMouseMoveEvent = adoptPtr(new WebMouseEvent(event));
+            return;
+        }
+
+        m_processingMouseMoveEvent = true;
+    }
+
     process()->send(Messages::WebPage::MouseEvent(event), m_pageID);
 }
 
@@ -1780,6 +1790,12 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
 
     switch (type) {
     case WebEvent::MouseMove:
+        m_processingMouseMoveEvent = false;
+        if (m_nextMouseMoveEvent) {
+            handleMouseEvent(*m_nextMouseMoveEvent);
+            m_nextWheelEvent = nullptr;
+        }
+        break;
     case WebEvent::MouseDown:
     case WebEvent::MouseUp:
         break;
@@ -1788,7 +1804,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
         m_processingWheelEvent = false;
         if (m_nextWheelEvent) {
             handleWheelEvent(*m_nextWheelEvent);
-            m_nextWheelEvent.clear();
+            m_nextWheelEvent = nullptr;
         }
         break;
     }
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index c022a5b..3338000 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -521,6 +521,9 @@ private:
     bool m_processingWheelEvent;
     OwnPtr<WebWheelEvent> m_nextWheelEvent;
 
+    bool m_processingMouseMoveEvent;
+    OwnPtr<WebMouseEvent> m_nextMouseMoveEvent;
+
     uint64_t m_pageID;
 
     bool m_mainFrameHasCustomRepresentation;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list