Bug 1259655 - part 2 Rename WidgetEventTime::timeStamp to WidgetEventTime::mTimeStamp r=masayuki

MozReview-Commit-ID: LRgPxoynx0

--HG--
extra : source : 506d58da4e67501a00b676c99997597fa5fe5679
This commit is contained in:
Arata Furukawa 2016-03-28 13:49:02 +09:00
Родитель 676913b9bb
Коммит 28360f6c90
11 изменённых файлов: 29 добавлений и 29 удалений

Просмотреть файл

@ -1067,7 +1067,7 @@ Event::TimeStamp() const
return static_cast<double>(mEvent->mTime);
}
if (mEvent->timeStamp.IsNull()) {
if (mEvent->mTimeStamp.IsNull()) {
return 0.0;
}
@ -1085,7 +1085,7 @@ Event::TimeStamp() const
return 0.0;
}
return perf->GetDOMTiming()->TimeStampToDOMHighRes(mEvent->timeStamp);
return perf->GetDOMTiming()->TimeStampToDOMHighRes(mEvent->mTimeStamp);
}
// For dedicated workers, we should make times relative to the navigation
@ -1096,7 +1096,7 @@ Event::TimeStamp() const
MOZ_ASSERT(workerPrivate);
TimeDuration duration =
mEvent->timeStamp - workerPrivate->NowBaseTimeStamp();
mEvent->mTimeStamp - workerPrivate->NowBaseTimeStamp();
return duration.ToMilliseconds();
}

Просмотреть файл

@ -2300,7 +2300,7 @@ EventStateManager::SendLineScrollEvent(nsIFrame* aTargetFrame,
event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.mTimeStamp = aEvent->mTimeStamp;
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
event.isHorizontal = (aDeltaDirection == DELTA_DIRECTION_X);
@ -2340,7 +2340,7 @@ EventStateManager::SendPixelScrollEvent(nsIFrame* aTargetFrame,
event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.mTimeStamp = aEvent->mTimeStamp;
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
event.isHorizontal = (aDeltaDirection == DELTA_DIRECTION_X);
@ -4644,7 +4644,7 @@ EventStateManager::CheckForAndDispatchClick(WidgetMouseEvent* aEvent,
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.mTimeStamp = aEvent->mTimeStamp;
event.mFlags.mNoContentDispatch = notDispatchToContents;
event.button = aEvent->button;
event.inputSource = aEvent->inputSource;

Просмотреть файл

@ -121,7 +121,7 @@ TextComposition::CloneAndDispatchAs(
WidgetCompositionEvent compositionEvent(aCompositionEvent->IsTrusted(),
aMessage, aCompositionEvent->widget);
compositionEvent.mTime = aCompositionEvent->mTime;
compositionEvent.timeStamp = aCompositionEvent->timeStamp;
compositionEvent.mTimeStamp = aCompositionEvent->mTimeStamp;
compositionEvent.mData = aCompositionEvent->mData;
compositionEvent.mNativeIMEContext = aCompositionEvent->mNativeIMEContext;
compositionEvent.mOriginalMessage = aCompositionEvent->mMessage;

Просмотреть файл

@ -1093,7 +1093,7 @@ APZCTreeManager::ProcessWheelEvent(WidgetWheelEvent& aEvent,
}
ScreenPoint origin(aEvent.refPoint.x, aEvent.refPoint.y);
ScrollWheelInput input(aEvent.mTime, aEvent.timeStamp, 0,
ScrollWheelInput input(aEvent.mTime, aEvent.mTimeStamp, 0,
scrollMode,
ScrollWheelInput::DeltaTypeForDeltaMode(aEvent.deltaMode),
origin,

Просмотреть файл

@ -6885,7 +6885,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
event.tiltX = touch->tiltX;
event.tiltY = touch->tiltY;
event.mTime = touchEvent->mTime;
event.timeStamp = touchEvent->timeStamp;
event.mTimeStamp = touchEvent->mTimeStamp;
event.mFlags = touchEvent->mFlags;
event.button = WidgetMouseEvent::eLeftButton;
event.buttons = WidgetMouseEvent::eLeftButtonFlag;
@ -8144,9 +8144,9 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent,
}
if (Telemetry::CanRecordBase() &&
!aEvent->timeStamp.IsNull() &&
!aEvent->mTimeStamp.IsNull() &&
aEvent->AsInputEvent()) {
double millis = (TimeStamp::Now() - aEvent->timeStamp).ToMilliseconds();
double millis = (TimeStamp::Now() - aEvent->mTimeStamp).ToMilliseconds();
Telemetry::Accumulate(Telemetry::INPUT_EVENT_RESPONSE_MS, millis);
}

Просмотреть файл

@ -236,25 +236,25 @@ public:
uint64_t mTime;
// Timestamp when the message was created. Set in parallel to 'time' until we
// determine if it is safe to drop 'time' (see bug 77992).
TimeStamp timeStamp;
TimeStamp mTimeStamp;
WidgetEventTime()
: mTime(0)
, timeStamp(TimeStamp::Now())
, mTimeStamp(TimeStamp::Now())
{
}
WidgetEventTime(uint64_t aTime,
TimeStamp aTimeStamp)
: mTime(aTime)
, timeStamp(aTimeStamp)
, mTimeStamp(aTimeStamp)
{
}
void AssignEventTime(const WidgetEventTime& aOther)
{
mTime = aOther.mTime;
timeStamp = aOther.timeStamp;
mTimeStamp = aOther.mTimeStamp;
}
};

Просмотреть файл

@ -29,7 +29,7 @@ already_AddRefed<Touch> SingleTouchData::ToNewDOMTouch() const
}
MouseInput::MouseInput(const WidgetMouseEventBase& aMouseEvent)
: InputData(MOUSE_INPUT, aMouseEvent.mTime, aMouseEvent.timeStamp,
: InputData(MOUSE_INPUT, aMouseEvent.mTime, aMouseEvent.mTimeStamp,
aMouseEvent.modifiers)
, mType(MOUSE_NONE)
, mButtonType(NONE)
@ -157,7 +157,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
event.buttons = mButtons;
event.modifiers = modifiers;
event.mTime = mTime;
event.timeStamp = mTimeStamp;
event.mTimeStamp = mTimeStamp;
event.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
@ -169,7 +169,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
}
MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
: InputData(MULTITOUCH_INPUT, aTouchEvent.mTime, aTouchEvent.timeStamp,
: InputData(MULTITOUCH_INPUT, aTouchEvent.mTime, aTouchEvent.mTimeStamp,
aTouchEvent.modifiers)
, mHandledByAPZ(aTouchEvent.mFlags.mHandledByAPZ)
{
@ -247,7 +247,7 @@ MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
event.modifiers = this->modifiers;
event.mTime = this->mTime;
event.timeStamp = this->mTimeStamp;
event.mTimeStamp = this->mTimeStamp;
event.mFlags.mHandledByAPZ = mHandledByAPZ;
for (size_t i = 0; i < mTouches.Length(); i++) {
@ -318,7 +318,7 @@ MultiTouchInput::IndexOfTouch(int32_t aTouchIdentifier)
// SingleTouchData. It also sends garbage for the identifier, radius, force
// and rotation angle.
MultiTouchInput::MultiTouchInput(const WidgetMouseEvent& aMouseEvent)
: InputData(MULTITOUCH_INPUT, aMouseEvent.mTime, aMouseEvent.timeStamp,
: InputData(MULTITOUCH_INPUT, aMouseEvent.mTime, aMouseEvent.mTimeStamp,
aMouseEvent.modifiers)
, mHandledByAPZ(aMouseEvent.mFlags.mHandledByAPZ)
{
@ -386,7 +386,7 @@ PanGestureInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
wheelEvent.modifiers = this->modifiers;
wheelEvent.mTime = mTime;
wheelEvent.timeStamp = mTimeStamp;
wheelEvent.mTimeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
@ -458,7 +458,7 @@ DeltaModeForDeltaType(ScrollWheelInput::ScrollDeltaType aDeltaType)
ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent)
: InputData(SCROLLWHEEL_INPUT,
aWheelEvent.mTime,
aWheelEvent.timeStamp,
aWheelEvent.mTimeStamp,
aWheelEvent.modifiers)
, mDeltaType(DeltaTypeForDeltaMode(aWheelEvent.deltaMode))
, mScrollMode(SCROLLMODE_INSTANT)
@ -486,7 +486,7 @@ ScrollWheelInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
wheelEvent.modifiers = this->modifiers;
wheelEvent.mTime = mTime;
wheelEvent.timeStamp = mTimeStamp;
wheelEvent.mTimeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));

Просмотреть файл

@ -173,7 +173,7 @@ public:
MOZ_COUNT_CTOR(WidgetTouchEvent);
modifiers = aOther.modifiers;
mTime = aOther.mTime;
timeStamp = aOther.timeStamp;
mTimeStamp = aOther.mTimeStamp;
touches.AppendElements(aOther.touches);
mFlags.mCancelable = mMessage != eTouchCancel;
mFlags.mHandledByAPZ = aOther.mFlags.mHandledByAPZ;

Просмотреть файл

@ -200,7 +200,7 @@ SwipeTracker::CreateSwipeGestureEvent(EventMessage aMsg, nsIWidget* aWidget,
{
WidgetSimpleGestureEvent geckoEvent(true, aMsg, aWidget);
geckoEvent.modifiers = 0;
geckoEvent.timeStamp = TimeStamp::Now();
geckoEvent.mTimeStamp = TimeStamp::Now();
geckoEvent.refPoint = aPosition;
geckoEvent.buttons = 0;
return geckoEvent;

Просмотреть файл

@ -70,7 +70,7 @@ struct ParamTraits<mozilla::WidgetEvent>
WriteParam(aMsg, aParam.mMessage);
WriteParam(aMsg, aParam.refPoint);
WriteParam(aMsg, aParam.mTime);
WriteParam(aMsg, aParam.timeStamp);
WriteParam(aMsg, aParam.mTimeStamp);
WriteParam(aMsg, aParam.mFlags);
}
@ -81,7 +81,7 @@ struct ParamTraits<mozilla::WidgetEvent>
ReadParam(aMsg, aIter, &aResult->mMessage) &&
ReadParam(aMsg, aIter, &aResult->refPoint) &&
ReadParam(aMsg, aIter, &aResult->mTime) &&
ReadParam(aMsg, aIter, &aResult->timeStamp) &&
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
ReadParam(aMsg, aIter, &aResult->mFlags);
aResult->mClass = static_cast<mozilla::EventClassID>(eventClassID);
return ret;

Просмотреть файл

@ -6514,7 +6514,7 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
wheelEvent.button = 0;
wheelEvent.mTime = ::GetMessageTime();
wheelEvent.timeStamp = GetMessageTimeStamp(wheelEvent.mTime);
wheelEvent.mTimeStamp = GetMessageTimeStamp(wheelEvent.mTime);
wheelEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
bool endFeedback = true;
@ -6551,7 +6551,7 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
modifierKeyState.InitInputEvent(event);
event.button = 0;
event.mTime = ::GetMessageTime();
event.timeStamp = GetMessageTimeStamp(event.mTime);
event.mTimeStamp = GetMessageTimeStamp(event.mTime);
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
nsEventStatus status;