Bug 945025 - Fix pointer bounds calculation in GeckoPointerController, r=m1
authorMichael Wu <mwu@mozilla.com>
Tue, 03 Dec 2013 16:44:01 -0500
changeset 174371 59bb5272674d538446eb5b870caac23ff462702c
parent 174370 7da6412ef0359464902462df5a2e6459415cb40f
child 174372 70b6149628d238dad9234c800a3e91907535e100
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm1
bugs945025
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 945025 - Fix pointer bounds calculation in GeckoPointerController, r=m1
widget/gonk/nsAppShell.cpp
--- a/widget/gonk/nsAppShell.cpp
+++ b/widget/gonk/nsAppShell.cpp
@@ -319,31 +319,23 @@ public:
 };
 
 bool
 GeckoPointerController::getBounds(float* outMinX,
                                   float* outMinY,
                                   float* outMaxX,
                                   float* outMaxY) const
 {
-    int32_t width, height, orientation;
-
     DisplayViewport viewport;
 
     mConfig->getDisplayInfo(false, &viewport);
 
     *outMinX = *outMinY = 0;
-    if (orientation == DISPLAY_ORIENTATION_90 ||
-        orientation == DISPLAY_ORIENTATION_270) {
-        *outMaxX = viewport.deviceHeight;
-        *outMaxY = viewport.deviceWidth;
-    } else {
-        *outMaxX = viewport.deviceWidth;
-        *outMaxY = viewport.deviceHeight;
-    }
+    *outMaxX = viewport.logicalRight;
+    *outMaxY = viewport.logicalBottom;
     return true;
 }
 
 void
 GeckoPointerController::move(float deltaX, float deltaY)
 {
     float minX, minY, maxX, maxY;
     getBounds(&minX, &minY, &maxX, &maxY);