Title: [183198] trunk/Source/WebCore
Revision
183198
Author
[email protected]
Date
2015-04-23 11:41:10 -0700 (Thu, 23 Apr 2015)

Log Message

Don't fire a bunch of mouse moveds during scrolling.
https://bugs.webkit.org/show_bug.cgi?id=99940

Reviewed by Simon Fraser.

* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
Even for the short interval timer, make sure to cancel and restart it instead of allowing the original to
complete. This has the effect of preventing fake mouse moves from firing until the scroll stops.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183197 => 183198)


--- trunk/Source/WebCore/ChangeLog	2015-04-23 18:40:08 UTC (rev 183197)
+++ trunk/Source/WebCore/ChangeLog	2015-04-23 18:41:10 UTC (rev 183198)
@@ -1,3 +1,15 @@
+2015-04-23  David Hyatt  <[email protected]>
+
+        Don't fire a bunch of mouse moveds during scrolling.
+        https://bugs.webkit.org/show_bug.cgi?id=99940
+
+        Reviewed by Simon Fraser.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
+        Even for the short interval timer, make sure to cancel and restart it instead of allowing the original to
+        complete. This has the effect of preventing fake mouse moves from firing until the scroll stops.
+
 2015-04-23  Eric Carlson  <[email protected]>
 
         Unreviewed, fix the release build.

Modified: trunk/Source/WebCore/page/EventHandler.cpp (183197 => 183198)


--- trunk/Source/WebCore/page/EventHandler.cpp	2015-04-23 18:40:08 UTC (rev 183197)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2015-04-23 18:41:10 UTC (rev 183198)
@@ -2947,14 +2947,9 @@
     // reschedule the timer and use a longer time. This will cause the content
     // to receive these moves only after the user is done scrolling, reducing
     // pauses during the scroll.
-    if (m_maxMouseMovedDuration > fakeMouseMoveDurationThreshold) {
-        if (m_fakeMouseMoveEventTimer.isActive())
-            m_fakeMouseMoveEventTimer.stop();
-        m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveLongInterval);
-    } else {
-        if (!m_fakeMouseMoveEventTimer.isActive())
-            m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveShortInterval);
-    }
+    if (m_fakeMouseMoveEventTimer.isActive())
+        m_fakeMouseMoveEventTimer.stop();
+    m_fakeMouseMoveEventTimer.startOneShot(m_maxMouseMovedDuration > fakeMouseMoveDurationThreshold ? fakeMouseMoveLongInterval : fakeMouseMoveShortInterval);
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to