mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1017242 - Part C: remove API 8 code from GeckoEvent. r=mfinkle
This commit is contained in:
parent
132e78d797
commit
25edd0e517
@ -470,8 +470,7 @@ public class GeckoEvent {
|
||||
|
||||
mPoints[index] = new Point(Math.round(geckoPoint.x), Math.round(geckoPoint.y));
|
||||
mPointIndicies[index] = event.getPointerId(eventIndex);
|
||||
// getToolMajor, getToolMinor and getOrientation are API Level 9 features
|
||||
if (Build.VERSION.SDK_INT >= 9) {
|
||||
|
||||
double radians = event.getOrientation(eventIndex);
|
||||
mOrientations[index] = (float) Math.toDegrees(radians);
|
||||
// w3c touchevents spec does not allow orientations == 90
|
||||
@ -494,14 +493,7 @@ public class GeckoEvent {
|
||||
mPointRadii[index] = new Point((int)event.getToolMinor(eventIndex)/2,
|
||||
(int)event.getToolMajor(eventIndex)/2);
|
||||
}
|
||||
} else {
|
||||
float size = event.getSize(eventIndex);
|
||||
Resources resources = GeckoAppShell.getContext().getResources();
|
||||
DisplayMetrics displaymetrics = resources.getDisplayMetrics();
|
||||
size = size*Math.min(displaymetrics.heightPixels, displaymetrics.widthPixels);
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user