mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895274 part.244 Rename NS_TOUCH_CANCEL to eTouchCancel r=smaug
This commit is contained in:
parent
35331f6652
commit
093b183f70
@ -968,7 +968,7 @@ nsDOMWindowUtils::SendTouchEventCommon(const nsAString& aType,
|
||||
} else if (aType.EqualsLiteral("touchend")) {
|
||||
msg = eTouchEnd;
|
||||
} else if (aType.EqualsLiteral("touchcancel")) {
|
||||
msg = NS_TOUCH_CANCEL;
|
||||
msg = eTouchCancel;
|
||||
} else {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ TOUCH_EVENT(touchmove,
|
||||
EventNameType_All,
|
||||
eTouchEventClass )
|
||||
TOUCH_EVENT(touchcancel,
|
||||
NS_TOUCH_CANCEL,
|
||||
eTouchCancel,
|
||||
EventNameType_All,
|
||||
eTouchEventClass)
|
||||
|
||||
|
@ -1156,7 +1156,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
|
||||
case eTouchStart:
|
||||
case eTouchMove:
|
||||
case eTouchEnd:
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -122,8 +122,7 @@ TouchEvent::Touches()
|
||||
{
|
||||
if (!mTouches) {
|
||||
WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
|
||||
if (mEvent->mMessage == eTouchEnd ||
|
||||
mEvent->mMessage == NS_TOUCH_CANCEL) {
|
||||
if (mEvent->mMessage == eTouchEnd || mEvent->mMessage == eTouchCancel) {
|
||||
// for touchend events, remove any changed touches from the touches array
|
||||
WidgetTouchEvent::AutoTouchArray unchangedTouches;
|
||||
const WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
|
||||
@ -150,8 +149,8 @@ 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 != eTouchEnd &&
|
||||
mEvent->mMessage != NS_TOUCH_CANCEL) || !touches[i]->mChanged) {
|
||||
if ((mEvent->mMessage != eTouchEnd && mEvent->mMessage != eTouchCancel) ||
|
||||
!touches[i]->mChanged) {
|
||||
if (touches[i]->mTarget == mEvent->originalTarget) {
|
||||
targetTouches.AppendElement(touches[i]);
|
||||
}
|
||||
|
@ -4153,7 +4153,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
if (mIsDraggingRange) {
|
||||
CancelRangeThumbDrag();
|
||||
}
|
||||
|
@ -2061,7 +2061,7 @@ TabChild::UpdateTapState(const WidgetTouchEvent& aEvent, nsEventStatus aStatus)
|
||||
eMouseUp, time, currentPoint, 0, mPuppetWidget);
|
||||
}
|
||||
// fall through
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
CancelTapTracking();
|
||||
return;
|
||||
|
||||
|
@ -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 == eTouchEnd || event.mMessage == NS_TOUCH_CANCEL) {
|
||||
if (event.mMessage == eTouchEnd || event.mMessage == eTouchCancel) {
|
||||
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 != eTouchEnd && msg != NS_TOUCH_CANCEL) {
|
||||
msg != eTouchEnd && msg != eTouchCancel) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
|
||||
mEndTouchIsClick = false;
|
||||
}
|
||||
// fall through
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
mActiveElementManager->HandleTouchEndEvent(mEndTouchIsClick);
|
||||
// fall through
|
||||
case eTouchMove: {
|
||||
@ -308,8 +308,8 @@ APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
|
||||
aApzResponse == nsEventStatus_eConsumeDoDefault &&
|
||||
gfxPrefs::PointerEventsEnabled()) {
|
||||
WidgetTouchEvent cancelEvent(aEvent);
|
||||
cancelEvent.mMessage = NS_TOUCH_CANCEL;
|
||||
cancelEvent.mFlags.mCancelable = false; // mMessage != NS_TOUCH_CANCEL;
|
||||
cancelEvent.mMessage = eTouchCancel;
|
||||
cancelEvent.mFlags.mCancelable = false; // mMessage != eTouchCancel;
|
||||
for (uint32_t i = 0; i < cancelEvent.touches.Length(); ++i) {
|
||||
if (mozilla::dom::Touch* touch = cancelEvent.touches[i]) {
|
||||
touch->convertToPointer = true;
|
||||
|
@ -587,10 +587,10 @@ AccessibleCaretEventHub::HandleTouchEvent(WidgetTouchEvent* aEvent)
|
||||
AC_LOGV("After eTouchEnd, state: %s, consume: %d", mState->Name(), rv);
|
||||
break;
|
||||
|
||||
case NS_TOUCH_CANCEL:
|
||||
AC_LOGV("Before NS_TOUCH_CANCEL, state: %s", mState->Name());
|
||||
case eTouchCancel:
|
||||
AC_LOGV("Before eTouchCancel, state: %s", mState->Name());
|
||||
rv = mState->OnRelease(this);
|
||||
AC_LOGV("After NS_TOUCH_CANCEL, state: %s, consume: %d", mState->Name(),
|
||||
AC_LOGV("After eTouchCancel, state: %s, consume: %d", mState->Name(),
|
||||
rv);
|
||||
break;
|
||||
|
||||
|
@ -232,7 +232,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
|
||||
LaunchLongTapDetector();
|
||||
}
|
||||
} else if (aEvent->mMessage == eTouchEnd ||
|
||||
aEvent->mMessage == NS_TOUCH_CANCEL ||
|
||||
aEvent->mMessage == eTouchCancel ||
|
||||
aEvent->mMessage == eMouseUp) {
|
||||
CancelLongTapDetector();
|
||||
if (mDragMode != NONE) {
|
||||
|
@ -778,7 +778,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent)
|
||||
case eMouseMove:
|
||||
status = HandleMouseMoveEvent(aEvent->AsMouseEvent());
|
||||
break;
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
mTouchesId.Clear();
|
||||
SetState(TOUCHCARET_NONE);
|
||||
LaunchExpirationTimer();
|
||||
|
@ -193,7 +193,7 @@ TouchManager::PreHandleEvent(WidgetEvent* aEvent,
|
||||
case eTouchEnd:
|
||||
aIsHandlingUserInput = true;
|
||||
// Fall through to touchcancel code
|
||||
case NS_TOUCH_CANCEL: {
|
||||
case eTouchCancel: {
|
||||
// Remove the changed touches
|
||||
// need to make sure we only remove touches that are ending here
|
||||
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
|
||||
|
@ -6686,7 +6686,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
|
||||
case eTouchStart:
|
||||
pointerMessage = ePointerDown;
|
||||
break;
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
pointerMessage = ePointerCancel;
|
||||
break;
|
||||
default:
|
||||
@ -7479,7 +7479,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
static_cast<PresShell*>(frame->PresContext()->PresShell());
|
||||
switch (aEvent->mMessage) {
|
||||
case eTouchMove:
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
case eTouchEnd: {
|
||||
// get the correct shell to dispatch to
|
||||
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
|
||||
|
@ -373,7 +373,7 @@ NS_EVENT_MESSAGE(eTouchEventFirst, 5200)
|
||||
NS_EVENT_MESSAGE(eTouchStart, eTouchEventFirst)
|
||||
NS_EVENT_MESSAGE(eTouchMove, eTouchEventFirst + 1)
|
||||
NS_EVENT_MESSAGE(eTouchEnd, eTouchEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(NS_TOUCH_CANCEL, eTouchEventFirst + 3)
|
||||
NS_EVENT_MESSAGE(eTouchCancel, eTouchEventFirst + 3)
|
||||
|
||||
// Pointerlock DOM API
|
||||
NS_EVENT_MESSAGE(ePointerLockEventFirst, 5300)
|
||||
|
@ -45,7 +45,7 @@ MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
|
||||
case eTouchEnd:
|
||||
mType = MULTITOUCH_END;
|
||||
break;
|
||||
case NS_TOUCH_CANCEL:
|
||||
case eTouchCancel:
|
||||
mType = MULTITOUCH_CANCEL;
|
||||
break;
|
||||
default:
|
||||
@ -93,7 +93,7 @@ MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
|
||||
touchEventMessage = eTouchEnd;
|
||||
break;
|
||||
case MULTITOUCH_CANCEL:
|
||||
touchEventMessage = NS_TOUCH_CANCEL;
|
||||
touchEventMessage = eTouchCancel;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Did not assign a type to WidgetTouchEvent in MultiTouchInput");
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
time = aOther.time;
|
||||
timeStamp = aOther.timeStamp;
|
||||
touches.AppendElements(aOther.touches);
|
||||
mFlags.mCancelable = mMessage != NS_TOUCH_CANCEL;
|
||||
mFlags.mCancelable = mMessage != eTouchCancel;
|
||||
MOZ_COUNT_CTOR(WidgetTouchEvent);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ public:
|
||||
: WidgetInputEvent(aIsTrusted, aMessage, aWidget, eTouchEventClass)
|
||||
{
|
||||
MOZ_COUNT_CTOR(WidgetTouchEvent);
|
||||
mFlags.mCancelable = mMessage != NS_TOUCH_CANCEL;
|
||||
mFlags.mCancelable = mMessage != eTouchCancel;
|
||||
}
|
||||
|
||||
virtual ~WidgetTouchEvent()
|
||||
|
@ -729,7 +729,7 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
|
||||
}
|
||||
case AndroidMotionEvent::ACTION_OUTSIDE:
|
||||
case AndroidMotionEvent::ACTION_CANCEL: {
|
||||
type = NS_TOUCH_CANCEL;
|
||||
type = eTouchCancel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1004,7 +1004,7 @@ nsWindow::OnContextmenuEvent(AndroidGeckoEvent *ae)
|
||||
// triggering further element behaviour such as link-clicks.
|
||||
if (contextMenuStatus == nsEventStatus_eConsumeNoDefault) {
|
||||
WidgetTouchEvent canceltouchEvent = ae->MakeTouchEvent(this);
|
||||
canceltouchEvent.mMessage = NS_TOUCH_CANCEL;
|
||||
canceltouchEvent.mMessage = eTouchCancel;
|
||||
DispatchEvent(&canceltouchEvent);
|
||||
return true;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ private:
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
ALOG("[ChildView[%p] touchesCancelled", self);
|
||||
[self sendTouchEvent:NS_TOUCH_CANCEL touches:touches widget:mGeckoChild];
|
||||
[self sendTouchEvent:eTouchCancel touches:touches widget:mGeckoChild];
|
||||
for (UITouch* touch : touches) {
|
||||
CFDictionaryRemoveValue(mTouches, touch);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user