зеркало из https://github.com/mozilla/gecko-dev.git
Bug 712772 - Need an option to vibrate on long-tap only r=wesj a=bajaj
This commit is contained in:
Родитель
8bb6f32dae
Коммит
7229c92e3e
|
@ -3651,12 +3651,9 @@ var BrowserEventHandler = {
|
|||
if (element) {
|
||||
try {
|
||||
let data = JSON.parse(aData);
|
||||
let isClickable = ElementTouchHelper.isElementClickable(element);
|
||||
|
||||
if (isClickable) {
|
||||
if (ElementTouchHelper.isElementClickable(element)) {
|
||||
[data.x, data.y] = this._moveClickPoint(element, data.x, data.y);
|
||||
element = ElementTouchHelper.anyElementFromPoint(data.x, data.y);
|
||||
isClickable = ElementTouchHelper.isElementClickable(element);
|
||||
}
|
||||
|
||||
this._sendMouseEvent("mousemove", element, data.x, data.y);
|
||||
|
@ -3666,9 +3663,6 @@ var BrowserEventHandler = {
|
|||
// See if its a input element
|
||||
if ((element instanceof HTMLInputElement && element.mozIsTextField(false)) || (element instanceof HTMLTextAreaElement))
|
||||
SelectionHandler.showThumb(element);
|
||||
|
||||
if (isClickable)
|
||||
Haptic.performSimpleAction(Haptic.LongPress);
|
||||
} catch(e) {
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
@ -3677,13 +3671,10 @@ var BrowserEventHandler = {
|
|||
} else if (aTopic == "Gesture:DoubleTap") {
|
||||
this._cancelTapHighlight();
|
||||
this.onDoubleTap(aData);
|
||||
} else if (aTopic == "MozMagnifyGestureStart" ||
|
||||
aTopic == "MozMagnifyGestureUpdate") {
|
||||
} else if (aTopic == "MozMagnifyGestureStart" || aTopic == "MozMagnifyGestureUpdate") {
|
||||
this.onPinch(aData);
|
||||
} else if (aTopic == "MozMagnifyGesture") {
|
||||
this.onPinchFinish(aData,
|
||||
this._mLastPinchPoint.x,
|
||||
this._mLastPinchPoint.y);
|
||||
this.onPinchFinish(aData, this._mLastPinchPoint.x, this._mLastPinchPoint.y);
|
||||
} else if (aTopic == "nsPref:changed") {
|
||||
if (aData == "browser.zoom.reflowOnZoom") {
|
||||
this.updateReflozPref();
|
||||
|
|
Загрузка…
Ссылка в новой задаче