Title: [240721] trunk
Revision
240721
Author
d...@apple.com
Date
2019-01-30 11:25:10 -0800 (Wed, 30 Jan 2019)

Log Message

PointerEvents - tiltX and tiltY are reversed
https://bugs.webkit.org/show_bug.cgi?id=194032
<rdar://problem/47674184>

Reviewed by Jon Lee.

Source/WebCore:

I got tiltX and tiltY the wrong way around.

* dom/ios/PointerEventIOS.cpp: Flip the values.

LayoutTests:

* pointerevents/ios/pointer-events-dispatch-on-stylus.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (240720 => 240721)


--- trunk/LayoutTests/ChangeLog	2019-01-30 19:19:46 UTC (rev 240720)
+++ trunk/LayoutTests/ChangeLog	2019-01-30 19:25:10 UTC (rev 240721)
@@ -1,3 +1,13 @@
+2019-01-30  Dean Jackson  <d...@apple.com>
+
+        PointerEvents - tiltX and tiltY are reversed
+        https://bugs.webkit.org/show_bug.cgi?id=194032
+        <rdar://problem/47674184>
+
+        Reviewed by Jon Lee.
+
+        * pointerevents/ios/pointer-events-dispatch-on-stylus.html:
+
 2019-01-30  Simon Fraser  <simon.fra...@apple.com>
 
         Add some basic geometry information to the scrolling tree

Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html (240720 => 240721)


--- trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html	2019-01-30 19:19:46 UTC (rev 240720)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html	2019-01-30 19:25:10 UTC (rev 240721)
@@ -23,8 +23,8 @@
         assert_equals(event.clientY, 50);
         assert_equals(event.pointerType, "pen");
         assert_equals(event.pressure, 0.75);
-        assert_approx_equals(event.tiltX, 20, 1);
-        assert_approx_equals(event.tiltY, 75, 1);
+        assert_approx_equals(event.tiltX, 75, 1);
+        assert_approx_equals(event.tiltY, 20, 1);
         test.done();
     });
     ui.beginStylus({ x: 50, y: 50, pressure: 0.75, azimuthAngle: fifteenDegrees, altitudeAngle: thirtyDegrees });

Modified: trunk/Source/WebCore/ChangeLog (240720 => 240721)


--- trunk/Source/WebCore/ChangeLog	2019-01-30 19:19:46 UTC (rev 240720)
+++ trunk/Source/WebCore/ChangeLog	2019-01-30 19:25:10 UTC (rev 240721)
@@ -1,3 +1,15 @@
+2019-01-30  Dean Jackson  <d...@apple.com>
+
+        PointerEvents - tiltX and tiltY are reversed
+        https://bugs.webkit.org/show_bug.cgi?id=194032
+        <rdar://problem/47674184>
+
+        Reviewed by Jon Lee.
+
+        I got tiltX and tiltY the wrong way around.
+
+        * dom/ios/PointerEventIOS.cpp: Flip the values.
+
 2019-01-30  Zalan Bujtas  <za...@apple.com>
 
         [LFC][IFC] nextBreakablePosition returns the same position on hyphen characters

Modified: trunk/Source/WebCore/dom/ios/PointerEventIOS.cpp (240720 => 240721)


--- trunk/Source/WebCore/dom/ios/PointerEventIOS.cpp	2019-01-30 19:19:46 UTC (rev 240720)
+++ trunk/Source/WebCore/dom/ios/PointerEventIOS.cpp	2019-01-30 19:25:10 UTC (rev 240721)
@@ -77,8 +77,8 @@
     double azimuthAngle = event.azimuthAngleAtIndex(index);
     double altitudeAngle = event.altitudeAngleAtIndex(index);
 
-    m_tiltX = round(sin(azimuthAngle) * cos(altitudeAngle) * 90);
-    m_tiltY = round(cos(azimuthAngle) * cos(altitudeAngle) * 90);
+    m_tiltX = round(cos(azimuthAngle) * cos(altitudeAngle) * 90);
+    m_tiltY = round(sin(azimuthAngle) * cos(altitudeAngle) * 90);
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to