mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895274 part.243 Rename NS_TOUCH_END to eTouchEnd r=smaug
This commit is contained in:
parent
6b21fea7d5
commit
13ad066f9b
@ -1838,7 +1838,8 @@ Accessible::DispatchClickEvent(nsIContent *aContent, uint32_t aActionIndex)
|
||||
presShell, widget);
|
||||
nsCoreUtils::DispatchMouseEvent(eMouseDown, x, y, aContent, frame,
|
||||
presShell, widget);
|
||||
nsCoreUtils::DispatchTouchEvent(NS_TOUCH_END, x, y, aContent, frame, presShell, widget);
|
||||
nsCoreUtils::DispatchTouchEvent(eTouchEnd, x, y, aContent, frame,
|
||||
presShell, widget);
|
||||
nsCoreUtils::DispatchMouseEvent(eMouseUp, x, y, aContent, frame,
|
||||
presShell, widget);
|
||||
}
|
||||
|
@ -966,7 +966,7 @@ nsDOMWindowUtils::SendTouchEventCommon(const nsAString& aType,
|
||||
} else if (aType.EqualsLiteral("touchmove")) {
|
||||
msg = eTouchMove;
|
||||
} else if (aType.EqualsLiteral("touchend")) {
|
||||
msg = NS_TOUCH_END;
|
||||
msg = eTouchEnd;
|
||||
} else if (aType.EqualsLiteral("touchcancel")) {
|
||||
msg = NS_TOUCH_CANCEL;
|
||||
} else {
|
||||
|
@ -804,7 +804,7 @@ Event::GetEventPopupControlState(WidgetEvent* aEvent, nsIDOMEvent* aDOMEvent)
|
||||
abuse = openControlled;
|
||||
}
|
||||
break;
|
||||
case NS_TOUCH_END :
|
||||
case eTouchEnd:
|
||||
if (PopupAllowedForEvent("touchend")) {
|
||||
abuse = openControlled;
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ TOUCH_EVENT(touchstart,
|
||||
EventNameType_All,
|
||||
eTouchEventClass)
|
||||
TOUCH_EVENT(touchend,
|
||||
NS_TOUCH_END,
|
||||
eTouchEnd,
|
||||
EventNameType_All,
|
||||
eTouchEventClass)
|
||||
TOUCH_EVENT(touchmove,
|
||||
|
@ -1155,7 +1155,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
|
||||
switch (aEvent.mMessage) {
|
||||
case eTouchStart:
|
||||
case eTouchMove:
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
case NS_TOUCH_CANCEL:
|
||||
return true;
|
||||
default:
|
||||
|
@ -122,7 +122,7 @@ TouchEvent::Touches()
|
||||
{
|
||||
if (!mTouches) {
|
||||
WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
|
||||
if (mEvent->mMessage == NS_TOUCH_END ||
|
||||
if (mEvent->mMessage == eTouchEnd ||
|
||||
mEvent->mMessage == NS_TOUCH_CANCEL) {
|
||||
// for touchend events, remove any changed touches from the touches array
|
||||
WidgetTouchEvent::AutoTouchArray unchangedTouches;
|
||||
@ -150,7 +150,7 @@ TouchEvent::TargetTouches()
|
||||
for (uint32_t i = 0; i < touches.Length(); ++i) {
|
||||
// for touchend/cancel events, don't append to the target list if this is a
|
||||
// touch that is ending
|
||||
if ((mEvent->mMessage != NS_TOUCH_END &&
|
||||
if ((mEvent->mMessage != eTouchEnd &&
|
||||
mEvent->mMessage != NS_TOUCH_CANCEL) || !touches[i]->mChanged) {
|
||||
if (touches[i]->mTarget == mEvent->originalTarget) {
|
||||
targetTouches.AppendElement(touches[i]);
|
||||
|
@ -4134,7 +4134,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
|
||||
break;
|
||||
|
||||
case eMouseUp:
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
if (!mIsDraggingRange) {
|
||||
break;
|
||||
}
|
||||
|
@ -2051,7 +2051,7 @@ TabChild::UpdateTapState(const WidgetTouchEvent& aEvent, nsEventStatus aStatus)
|
||||
}
|
||||
return;
|
||||
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
if (!TouchManager::gPreventMouseEvents) {
|
||||
APZCCallbackHelper::DispatchSynthesizedMouseEvent(
|
||||
eMouseMove, time, currentPoint, 0, mPuppetWidget);
|
||||
|
@ -1834,7 +1834,7 @@ bool TabParent::SendRealTouchEvent(WidgetTouchEvent& event)
|
||||
// confuses remote content and the panning and zooming logic into thinking
|
||||
// that the added touches are part of the touchend/cancel, when actually
|
||||
// they're not.
|
||||
if (event.mMessage == NS_TOUCH_END || event.mMessage == NS_TOUCH_CANCEL) {
|
||||
if (event.mMessage == eTouchEnd || event.mMessage == NS_TOUCH_CANCEL) {
|
||||
for (int i = event.touches.Length() - 1; i >= 0; i--) {
|
||||
if (!event.touches[i]->mChanged) {
|
||||
event.touches.RemoveElementAt(i);
|
||||
@ -2990,7 +2990,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
||||
EventMessage msg;
|
||||
nsContentUtils::GetEventMessageAndAtom(aType, eTouchEventClass, &msg);
|
||||
if (msg != eTouchStart && msg != eTouchMove &&
|
||||
msg != NS_TOUCH_END && msg != NS_TOUCH_CANCEL) {
|
||||
msg != eTouchEnd && msg != NS_TOUCH_CANCEL) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
|
||||
break;
|
||||
}
|
||||
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
if (isTouchPrevented) {
|
||||
mTouchEndCancelled = true;
|
||||
mEndTouchIsClick = false;
|
||||
|
@ -581,10 +581,10 @@ AccessibleCaretEventHub::HandleTouchEvent(WidgetTouchEvent* aEvent)
|
||||
AC_LOGV("After eTouchMove, state: %s, consume: %d", mState->Name(), rv);
|
||||
break;
|
||||
|
||||
case NS_TOUCH_END:
|
||||
AC_LOGV("Before NS_TOUCH_END, state: %s", mState->Name());
|
||||
case eTouchEnd:
|
||||
AC_LOGV("Before eTouchEnd, state: %s", mState->Name());
|
||||
rv = mState->OnRelease(this);
|
||||
AC_LOGV("After NS_TOUCH_END, state: %s, consume: %d", mState->Name(), rv);
|
||||
AC_LOGV("After eTouchEnd, state: %s, consume: %d", mState->Name(), rv);
|
||||
break;
|
||||
|
||||
case NS_TOUCH_CANCEL:
|
||||
|
@ -231,7 +231,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
|
||||
mActiveTouchId = -1;
|
||||
LaunchLongTapDetector();
|
||||
}
|
||||
} else if (aEvent->mMessage == NS_TOUCH_END ||
|
||||
} else if (aEvent->mMessage == eTouchEnd ||
|
||||
aEvent->mMessage == NS_TOUCH_CANCEL ||
|
||||
aEvent->mMessage == eMouseUp) {
|
||||
CancelLongTapDetector();
|
||||
|
@ -766,7 +766,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent)
|
||||
case eMouseDown:
|
||||
status = HandleMouseDownEvent(aEvent->AsMouseEvent());
|
||||
break;
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
status = HandleTouchUpEvent(aEvent->AsTouchEvent());
|
||||
break;
|
||||
case eMouseUp:
|
||||
|
@ -56,7 +56,7 @@ EvictTouchPoint(nsRefPtr<dom::Touch>& aTouch,
|
||||
nsPoint pt(aTouch->mRefPoint.x, aTouch->mRefPoint.y);
|
||||
nsCOMPtr<nsIWidget> widget = frame->GetView()->GetNearestWidget(&pt);
|
||||
if (widget) {
|
||||
WidgetTouchEvent event(true, NS_TOUCH_END, widget);
|
||||
WidgetTouchEvent event(true, eTouchEnd, widget);
|
||||
event.widget = widget;
|
||||
event.time = PR_IntervalNow();
|
||||
event.touches.AppendElement(aTouch);
|
||||
@ -190,7 +190,7 @@ TouchManager::PreHandleEvent(WidgetEvent* aEvent,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
aIsHandlingUserInput = true;
|
||||
// Fall through to touchcancel code
|
||||
case NS_TOUCH_CANCEL: {
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
|
||||
static UniquePtr<WidgetEvent> CreateTouchReleaseEvent(nscoord aX, nscoord aY)
|
||||
{
|
||||
return CreateTouchEvent(NS_TOUCH_END, aX, aY);
|
||||
return CreateTouchEvent(eTouchEnd, aX, aY);
|
||||
}
|
||||
|
||||
static UniquePtr<WidgetEvent> CreateWheelEvent(EventMessage aMessage)
|
||||
|
@ -493,7 +493,7 @@ public:
|
||||
nsIFrame* frame = mPresShell->GetCurrentEventFrame();
|
||||
if (!frame &&
|
||||
(aVisitor.mEvent->mMessage == eMouseUp ||
|
||||
aVisitor.mEvent->mMessage == NS_TOUCH_END)) {
|
||||
aVisitor.mEvent->mMessage == eTouchEnd)) {
|
||||
// Redirect BUTTON_UP and TOUCH_END events to the root frame to ensure
|
||||
// that capturing is released.
|
||||
frame = mPresShell->GetRootFrame();
|
||||
@ -6680,7 +6680,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
|
||||
case eTouchMove:
|
||||
pointerMessage = ePointerMove;
|
||||
break;
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
pointerMessage = ePointerUp;
|
||||
break;
|
||||
case eTouchStart:
|
||||
@ -7480,7 +7480,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
switch (aEvent->mMessage) {
|
||||
case eTouchMove:
|
||||
case NS_TOUCH_CANCEL:
|
||||
case NS_TOUCH_END: {
|
||||
case eTouchEnd: {
|
||||
// get the correct shell to dispatch to
|
||||
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
|
||||
for (dom::Touch* touch : touchEvent->touches) {
|
||||
@ -8064,7 +8064,7 @@ PresShell::DispatchTouchEventToDOM(WidgetEvent* aEvent,
|
||||
// prevent click dispatching.
|
||||
bool canPrevent = (aEvent->mMessage == eTouchStart) ||
|
||||
(aEvent->mMessage == eTouchMove && aTouchIsNew) ||
|
||||
(aEvent->mMessage == NS_TOUCH_END);
|
||||
(aEvent->mMessage == eTouchEnd);
|
||||
bool preventDefault = false;
|
||||
nsEventStatus tmpStatus = nsEventStatus_eIgnore;
|
||||
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
|
||||
|
@ -2663,8 +2663,7 @@ nsFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
aEvent->mClass == eTouchEventClass) {
|
||||
if (aEvent->mMessage == eMouseDown || aEvent->mMessage == eTouchStart) {
|
||||
HandlePress(aPresContext, aEvent, aEventStatus);
|
||||
} else if (aEvent->mMessage == eMouseUp ||
|
||||
aEvent->mMessage == NS_TOUCH_END) {
|
||||
} else if (aEvent->mMessage == eMouseUp || aEvent->mMessage == eTouchEnd) {
|
||||
HandleRelease(aPresContext, aEvent, aEventStatus);
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
case eMouseUp: {
|
||||
if (aEvent->mClass == eTouchEventClass ||
|
||||
(aEvent->mClass == eMouseEventClass &&
|
||||
|
@ -540,7 +540,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
case eMouseUp:
|
||||
if (ShouldScrollForEvent(aEvent)) {
|
||||
StopDrag();
|
||||
@ -1050,7 +1050,7 @@ nsSliderFrame::ShouldScrollForEvent(WidgetGUIEvent* aEvent)
|
||||
{
|
||||
switch (aEvent->mMessage) {
|
||||
case eTouchStart:
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
return true;
|
||||
case eMouseDown:
|
||||
case eMouseUp: {
|
||||
|
@ -372,7 +372,7 @@ NS_EVENT_MESSAGE(eFullscreenError, eFullscreenEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(eTouchEventFirst, 5200)
|
||||
NS_EVENT_MESSAGE(eTouchStart, eTouchEventFirst)
|
||||
NS_EVENT_MESSAGE(eTouchMove, eTouchEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(NS_TOUCH_END, eTouchEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(eTouchEnd, eTouchEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(NS_TOUCH_CANCEL, eTouchEventFirst + 3)
|
||||
|
||||
// Pointerlock DOM API
|
||||
|
@ -42,7 +42,7 @@ MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
|
||||
case eTouchMove:
|
||||
mType = MULTITOUCH_MOVE;
|
||||
break;
|
||||
case NS_TOUCH_END:
|
||||
case eTouchEnd:
|
||||
mType = MULTITOUCH_END;
|
||||
break;
|
||||
case NS_TOUCH_CANCEL:
|
||||
@ -90,7 +90,7 @@ MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
|
||||
touchEventMessage = eTouchMove;
|
||||
break;
|
||||
case MULTITOUCH_END:
|
||||
touchEventMessage = NS_TOUCH_END;
|
||||
touchEventMessage = eTouchEnd;
|
||||
break;
|
||||
case MULTITOUCH_CANCEL:
|
||||
touchEventMessage = NS_TOUCH_CANCEL;
|
||||
|
@ -720,7 +720,7 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
|
||||
}
|
||||
case AndroidMotionEvent::ACTION_UP:
|
||||
case AndroidMotionEvent::ACTION_POINTER_UP: {
|
||||
type = NS_TOUCH_END;
|
||||
type = eTouchEnd;
|
||||
// for pointer-up events we only want the data from
|
||||
// the one pointer that went up
|
||||
startIndex = PointerIndex();
|
||||
|
@ -224,7 +224,7 @@ private:
|
||||
if (!mGeckoChild)
|
||||
return;
|
||||
|
||||
[self sendTouchEvent:NS_TOUCH_END touches:touches widget:mGeckoChild];
|
||||
[self sendTouchEvent:eTouchEnd touches:touches widget:mGeckoChild];
|
||||
for (UITouch* touch : touches) {
|
||||
CFDictionaryRemoveValue(mTouches, touch);
|
||||
}
|
||||
|
@ -6412,7 +6412,7 @@ bool nsWindow::OnTouch(WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
if (pInputs[i].dwFlags & TOUCHEVENTF_UP) {
|
||||
// Pres shell expects removed contacts points to be delivered in a separate
|
||||
// NS_TOUCH_END event containing only the contact points that were removed.
|
||||
// eTouchEnd event containing only the contact points that were removed.
|
||||
if (touchEndInput.mTimeStamp.IsNull()) {
|
||||
// Initialize a touch event to send.
|
||||
touchEndInput.mType = MultiTouchInput::MULTITOUCH_END;
|
||||
|
Loading…
Reference in New Issue
Block a user