Bug 1021804 - Long press on news story links invoke context menu, r=kats, wesj
This commit is contained in:
@@ -108,7 +108,8 @@ public class GeckoEvent {
|
||||
TELEMETRY_UI_SESSION_STOP(43),
|
||||
TELEMETRY_UI_EVENT(44),
|
||||
GAMEPAD_ADDREMOVE(45),
|
||||
GAMEPAD_DATA(46);
|
||||
GAMEPAD_DATA(46),
|
||||
LONG_PRESS(47);
|
||||
|
||||
public final int value;
|
||||
|
||||
@@ -420,6 +421,16 @@ public class GeckoEvent {
|
||||
return event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a GeckoEvent that contains the data from the LongPressEvent, to be
|
||||
* dispatched in CSS pixels relative to gecko's scroll position.
|
||||
*/
|
||||
public static GeckoEvent createLongPressEvent(MotionEvent m) {
|
||||
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LONG_PRESS);
|
||||
event.initMotionEvent(m, false);
|
||||
return event;
|
||||
}
|
||||
|
||||
private void initMotionEvent(MotionEvent m, boolean keepInViewCoordinates) {
|
||||
mAction = m.getActionMasked();
|
||||
mTime = (System.currentTimeMillis() - SystemClock.elapsedRealtime()) + m.getEventTime();
|
||||
|
||||
Reference in New Issue
Block a user