mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1046101 part.18 Rename NS_TOUCH_EVENT to eTouchEventClass r=smaug
This commit is contained in:
parent
3edbd8fb45
commit
8bb45b8c1f
@ -4270,7 +4270,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
|
||||
|
||||
if (nsEventStatus_eConsumeNoDefault == aVisitor.mEventStatus ||
|
||||
!(aVisitor.mEvent->mClass == eMouseEventClass ||
|
||||
aVisitor.mEvent->mClass == NS_TOUCH_EVENT ||
|
||||
aVisitor.mEvent->mClass == eTouchEventClass ||
|
||||
aVisitor.mEvent->mClass == eKeyboardEventClass)) {
|
||||
return;
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ Event::GetEventPopupControlState(WidgetEvent* aEvent)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NS_TOUCH_EVENT :
|
||||
case eTouchEventClass:
|
||||
if (aEvent->mFlags.mIsTrusted) {
|
||||
switch (aEvent->message) {
|
||||
case NS_TOUCH_START :
|
||||
@ -851,7 +851,7 @@ Event::GetScreenCoords(nsPresContext* aPresContext,
|
||||
aEvent->mClass != eMouseScrollEventClass &&
|
||||
aEvent->mClass != eWheelEventClass &&
|
||||
aEvent->mClass != ePointerEventClass &&
|
||||
aEvent->mClass != NS_TOUCH_EVENT &&
|
||||
aEvent->mClass != eTouchEventClass &&
|
||||
aEvent->mClass != eDragEventClass &&
|
||||
aEvent->mClass != eSimpleGestureEventClass)) {
|
||||
return nsIntPoint(0, 0);
|
||||
@ -906,7 +906,7 @@ Event::GetClientCoords(nsPresContext* aPresContext,
|
||||
(aEvent->mClass != eMouseEventClass &&
|
||||
aEvent->mClass != eMouseScrollEventClass &&
|
||||
aEvent->mClass != eWheelEventClass &&
|
||||
aEvent->mClass != NS_TOUCH_EVENT &&
|
||||
aEvent->mClass != eTouchEventClass &&
|
||||
aEvent->mClass != eDragEventClass &&
|
||||
aEvent->mClass != ePointerEventClass &&
|
||||
aEvent->mClass != eSimpleGestureEventClass) ||
|
||||
|
@ -741,7 +741,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
|
||||
case ePointerEventClass:
|
||||
return NS_NewDOMPointerEvent(aDOMEvent, aOwner, aPresContext,
|
||||
aEvent->AsPointerEvent());
|
||||
case NS_TOUCH_EVENT:
|
||||
case eTouchEventClass:
|
||||
return NS_NewDOMTouchEvent(aDOMEvent, aOwner, aPresContext,
|
||||
aEvent->AsTouchEvent());
|
||||
case NS_TRANSITION_EVENT:
|
||||
|
@ -550,19 +550,19 @@ WINDOW_ONLY_EVENT(moznetworkdownload,
|
||||
TOUCH_EVENT(touchstart,
|
||||
NS_TOUCH_START,
|
||||
EventNameType_All,
|
||||
NS_TOUCH_EVENT)
|
||||
eTouchEventClass)
|
||||
TOUCH_EVENT(touchend,
|
||||
NS_TOUCH_END,
|
||||
EventNameType_All,
|
||||
NS_TOUCH_EVENT)
|
||||
eTouchEventClass)
|
||||
TOUCH_EVENT(touchmove,
|
||||
NS_TOUCH_MOVE,
|
||||
EventNameType_All,
|
||||
NS_TOUCH_EVENT )
|
||||
eTouchEventClass )
|
||||
TOUCH_EVENT(touchcancel,
|
||||
NS_TOUCH_CANCEL,
|
||||
EventNameType_All,
|
||||
NS_TOUCH_EVENT)
|
||||
eTouchEventClass)
|
||||
|
||||
DOCUMENT_ONLY_EVENT(readystatechange,
|
||||
NS_READYSTATECHANGE,
|
||||
|
@ -1099,7 +1099,7 @@ EventStateManager::DispatchCrossProcessEvent(WidgetEvent* aEvent,
|
||||
case eWheelEventClass: {
|
||||
return remote->SendMouseWheelEvent(*aEvent->AsWheelEvent());
|
||||
}
|
||||
case NS_TOUCH_EVENT: {
|
||||
case eTouchEventClass: {
|
||||
// Let the child process synthesize a mouse event if needed, and
|
||||
// ensure we don't synthesize one in this process.
|
||||
*aStatus = nsEventStatus_eConsumeNoDefault;
|
||||
@ -1171,7 +1171,7 @@ CrossProcessSafeEvent(const WidgetEvent& aEvent)
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
case NS_TOUCH_EVENT:
|
||||
case eTouchEventClass:
|
||||
switch (aEvent.message) {
|
||||
case NS_TOUCH_START:
|
||||
case NS_TOUCH_MOVE:
|
||||
@ -1200,7 +1200,7 @@ EventStateManager::HandleCrossProcessEvent(WidgetEvent* aEvent,
|
||||
//
|
||||
// NB: the elements of |targets| must be unique, for correctness.
|
||||
nsAutoTArray<nsCOMPtr<nsIContent>, 1> targets;
|
||||
if (aEvent->mClass != NS_TOUCH_EVENT ||
|
||||
if (aEvent->mClass != eTouchEventClass ||
|
||||
aEvent->message == NS_TOUCH_START) {
|
||||
// If this event only has one target, and it's remote, add it to
|
||||
// the array.
|
||||
|
@ -300,7 +300,7 @@ UIEvent::GetLayerPoint() const
|
||||
mEvent->mClass != eMouseScrollEventClass &&
|
||||
mEvent->mClass != eWheelEventClass &&
|
||||
mEvent->mClass != ePointerEventClass &&
|
||||
mEvent->mClass != NS_TOUCH_EVENT &&
|
||||
mEvent->mClass != eTouchEventClass &&
|
||||
mEvent->mClass != eDragEventClass &&
|
||||
mEvent->mClass != eSimpleGestureEventClass) ||
|
||||
!mPresContext ||
|
||||
|
@ -779,7 +779,7 @@ void
|
||||
TabParent::MapEventCoordinatesForChildProcess(
|
||||
const LayoutDeviceIntPoint& aOffset, WidgetEvent* aEvent)
|
||||
{
|
||||
if (aEvent->mClass != NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass != eTouchEventClass) {
|
||||
aEvent->refPoint = aOffset;
|
||||
} else {
|
||||
aEvent->refPoint = LayoutDeviceIntPoint();
|
||||
@ -1015,7 +1015,7 @@ TabParent::TryCapture(const WidgetGUIEvent& aEvent)
|
||||
{
|
||||
MOZ_ASSERT(sEventCapturer == this && mEventCaptureDepth > 0);
|
||||
|
||||
if (aEvent.mClass != NS_TOUCH_EVENT) {
|
||||
if (aEvent.mClass != eTouchEventClass) {
|
||||
// Only capture of touch events is implemented, for now.
|
||||
return false;
|
||||
}
|
||||
@ -2082,7 +2082,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
|
||||
int32_t aModifiers)
|
||||
{
|
||||
uint32_t msg;
|
||||
nsContentUtils::GetEventIdAndAtom(aType, NS_TOUCH_EVENT, &msg);
|
||||
nsContentUtils::GetEventIdAndAtom(aType, eTouchEventClass, &msg);
|
||||
if (msg != NS_TOUCH_START && msg != NS_TOUCH_MOVE &&
|
||||
msg != NS_TOUCH_END && msg != NS_TOUCH_CANCEL) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -694,7 +694,7 @@ APZCTreeManager::ReceiveInputEvent(WidgetInputEvent& aEvent,
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
switch (aEvent.mClass) {
|
||||
case NS_TOUCH_EVENT: {
|
||||
case eTouchEventClass: {
|
||||
WidgetTouchEvent& touchEvent = *aEvent.AsTouchEvent();
|
||||
MultiTouchInput touchInput(touchEvent);
|
||||
nsEventStatus result = ProcessTouchInput(touchInput, aOutTargetGuid);
|
||||
|
@ -78,7 +78,7 @@ GetPrefsFor(EventClassID aEventClassID)
|
||||
{
|
||||
EventRadiusPrefs* prefs = nullptr;
|
||||
const char* prefBranch = nullptr;
|
||||
if (aEventClassID == NS_TOUCH_EVENT) {
|
||||
if (aEventClassID == eTouchEventClass) {
|
||||
prefBranch = "touch";
|
||||
prefs = &sTouchEventRadiusPrefs;
|
||||
} else if (aEventClassID == eMouseEventClass) {
|
||||
|
@ -1876,7 +1876,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
|
||||
aEvent->mClass != eSimpleGestureEventClass &&
|
||||
aEvent->mClass != ePointerEventClass &&
|
||||
aEvent->mClass != eGestureNotifyEventClass &&
|
||||
aEvent->mClass != NS_TOUCH_EVENT &&
|
||||
aEvent->mClass != eTouchEventClass &&
|
||||
aEvent->mClass != eQueryContentEventClass))
|
||||
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
|
||||
|
||||
|
@ -6736,7 +6736,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
|
||||
0.0f;
|
||||
event.convertToPointer = mouseEvent->convertToPointer = false;
|
||||
aShell->HandleEvent(aFrame, &event, aDontRetargetEvents, aStatus);
|
||||
} else if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
} else if (aEvent->mClass == eTouchEventClass) {
|
||||
WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
|
||||
// loop over all touches and dispatch pointer events on each touch
|
||||
// copy the event
|
||||
@ -6927,7 +6927,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
// document that is being captured.
|
||||
retargetEventDoc = capturingContent->GetCrossShadowCurrentDoc();
|
||||
#ifdef ANDROID
|
||||
} else if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
} else if (aEvent->mClass == eTouchEventClass) {
|
||||
retargetEventDoc = GetTouchEventTargetDocument();
|
||||
#endif
|
||||
}
|
||||
@ -6975,7 +6975,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
if (aEvent->IsUsingCoordinates()) {
|
||||
ReleasePointerCaptureCaller releasePointerCaptureCaller;
|
||||
if (nsLayoutUtils::AreAsyncAnimationsEnabled() && mDocument) {
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
nsIDocument::UnlockPointer();
|
||||
}
|
||||
|
||||
@ -7056,7 +7056,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
// all touch events except for touchstart use a captured target
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT &&
|
||||
if (aEvent->mClass == eTouchEventClass &&
|
||||
aEvent->message != NS_TOUCH_START) {
|
||||
captureRetarget = true;
|
||||
}
|
||||
@ -7762,7 +7762,7 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
|
||||
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript(),
|
||||
"Somebody changed aEvent to cause a DOM event!");
|
||||
nsPresShellEventCB eventCB(this);
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
DispatchTouchEvent(aEvent, aStatus, &eventCB, touchIsNew);
|
||||
} else {
|
||||
nsCOMPtr<nsINode> eventTarget = mCurrentEventContent.get();
|
||||
|
@ -467,7 +467,7 @@ Decimal
|
||||
nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
|
||||
{
|
||||
MOZ_ASSERT(aEvent->mClass == eMouseEventClass ||
|
||||
aEvent->mClass == NS_TOUCH_EVENT,
|
||||
aEvent->mClass == eTouchEventClass,
|
||||
"Unexpected event type - aEvent->refPoint may be meaningless");
|
||||
|
||||
MOZ_ASSERT(mContent->IsHTML(nsGkAtoms::input), "bad cast");
|
||||
@ -485,7 +485,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
|
||||
Decimal range = maximum - minimum;
|
||||
|
||||
LayoutDeviceIntPoint absPoint;
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
MOZ_ASSERT(aEvent->AsTouchEvent()->touches.Length() == 1,
|
||||
"Unexpected number of touches");
|
||||
absPoint = LayoutDeviceIntPoint::FromUntyped(
|
||||
|
@ -2467,7 +2467,7 @@ nsFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
|
||||
if ((aEvent->mClass == eMouseEventClass &&
|
||||
aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
|
||||
aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
aEvent->mClass == eTouchEventClass) {
|
||||
if (aEvent->message == NS_MOUSE_BUTTON_DOWN || aEvent->message == NS_TOUCH_START) {
|
||||
HandlePress(aPresContext, aEvent, aEventStatus);
|
||||
} else if (aEvent->message == NS_MOUSE_BUTTON_UP || aEvent->message == NS_TOUCH_END) {
|
||||
@ -2679,7 +2679,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aEvent);
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
switch (aEvent->message) {
|
||||
case NS_TOUCH_START:
|
||||
case NS_MOUSE_BUTTON_DOWN: {
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT ||
|
||||
if (aEvent->mClass == eTouchEventClass ||
|
||||
(aEvent->mClass == eMouseEventClass &&
|
||||
aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton)) {
|
||||
nsCOMPtr<nsIBaseWindow> window;
|
||||
@ -129,7 +129,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
|
||||
case NS_TOUCH_END:
|
||||
case NS_MOUSE_BUTTON_UP: {
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT ||
|
||||
if (aEvent->mClass == eTouchEventClass ||
|
||||
(aEvent->mClass == eMouseEventClass &&
|
||||
aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton)) {
|
||||
// we're done tracking.
|
||||
|
@ -470,7 +470,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
isMouseOutsideThumb = true;
|
||||
}
|
||||
}
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
if (isMouseOutsideThumb)
|
||||
@ -523,7 +523,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
NS_ENSURE_TRUE(weakFrame.IsAlive(), NS_OK);
|
||||
|
||||
DragThumb(true);
|
||||
if (aEvent->mClass == NS_TOUCH_EVENT) {
|
||||
if (aEvent->mClass == eTouchEventClass) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType)
|
||||
// TouchEvents.h
|
||||
eGestureNotifyEventClass, // WidgetGestureNotifyEvent
|
||||
eSimpleGestureEventClass, // WidgetSimpleGestureEvent
|
||||
NS_TOUCH_EVENT, // WidgetTouchEvent
|
||||
eTouchEventClass, // WidgetTouchEvent
|
||||
|
||||
// ContentEvents.h
|
||||
NS_SCROLLPORT_EVENT, // InternalScrollPortEvent
|
||||
|
@ -165,9 +165,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
WidgetTouchEvent(const WidgetTouchEvent& aOther) :
|
||||
WidgetInputEvent(aOther.mFlags.mIsTrusted, aOther.message, aOther.widget,
|
||||
NS_TOUCH_EVENT)
|
||||
WidgetTouchEvent(const WidgetTouchEvent& aOther)
|
||||
: WidgetInputEvent(aOther.mFlags.mIsTrusted, aOther.message, aOther.widget,
|
||||
eTouchEventClass)
|
||||
{
|
||||
modifiers = aOther.modifiers;
|
||||
time = aOther.time;
|
||||
@ -177,8 +177,8 @@ public:
|
||||
MOZ_COUNT_CTOR(WidgetTouchEvent);
|
||||
}
|
||||
|
||||
WidgetTouchEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget) :
|
||||
WidgetInputEvent(aIsTrusted, aMessage, aWidget, NS_TOUCH_EVENT)
|
||||
WidgetTouchEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget)
|
||||
: WidgetInputEvent(aIsTrusted, aMessage, aWidget, eTouchEventClass)
|
||||
{
|
||||
MOZ_COUNT_CTOR(WidgetTouchEvent);
|
||||
mFlags.mCancelable = message != NS_TOUCH_CANCEL;
|
||||
@ -191,7 +191,7 @@ public:
|
||||
|
||||
virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(mClass == NS_TOUCH_EVENT,
|
||||
MOZ_ASSERT(mClass == eTouchEventClass,
|
||||
"Duplicate() must be overridden by sub class");
|
||||
// Not copying widget, it is a weak reference.
|
||||
WidgetTouchEvent* result = new WidgetTouchEvent(false, message, nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user