Bug 712772 - Need an option to vibrate on long-tap only r=wesj a=bajaj

This commit is contained in:
Mark Finkle 2012-10-18 15:13:16 -04:00
Родитель 8bb6f32dae
Коммит 7229c92e3e
1 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -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();