Bug 1259667 - part2: rename WidgetSimpleGestureEvent.allowedDirections to mAllowedDirections. r?masayuki
MozReview-Commit-ID: 412YeoUoqIy
--- a/dom/events/SimpleGestureEvent.cpp
+++ b/dom/events/SimpleGestureEvent.cpp
@@ -38,31 +38,31 @@ NS_IMPL_RELEASE_INHERITED(SimpleGestureE
NS_INTERFACE_MAP_BEGIN(SimpleGestureEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMSimpleGestureEvent)
NS_INTERFACE_MAP_END_INHERITING(MouseEvent)
uint32_t
SimpleGestureEvent::AllowedDirections()
{
- return mEvent->AsSimpleGestureEvent()->allowedDirections;
+ return mEvent->AsSimpleGestureEvent()->mAllowedDirections;
}
NS_IMETHODIMP
SimpleGestureEvent::GetAllowedDirections(uint32_t* aAllowedDirections)
{
NS_ENSURE_ARG_POINTER(aAllowedDirections);
*aAllowedDirections = AllowedDirections();
return NS_OK;
}
NS_IMETHODIMP
SimpleGestureEvent::SetAllowedDirections(uint32_t aAllowedDirections)
{
- mEvent->AsSimpleGestureEvent()->allowedDirections = aAllowedDirections;
+ mEvent->AsSimpleGestureEvent()->mAllowedDirections = aAllowedDirections;
return NS_OK;
}
uint32_t
SimpleGestureEvent::Direction()
{
return mEvent->AsSimpleGestureEvent()->direction;
}
@@ -126,17 +126,17 @@ SimpleGestureEvent::InitSimpleGestureEve
{
MouseEvent::InitMouseEvent(aTypeArg, aCanBubbleArg, aCancelableArg,
aViewArg, aDetailArg,
aScreenX, aScreenY, aClientX, aClientY,
aCtrlKeyArg, aAltKeyArg, aShiftKeyArg,
aMetaKeyArg, aButton, aRelatedTarget);
WidgetSimpleGestureEvent* simpleGestureEvent = mEvent->AsSimpleGestureEvent();
- simpleGestureEvent->allowedDirections = aAllowedDirectionsArg;
+ simpleGestureEvent->mAllowedDirections = aAllowedDirectionsArg;
simpleGestureEvent->direction = aDirectionArg;
simpleGestureEvent->delta = aDeltaArg;
simpleGestureEvent->clickCount = aClickCountArg;
}
} // namespace dom
} // namespace mozilla
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -93,27 +93,27 @@ public:
{
return this;
}
WidgetSimpleGestureEvent(bool aIsTrusted, EventMessage aMessage,
nsIWidget* aWidget)
: WidgetMouseEventBase(aIsTrusted, aMessage, aWidget,
eSimpleGestureEventClass)
- , allowedDirections(0)
+ , mAllowedDirections(0)
, direction(0)
, clickCount(0)
, delta(0.0)
{
}
WidgetSimpleGestureEvent(const WidgetSimpleGestureEvent& aOther)
: WidgetMouseEventBase(aOther.IsTrusted(), aOther.mMessage,
aOther.mWidget, eSimpleGestureEventClass)
- , allowedDirections(aOther.allowedDirections)
+ , mAllowedDirections(aOther.mAllowedDirections)
, direction(aOther.direction)
, clickCount(0)
, delta(aOther.delta)
{
}
virtual WidgetEvent* Duplicate() const override
{
@@ -123,31 +123,31 @@ public:
WidgetSimpleGestureEvent* result =
new WidgetSimpleGestureEvent(false, mMessage, nullptr);
result->AssignSimpleGestureEventData(*this, true);
result->mFlags = mFlags;
return result;
}
// See nsIDOMSimpleGestureEvent for values
- uint32_t allowedDirections;
+ uint32_t mAllowedDirections;
// See nsIDOMSimpleGestureEvent for values
uint32_t direction;
// The number of taps for tap events
uint32_t clickCount;
// Delta for magnify and rotate events
double delta;
// XXX Not tested by test_assign_event_data.html
void AssignSimpleGestureEventData(const WidgetSimpleGestureEvent& aEvent,
bool aCopyTargets)
{
AssignMouseEventBaseData(aEvent, aCopyTargets);
- // allowedDirections isn't copied
+ // mAllowedDirections isn't copied
direction = aEvent.direction;
delta = aEvent.delta;
clickCount = aEvent.clickCount;
}
};
/******************************************************************************
* mozilla::WidgetTouchEvent
--- a/widget/cocoa/SwipeTracker.mm
+++ b/widget/cocoa/SwipeTracker.mm
@@ -208,13 +208,13 @@ SwipeTracker::CreateSwipeGestureEvent(Ev
bool
SwipeTracker::SendSwipeEvent(EventMessage aMsg, uint32_t aDirection, double aDelta)
{
WidgetSimpleGestureEvent geckoEvent =
CreateSwipeGestureEvent(aMsg, &mWidget, mEventPosition);
geckoEvent.direction = aDirection;
geckoEvent.delta = aDelta;
- geckoEvent.allowedDirections = mAllowedDirections;
+ geckoEvent.mAllowedDirections = mAllowedDirections;
return mWidget.DispatchWindowEvent(geckoEvent);
}
} // namespace mozilla
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2574,20 +2574,20 @@ nsChildView::SendMayStartSwipe(const moz
// This event also reports back the directions that we can swipe in.
LayoutDeviceIntPoint position =
RoundedToInt(aSwipeStartEvent.mPanStartPoint * ScreenToLayoutDeviceScale(1));
WidgetSimpleGestureEvent geckoEvent =
SwipeTracker::CreateSwipeGestureEvent(eSwipeGestureMayStart, this,
position);
geckoEvent.direction = direction;
geckoEvent.delta = 0.0;
- geckoEvent.allowedDirections = 0;
+ geckoEvent.mAllowedDirections = 0;
bool shouldStartSwipe = DispatchWindowEvent(geckoEvent); // event cancelled == swipe should start
- SwipeInfo result = { shouldStartSwipe, geckoEvent.allowedDirections };
+ SwipeInfo result = { shouldStartSwipe, geckoEvent.mAllowedDirections };
return result;
}
void
nsChildView::TrackScrollEventAsSwipe(const mozilla::PanGestureInput& aSwipeStartEvent,
uint32_t aAllowedDirections)
{
// If a swipe is currently being tracked kill it -- it's been interrupted