Bug 1259665 part.1 Rename WidgetPointerEvent::width to mWidth r?smaug
MozReview-Commit-ID: 3V5gyOvPuQi
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -759,17 +759,17 @@ nsDOMWindowUtils::SendPointerEventCommon
WidgetPointerEvent event(true, msg, widget);
event.mModifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
event.button = aButton;
event.buttons = nsContentUtils::GetButtonsFlagForButton(aButton);
event.pressure = aPressure;
event.inputSource = aInputSourceArg;
event.pointerId = aPointerId;
- event.width = aWidth;
+ event.mWidth = aWidth;
event.height = aHeight;
event.tiltX = aTiltX;
event.tiltY = aTiltY;
event.isPrimary = (nsIDOMMouseEvent::MOZ_SOURCE_MOUSE == aInputSourceArg) ? true : aIsPrimary;
event.mClickCount = aClickCount;
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aOptionalArgCount >= 10 ? aIsSynthesized : true;
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3831,17 +3831,17 @@ CreateMouseOrPointerWidgetEvent(WidgetMo
js::ProfileEntry::Category::EVENTS);
nsAutoPtr<WidgetPointerEvent> newPointerEvent;
newPointerEvent =
new WidgetPointerEvent(aMouseEvent->IsTrusted(), aMessage,
aMouseEvent->mWidget);
newPointerEvent->isPrimary = sourcePointer->isPrimary;
newPointerEvent->pointerId = sourcePointer->pointerId;
- newPointerEvent->width = sourcePointer->width;
+ newPointerEvent->mWidth = sourcePointer->mWidth;
newPointerEvent->height = sourcePointer->height;
newPointerEvent->inputSource = sourcePointer->inputSource;
newPointerEvent->relatedTarget =
nsIPresShell::GetPointerCapturingContent(sourcePointer->pointerId)
? nullptr
: aRelatedContent;
aNewEvent = newPointerEvent.forget();
} else {
--- a/dom/events/PointerEvent.cpp
+++ b/dom/events/PointerEvent.cpp
@@ -82,17 +82,17 @@ PointerEvent::Constructor(EventTarget* a
aParam.mView, aParam.mDetail, aParam.mScreenX,
aParam.mScreenY, aParam.mClientX, aParam.mClientY,
false, false, false, false, aParam.mButton,
aParam.mRelatedTarget);
e->InitializeExtraMouseEventDictionaryMembers(aParam);
WidgetPointerEvent* widgetEvent = e->mEvent->AsPointerEvent();
widgetEvent->pointerId = aParam.mPointerId;
- widgetEvent->width = aParam.mWidth;
+ widgetEvent->mWidth = aParam.mWidth;
widgetEvent->height = aParam.mHeight;
widgetEvent->pressure = aParam.mPressure;
widgetEvent->tiltX = aParam.mTiltX;
widgetEvent->tiltY = aParam.mTiltY;
widgetEvent->inputSource = ConvertStringToPointerType(aParam.mPointerType);
widgetEvent->isPrimary = aParam.mIsPrimary;
widgetEvent->buttons = aParam.mButtons;
@@ -121,17 +121,17 @@ int32_t
PointerEvent::PointerId()
{
return mEvent->AsPointerEvent()->pointerId;
}
int32_t
PointerEvent::Width()
{
- return mEvent->AsPointerEvent()->width;
+ return mEvent->AsPointerEvent()->mWidth;
}
int32_t
PointerEvent::Height()
{
return mEvent->AsPointerEvent()->height;
}
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7195,17 +7195,17 @@ DispatchPointerFromMouseOrTouch(PresShel
}
WidgetPointerEvent event(touchEvent->IsTrusted(), pointerMessage,
touchEvent->mWidget);
event.isPrimary = i == 0;
event.pointerId = touch->Identifier();
event.mRefPoint = touch->mRefPoint;
event.mModifiers = touchEvent->mModifiers;
- event.width = touch->RadiusX();
+ event.mWidth = touch->RadiusX();
event.height = touch->RadiusY();
event.tiltX = touch->tiltX;
event.tiltY = touch->tiltY;
event.mTime = touchEvent->mTime;
event.mTimeStamp = touchEvent->mTimeStamp;
event.mFlags = touchEvent->mFlags;
event.button = WidgetMouseEvent::eLeftButton;
event.buttons = WidgetMouseEvent::eLeftButtonFlag;
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -661,36 +661,36 @@ private:
******************************************************************************/
class WidgetPointerEvent : public WidgetMouseEvent
{
friend class mozilla::dom::PBrowserParent;
friend class mozilla::dom::PBrowserChild;
WidgetPointerEvent()
- : width(0)
+ : mWidth(0)
, height(0)
, isPrimary(true)
{
}
public:
virtual WidgetPointerEvent* AsPointerEvent() override { return this; }
WidgetPointerEvent(bool aIsTrusted, EventMessage aMsg, nsIWidget* w)
: WidgetMouseEvent(aIsTrusted, aMsg, w, ePointerEventClass, eReal)
- , width(0)
+ , mWidth(0)
, height(0)
, isPrimary(true)
{
}
explicit WidgetPointerEvent(const WidgetMouseEvent& aEvent)
: WidgetMouseEvent(aEvent)
- , width(0)
+ , mWidth(0)
, height(0)
, isPrimary(true)
{
mClass = ePointerEventClass;
}
virtual WidgetEvent* Duplicate() const override
{
@@ -699,27 +699,27 @@ public:
// Not copying widget, it is a weak reference.
WidgetPointerEvent* result =
new WidgetPointerEvent(false, mMessage, nullptr);
result->AssignPointerEventData(*this, true);
result->mFlags = mFlags;
return result;
}
- uint32_t width;
+ uint32_t mWidth;
uint32_t height;
bool isPrimary;
// XXX Not tested by test_assign_event_data.html
void AssignPointerEventData(const WidgetPointerEvent& aEvent,
bool aCopyTargets)
{
AssignMouseEventData(aEvent, aCopyTargets);
- width = aEvent.width;
+ mWidth = aEvent.mWidth;
height = aEvent.height;
isPrimary = aEvent.isPrimary;
}
};
} // namespace mozilla
#endif // mozilla_MouseEvents_h__
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -282,29 +282,29 @@ template<>
struct ParamTraits<mozilla::WidgetPointerEvent>
{
typedef mozilla::WidgetPointerEvent paramType;
static void Write(Message* aMsg, const paramType& aParam)
{
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEvent>(aParam));
WriteParam(aMsg, aParam.pointerId);
- WriteParam(aMsg, aParam.width);
+ WriteParam(aMsg, aParam.mWidth);
WriteParam(aMsg, aParam.height);
WriteParam(aMsg, aParam.tiltX);
WriteParam(aMsg, aParam.tiltY);
WriteParam(aMsg, aParam.isPrimary);
}
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
{
bool rv =
ReadParam(aMsg, aIter, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
ReadParam(aMsg, aIter, &aResult->pointerId) &&
- ReadParam(aMsg, aIter, &aResult->width) &&
+ ReadParam(aMsg, aIter, &aResult->mWidth) &&
ReadParam(aMsg, aIter, &aResult->height) &&
ReadParam(aMsg, aIter, &aResult->tiltX) &&
ReadParam(aMsg, aIter, &aResult->tiltY) &&
ReadParam(aMsg, aIter, &aResult->isPrimary);
return rv;
}
};