Title: [182920] trunk/Source/WebKit2
Revision
182920
Author
bda...@apple.com
Date
2015-04-16 16:22:12 -0700 (Thu, 16 Apr 2015)

Log Message

Rubber-stamped by Tim Horton.

Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
make sure to use the most up-to-date pressure information when setting the force 
on a WebMouseEvent.

* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (182919 => 182920)


--- trunk/Source/WebKit2/ChangeLog	2015-04-16 23:21:01 UTC (rev 182919)
+++ trunk/Source/WebKit2/ChangeLog	2015-04-16 23:22:12 UTC (rev 182920)
@@ -1,3 +1,14 @@
+2015-04-16  Beth Dakin  <bda...@apple.com>
+
+        Rubber-stamped by Tim Horton.
+
+        Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
+        make sure to use the most up-to-date pressure information when setting the force 
+        on a WebMouseEvent.
+
+        * Shared/mac/WebEventFactory.mm:
+        (WebKit::WebEventFactory::createWebMouseEvent):
+
 2015-04-13  Jer Noble  <jer.no...@apple.com>
 
         [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.

Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm (182919 => 182920)


--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2015-04-16 23:21:01 UTC (rev 182919)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2015-04-16 23:22:12 UTC (rev 182920)
@@ -398,7 +398,9 @@
 
     double force = 0;
 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
-    force = lastPressureEvent.stage < 1 ? lastPressureEvent.pressure : lastPressureEvent.pressure + lastPressureEvent.stage - 1;
+    int stage = [event type] == NSEventTypePressure ? event.stage : lastPressureEvent.stage;
+    double pressure = [event type] == NSEventTypePressure ? event.pressure : lastPressureEvent.pressure;
+    force = stage < 1 ? pressure : pressure + stage - 1;
 #endif
 
     return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, eventNumber, menuTypeForEvent);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to