Bug 803207 - Kill GetDevicePixelsPerMetaViewportPixel and use widget scaling correctly on Fennec. r=mbrubeck

This commit is contained in:
Kartikaya Gupta
2013-07-04 09:02:29 -04:00
parent a276d21633
commit 884dc7b83e
10 changed files with 42 additions and 73 deletions

View File

@@ -426,6 +426,13 @@ public class GeckoEvent {
mPointRadii[index] = new Point((int)size,(int)size);
mOrientations[index] = 0;
}
if (!keepInViewCoordinates) {
// If we are converting to gecko CSS pixels, then we should adjust the
// radii as well
float zoom = GeckoAppShell.getLayerView().getViewportMetrics().zoomFactor;
mPointRadii[index].x /= zoom;
mPointRadii[index].y /= zoom;
}
mPressures[index] = event.getPressure(eventIndex);
} catch (Exception ex) {
Log.e(LOGTAG, "Error creating motion point " + index, ex);