зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162050 - Remove use of eLegacyDragGesture from EventStateManager.cpp. r=enn
MozReview-Commit-ID: F4a52Yw5ri3 --HG-- extra : rebase_source : cfa72993e938fdd36e56f7f6d0e2cb5f065b5559
This commit is contained in:
Родитель
af06755ad8
Коммит
6ad324725d
|
@ -702,7 +702,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
FlushPendingEvents(aPresContext);
|
||||
break;
|
||||
}
|
||||
case eLegacyDragGesture:
|
||||
case eDragStart:
|
||||
if (Prefs::ClickHoldContextMenu()) {
|
||||
// an external drag gesture event came in, not generated internally
|
||||
// by Gecko. Make sure we get rid of the click-hold timer.
|
||||
|
@ -1766,12 +1766,8 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
WidgetDragEvent startEvent(aEvent->IsTrusted(), eDragStart, widget);
|
||||
FillInEventFromGestureDown(&startEvent);
|
||||
|
||||
WidgetDragEvent gestureEvent(aEvent->IsTrusted(),
|
||||
eLegacyDragGesture, widget);
|
||||
FillInEventFromGestureDown(&gestureEvent);
|
||||
|
||||
startEvent.mDataTransfer = gestureEvent.mDataTransfer = dataTransfer;
|
||||
startEvent.inputSource = gestureEvent.inputSource = aEvent->inputSource;
|
||||
startEvent.mDataTransfer = dataTransfer;
|
||||
startEvent.inputSource = aEvent->inputSource;
|
||||
|
||||
// Dispatch to the DOM. By setting mCurrentTarget we are faking
|
||||
// out the ESM and telling it that the current target frame is
|
||||
|
@ -1796,12 +1792,6 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
nullptr, &status);
|
||||
|
||||
WidgetDragEvent* event = &startEvent;
|
||||
if (status != nsEventStatus_eConsumeNoDefault) {
|
||||
status = nsEventStatus_eIgnore;
|
||||
EventDispatcher::Dispatch(targetContent, aPresContext, &gestureEvent,
|
||||
nullptr, &status);
|
||||
event = &gestureEvent;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
|
|
Загрузка…
Ссылка в новой задаче