зеркало из https://github.com/mozilla/gecko-dev.git
Bug 937256 - Remove the old front end apzc preventDefault hack now that we have chrome hit testing in metro widget. Also fix a bug with transformed coords that are destined for chrome vs. content. r=mbrubeck
This commit is contained in:
Родитель
4bc2329edd
Коммит
d9263fbf50
|
@ -322,12 +322,6 @@ var TouchModule = {
|
|||
if (aEvent.defaultPrevented) {
|
||||
this._isCancelled = true;
|
||||
}
|
||||
// Help out chrome ui elements that want input.js vs. apz scrolling: call
|
||||
// preventDefault when apz is enabled on anything that isn't in the
|
||||
// browser.
|
||||
if (APZCObserver.enabled && aEvent.target.ownerDocument == document) {
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
if (this._isCancelled)
|
||||
|
|
|
@ -1188,23 +1188,23 @@ MetroInput::DeliverNextQueuedTouchEvent()
|
|||
return;
|
||||
}
|
||||
|
||||
// If content is consuming touch, we need to transform event coords
|
||||
// through the apzc before sending. Otherwise send the event to apzc.
|
||||
if (mContentConsumingTouch) {
|
||||
TransformTouchEvent(event);
|
||||
} else {
|
||||
DUMP_TOUCH_IDS("APZC(2)", event);
|
||||
status = mWidget->ApzReceiveInputEvent(event, nullptr);
|
||||
}
|
||||
|
||||
// If content called preventDefault on touchstart or first touchmove send
|
||||
// the event to content only.
|
||||
// If content is consuming touch, we may need to transform event coords
|
||||
// through the apzc before sending to the dom. Otherwise send the event
|
||||
// to apzc.
|
||||
if (mContentConsumingTouch) {
|
||||
// Only translate if we're dealing with web content that's transformed
|
||||
// by the apzc.
|
||||
if (!mChromeHitTestCacheForTouch) {
|
||||
TransformTouchEvent(event);
|
||||
}
|
||||
DUMP_TOUCH_IDS("DOM(3)", event);
|
||||
mWidget->DispatchEvent(event, status);
|
||||
return;
|
||||
}
|
||||
|
||||
DUMP_TOUCH_IDS("APZC(2)", event);
|
||||
status = mWidget->ApzReceiveInputEvent(event, nullptr);
|
||||
|
||||
// Send the event to content unless APZC is consuming it.
|
||||
if (!mApzConsumingTouch) {
|
||||
if (status == nsEventStatus_eConsumeNoDefault) {
|
||||
|
@ -1212,6 +1212,9 @@ MetroInput::DeliverNextQueuedTouchEvent()
|
|||
DispatchTouchCancel(event);
|
||||
return;
|
||||
}
|
||||
if (!mChromeHitTestCacheForTouch) {
|
||||
TransformTouchEvent(event);
|
||||
}
|
||||
DUMP_TOUCH_IDS("DOM(4)", event);
|
||||
mWidget->DispatchEvent(event, status);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче