Bug 895274 part.242 Rename NS_TOUCH_MOVE to eTouchMove r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-15 00:14:35 +09:00
parent 7a48a6f2ab
commit 52a7afe36c
19 changed files with 28 additions and 27 deletions

View File

@ -964,7 +964,7 @@ nsDOMWindowUtils::SendTouchEventCommon(const nsAString& aType,
if (aType.EqualsLiteral("touchstart")) {
msg = eTouchStart;
} else if (aType.EqualsLiteral("touchmove")) {
msg = NS_TOUCH_MOVE;
msg = eTouchMove;
} else if (aType.EqualsLiteral("touchend")) {
msg = NS_TOUCH_END;
} else if (aType.EqualsLiteral("touchcancel")) {

View File

@ -576,7 +576,7 @@ TOUCH_EVENT(touchend,
EventNameType_All,
eTouchEventClass)
TOUCH_EVENT(touchmove,
NS_TOUCH_MOVE,
eTouchMove,
EventNameType_All,
eTouchEventClass )
TOUCH_EVENT(touchcancel,

View File

@ -1154,7 +1154,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
case eTouchEventClass:
switch (aEvent.mMessage) {
case eTouchStart:
case NS_TOUCH_MOVE:
case eTouchMove:
case NS_TOUCH_END:
case NS_TOUCH_CANCEL:
return true;

View File

@ -4119,7 +4119,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
} break;
case eMouseMove:
case NS_TOUCH_MOVE:
case eTouchMove:
if (!mIsDraggingRange) {
break;
}

View File

@ -2044,7 +2044,7 @@ TabChild::UpdateTapState(const WidgetTouchEvent& aEvent, nsEventStatus aStatus)
LayoutDevicePoint currentPoint = LayoutDevicePoint(trackedTouch->mRefPoint.x, trackedTouch->mRefPoint.y);
int64_t time = aEvent.time;
switch (aEvent.mMessage) {
case NS_TOUCH_MOVE:
case eTouchMove:
if (std::abs(currentPoint.x - mGestureDownPoint.x) > sDragThreshold.width ||
std::abs(currentPoint.y - mGestureDownPoint.y) > sDragThreshold.height) {
CancelTapTracking();

View File

@ -1856,7 +1856,7 @@ bool TabParent::SendRealTouchEvent(WidgetTouchEvent& event)
event.touches[i]->mRefPoint += offset;
}
return (event.mMessage == NS_TOUCH_MOVE) ?
return (event.mMessage == eTouchMove) ?
PBrowserParent::SendRealTouchMoveEvent(event, guid, blockId, apzResponse) :
PBrowserParent::SendRealTouchEvent(event, guid, blockId, apzResponse);
}
@ -2989,7 +2989,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
{
EventMessage msg;
nsContentUtils::GetEventMessageAndAtom(aType, eTouchEventClass, &msg);
if (msg != eTouchStart && msg != NS_TOUCH_MOVE &&
if (msg != eTouchStart && msg != eTouchMove &&
msg != NS_TOUCH_END && msg != NS_TOUCH_CANCEL) {
return NS_ERROR_FAILURE;
}

View File

@ -292,7 +292,7 @@ APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
case NS_TOUCH_CANCEL:
mActiveElementManager->HandleTouchEndEvent(mEndTouchIsClick);
// fall through
case NS_TOUCH_MOVE: {
case eTouchMove: {
if (mPendingTouchPreventedResponse) {
MOZ_ASSERT(aGuid == mPendingTouchPreventedGuid);
}

View File

@ -575,10 +575,10 @@ AccessibleCaretEventHub::HandleTouchEvent(WidgetTouchEvent* aEvent)
AC_LOGV("After eTouchStart, state: %s, consume: %d", mState->Name(), rv);
break;
case NS_TOUCH_MOVE:
AC_LOGV("Before NS_TOUCH_MOVE, state: %s", mState->Name());
case eTouchMove:
AC_LOGV("Before eTouchMove, state: %s", mState->Name());
rv = mState->OnMove(this, point);
AC_LOGV("After NS_TOUCH_MOVE, state: %s, consume: %d", mState->Name(), rv);
AC_LOGV("After eTouchMove, state: %s, consume: %d", mState->Name(), rv);
break;
case NS_TOUCH_END:

View File

@ -244,8 +244,7 @@ SelectionCarets::HandleEvent(WidgetEvent* aEvent)
}
return nsEventStatus_eConsumeNoDefault;
}
} else if (aEvent->mMessage == NS_TOUCH_MOVE ||
aEvent->mMessage == eMouseMove) {
} else if (aEvent->mMessage == eTouchMove || aEvent->mMessage == eMouseMove) {
if (mDragMode == START_FRAME || mDragMode == END_FRAME) {
if (mActiveTouchId == nowTouchId) {
ptInRoot.y += mCaretCenterToDownPointOffsetY;

View File

@ -772,7 +772,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent)
case eMouseUp:
status = HandleMouseUpEvent(aEvent->AsMouseEvent());
break;
case NS_TOUCH_MOVE:
case eTouchMove:
status = HandleTouchMoveEvent(aEvent->AsTouchEvent());
break;
case eMouseMove:
@ -895,7 +895,7 @@ TouchCaret::HandleTouchMoveEvent(WidgetTouchEvent* aEvent)
break;
case TOUCHCARET_TOUCHDRAG_INACTIVE:
// Consume NS_TOUCH_MOVE event in TOUCHCARET_TOUCHDRAG_INACTIVE state.
// Consume eTouchMove event in TOUCHCARET_TOUCHDRAG_INACTIVE state.
status = nsEventStatus_eConsumeNoDefault;
break;
}

View File

@ -128,7 +128,7 @@ TouchManager::PreHandleEvent(WidgetEvent* aEvent,
}
break;
}
case NS_TOUCH_MOVE: {
case eTouchMove: {
// Check for touches that changed. Mark them add to queue
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
WidgetTouchEvent::TouchArray& touches = touchEvent->touches;

View File

@ -168,7 +168,7 @@ public:
static UniquePtr<WidgetEvent> CreateTouchMoveEvent(nscoord aX, nscoord aY)
{
return CreateTouchEvent(NS_TOUCH_MOVE, aX, aY);
return CreateTouchEvent(eTouchMove, aX, aY);
}
static UniquePtr<WidgetEvent> CreateTouchReleaseEvent(nscoord aX, nscoord aY)

View File

@ -6677,7 +6677,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
// loop over all touches and dispatch pointer events on each touch
// copy the event
switch (touchEvent->mMessage) {
case NS_TOUCH_MOVE:
case eTouchMove:
pointerMessage = ePointerMove;
break;
case NS_TOUCH_END:
@ -7478,7 +7478,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
PresShell* shell =
static_cast<PresShell*>(frame->PresContext()->PresShell());
switch (aEvent->mMessage) {
case NS_TOUCH_MOVE:
case eTouchMove:
case NS_TOUCH_CANCEL:
case NS_TOUCH_END: {
// get the correct shell to dispatch to
@ -8063,7 +8063,7 @@ PresShell::DispatchTouchEventToDOM(WidgetEvent* aEvent,
// point prevents mouse events. calling it on the touchend should
// prevent click dispatching.
bool canPrevent = (aEvent->mMessage == eTouchStart) ||
(aEvent->mMessage == NS_TOUCH_MOVE && aTouchIsNew) ||
(aEvent->mMessage == eTouchMove && aTouchIsNew) ||
(aEvent->mMessage == NS_TOUCH_END);
bool preventDefault = false;
nsEventStatus tmpStatus = nsEventStatus_eIgnore;

View File

@ -143,7 +143,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
}
break;
case NS_TOUCH_MOVE:
case eTouchMove:
case eMouseMove: {
if (mTrackingMouseMove)
{

View File

@ -478,7 +478,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
if (isDraggingThumb())
{
switch (aEvent->mMessage) {
case NS_TOUCH_MOVE:
case eTouchMove:
case eMouseMove: {
nsPoint eventPoint;
if (!GetEventPoint(aEvent, eventPoint)) {

View File

@ -371,7 +371,7 @@ NS_EVENT_MESSAGE(eFullscreenError, eFullscreenEventFirst + 1)
NS_EVENT_MESSAGE(eTouchEventFirst, 5200)
NS_EVENT_MESSAGE(eTouchStart, eTouchEventFirst)
NS_EVENT_MESSAGE(NS_TOUCH_MOVE, eTouchEventFirst + 1)
NS_EVENT_MESSAGE(eTouchMove, eTouchEventFirst + 1)
NS_EVENT_MESSAGE(NS_TOUCH_END, eTouchEventFirst + 2)
NS_EVENT_MESSAGE(NS_TOUCH_CANCEL, eTouchEventFirst + 3)

View File

@ -39,7 +39,7 @@ MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
case eTouchStart:
mType = MULTITOUCH_START;
break;
case NS_TOUCH_MOVE:
case eTouchMove:
mType = MULTITOUCH_MOVE;
break;
case NS_TOUCH_END:
@ -87,7 +87,7 @@ MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
touchEventMessage = eTouchStart;
break;
case MULTITOUCH_MOVE:
touchEventMessage = NS_TOUCH_MOVE;
touchEventMessage = eTouchMove;
break;
case MULTITOUCH_END:
touchEventMessage = NS_TOUCH_END;

View File

@ -710,7 +710,7 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
}
}
case AndroidMotionEvent::ACTION_MOVE: {
type = NS_TOUCH_MOVE;
type = eTouchMove;
break;
}
case AndroidMotionEvent::ACTION_HOVER_EXIT: {

View File

@ -239,7 +239,9 @@ private:
if (!mGeckoChild)
return;
[self sendTouchEvent:NS_TOUCH_MOVE touches:[event allTouches] widget:mGeckoChild];
[self sendTouchEvent:eTouchMove
touches:[event allTouches]
widget:mGeckoChild];
}
- (void)setNeedsDisplayInRect:(CGRect)aRect