Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki

MozReview-Commit-ID: 7lBCEVkanvF

--HG--
extra : source : d629f018d02594951b7deccf1e1fce279d04694c
This commit is contained in:
Arata Furukawa 2016-03-28 13:29:42 +09:00
Родитель 03ccfe82a9
Коммит 676913b9bb
51 изменённых файлов: 89 добавлений и 89 удалений

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

@ -142,7 +142,7 @@ nsCoreUtils::DispatchMouseEvent(EventMessage aMessage, int32_t aX, int32_t aY,
event.clickCount = 1;
event.button = WidgetMouseEvent::eLeftButton;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
nsEventStatus status = nsEventStatus_eIgnore;
@ -159,7 +159,7 @@ nsCoreUtils::DispatchTouchEvent(EventMessage aMessage, int32_t aX, int32_t aY,
WidgetTouchEvent event(true, aMessage, aRootWidget);
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
// XXX: Touch has an identifier of -1 to hint that it is synthesized.
RefPtr<dom::Touch> t = new dom::Touch(-1, LayoutDeviceIntPoint(aX, aY),

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

@ -7699,7 +7699,7 @@ nsContentUtils::SendKeyEvent(nsIWidget* aWidget,
}
event.refPoint.x = event.refPoint.y = 0;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
if (!(aAdditionalFlags & nsIDOMWindowUtils::KEY_FLAG_NOT_SYNTHESIZED_FOR_TESTS)) {
event.mFlags.mIsSynthesizedForTests = true;
}
@ -7774,7 +7774,7 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
event.pressure = aPressure;
event.inputSource = aInputSourceArg;
event.clickCount = aClickCount;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aIsSynthesized;
nsPresContext* presContext = aPresShell->GetPresContext();

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

@ -682,7 +682,7 @@ nsDOMWindowUtils::SendPointerEventCommon(const nsAString& aType,
event.tiltY = aTiltY;
event.isPrimary = (nsIDOMMouseEvent::MOZ_SOURCE_MOUSE == aInputSourceArg) ? true : aIsPrimary;
event.clickCount = aClickCount;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aOptionalArgCount >= 10 ? aIsSynthesized : true;
nsPresContext* presContext = GetPresContext();
@ -807,7 +807,7 @@ nsDOMWindowUtils::SendWheelEvent(float aX,
wheelEvent.lineOrPageDeltaY = aLineOrPageDeltaY;
wheelEvent.widget = widget;
wheelEvent.time = PR_Now() / 1000;
wheelEvent.mTime = PR_Now() / 1000;
nsPresContext* presContext = GetPresContext();
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);
@ -939,7 +939,7 @@ nsDOMWindowUtils::SendTouchEventCommon(const nsAString& aType,
WidgetTouchEvent event(true, msg, widget);
event.modifiers = nsContentUtils::GetWidgetModifiers(aModifiers);
event.widget = widget;
event.time = PR_Now();
event.mTime = PR_Now();
nsPresContext* presContext = GetPresContext();
if (!presContext) {
@ -1296,7 +1296,7 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
event.direction = aDirection;
event.delta = aDelta;
event.clickCount = aClickCount;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
nsPresContext* presContext = GetPresContext();
if (!presContext)
@ -1802,7 +1802,7 @@ InitEvent(WidgetGUIEvent& aEvent, LayoutDeviceIntPoint* aPt = nullptr)
if (aPt) {
aEvent.refPoint = *aPt;
}
aEvent.time = PR_IntervalNow();
aEvent.mTime = PR_IntervalNow();
}
NS_IMETHODIMP

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

@ -3116,7 +3116,7 @@ nsGlobalWindow::PreHandleEvent(EventChainPreVisitor& aVisitor)
myCoord[0] = aVisitor.mEvent->refPoint.x;
myCoord[1] = aVisitor.mEvent->refPoint.y;
gEntropyCollector->RandomUpdate((void*)myCoord, sizeof(myCoord));
gEntropyCollector->RandomUpdate((void*)&(aVisitor.mEvent->time),
gEntropyCollector->RandomUpdate((void*)&(aVisitor.mEvent->mTime),
sizeof(uint32_t));
}
} else if (msg == eResize && aVisitor.mEvent->IsTrusted()) {

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

@ -22,7 +22,7 @@ AnimationEvent::AnimationEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -26,7 +26,7 @@ BeforeAfterKeyboardEvent::BeforeAfterKeyboardEvent(
if (!aEvent) {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -22,7 +22,7 @@ ClipboardEvent::ClipboardEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -18,7 +18,7 @@ CommandEvent::CommandEvent(EventTarget* aOwner,
aEvent ? aEvent :
new WidgetCommandEvent(false, nullptr, nullptr, nullptr))
{
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
if (aEvent) {
mEventIsInternal = false;
} else {

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

@ -25,7 +25,7 @@ CompositionEvent::CompositionEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
// XXX compositionstart is cancelable in draft of DOM3 Events.
// However, it doesn't make sence for us, we cannot cancel composition

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

@ -24,7 +24,7 @@ DragEvent::DragEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
mEvent->AsMouseEvent()->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
}

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

@ -107,7 +107,7 @@ Event::ConstructorInit(EventTarget* aOwner,
}
*/
mEvent = new WidgetEvent(false, eVoidEvent);
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
InitPresContextData(aPresContext);
@ -459,7 +459,7 @@ Event::GetCancelable(bool* aCancelable)
NS_IMETHODIMP
Event::GetTimeStamp(uint64_t* aTimeStamp)
{
*aTimeStamp = mEvent->time;
*aTimeStamp = mEvent->mTime;
return NS_OK;
}
@ -1064,7 +1064,7 @@ double
Event::TimeStamp() const
{
if (!sReturnHighResTimeStamp) {
return static_cast<double>(mEvent->time);
return static_cast<double>(mEvent->mTime);
}
if (mEvent->timeStamp.IsNull()) {

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

@ -2299,7 +2299,7 @@ EventStateManager::SendLineScrollEvent(nsIFrame* aTargetFrame,
event.mFlags.mDefaultPreventedByContent = aState.mDefaultPreventedByContent;
event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget;
event.time = aEvent->time;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
@ -2339,7 +2339,7 @@ EventStateManager::SendPixelScrollEvent(nsIFrame* aTargetFrame,
event.mFlags.mDefaultPreventedByContent = aState.mDefaultPreventedByContent;
event.refPoint = aEvent->refPoint;
event.widget = aEvent->widget;
event.time = aEvent->time;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
@ -4643,7 +4643,7 @@ EventStateManager::CheckForAndDispatchClick(WidgetMouseEvent* aEvent,
event.clickCount = aEvent->clickCount;
event.modifiers = aEvent->modifiers;
event.buttons = aEvent->buttons;
event.time = aEvent->time;
event.mTime = aEvent->mTime;
event.timeStamp = aEvent->timeStamp;
event.mFlags.mNoContentDispatch = notDispatchToContents;
event.button = aEvent->button;

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

@ -23,7 +23,7 @@ FocusEvent::FocusEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -25,7 +25,7 @@ InputEvent::InputEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -25,7 +25,7 @@ KeyboardEvent::KeyboardEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->AsKeyboardEvent()->mKeyNameIndex = KEY_NAME_INDEX_USE_STRING;
}
}

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

@ -31,7 +31,7 @@ MouseEvent::MouseEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
}

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

@ -23,7 +23,7 @@ MouseScrollEvent::MouseScrollEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
static_cast<WidgetMouseEventBase*>(mEvent)->inputSource =
nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;

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

@ -28,7 +28,7 @@ PointerEvent::PointerEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
}

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

@ -26,7 +26,7 @@ SimpleGestureEvent::SimpleGestureEvent(EventTarget* aOwner,
mEventIsInternal = false;
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
static_cast<WidgetMouseEventBase*>(mEvent)->inputSource =
nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;

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

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

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

@ -75,7 +75,7 @@ TouchEvent::TouchEvent(EventTarget* aOwner,
}
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -22,7 +22,7 @@ TransitionEvent::TransitionEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -42,7 +42,7 @@ UIEvent::UIEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
// Fill mDetail and mView according to the mEvent (widget-generated

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

@ -30,7 +30,7 @@ WheelEvent::WheelEvent(EventTarget* aOwner,
}
} else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
mEvent->refPoint.x = mEvent->refPoint.y = 0;
mEvent->AsWheelEvent()->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
}

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

@ -22,7 +22,7 @@ XULCommandEvent::XULCommandEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
}

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

@ -2759,7 +2759,7 @@ TabParent::InjectTouchEvent(const nsAString& aType,
WidgetTouchEvent event(true, msg, widget);
event.modifiers = aModifiers;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
nsCOMPtr<nsIContent> content = do_QueryInterface(mFrameElement);
if (!content || !content->OwnerDoc()) {

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

@ -2583,7 +2583,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
event.type = anEvent.mMessage == eMouseOver ?
EnterNotify : LeaveNotify;
event.root = root;
event.time = anEvent.time;
event.time = anEvent.mTime;
event.x = pluginPoint.x;
event.y = pluginPoint.y;
event.x_root = rootPoint.x;
@ -2602,7 +2602,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
XMotionEvent& event = pluginEvent.xmotion;
event.type = MotionNotify;
event.root = root;
event.time = anEvent.time;
event.time = anEvent.mTime;
event.x = pluginPoint.x;
event.y = pluginPoint.y;
event.x_root = rootPoint.x;
@ -2621,7 +2621,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
event.type = anEvent.mMessage == eMouseDown ?
ButtonPress : ButtonRelease;
event.root = root;
event.time = anEvent.time;
event.time = anEvent.mTime;
event.x = pluginPoint.x;
event.y = pluginPoint.y;
event.x_root = rootPoint.x;
@ -2658,7 +2658,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
XKeyEvent &event = pluginEvent.xkey;
#ifdef MOZ_WIDGET_GTK
event.root = GDK_ROOT_WINDOW();
event.time = anEvent.time;
event.time = anEvent.mTime;
const GdkEventKey* gdkEvent =
static_cast<const GdkEventKey*>(anEvent.mPluginEvent);
event.keycode = gdkEvent->hardware_keycode;

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

@ -40,7 +40,7 @@ SVGZoomEvent::SVGZoomEvent(EventTarget* aOwner,
}
else {
mEventIsInternal = true;
mEvent->time = PR_Now();
mEvent->mTime = PR_Now();
}
// We must store the "Previous" and "New" values before this event is

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

@ -1784,7 +1784,7 @@ public:
// Even if the change is caused by untrusted event, we need to dispatch
// trusted input event since it's a fact.
InternalEditorInputEvent inputEvent(true, eEditorInput, widget);
inputEvent.time = static_cast<uint64_t>(PR_Now() / 1000);
inputEvent.mTime = static_cast<uint64_t>(PR_Now() / 1000);
inputEvent.mIsComposing = mIsComposing;
nsEventStatus status = nsEventStatus_eIgnore;
nsresult rv =

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

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

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

@ -574,7 +574,7 @@ APZCCallbackHelper::DispatchSynthesizedMouseEvent(EventMessage aMsg,
WidgetMouseEvent event(true, aMsg, nullptr,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
event.refPoint = LayoutDeviceIntPoint(aRefPoint.x, aRefPoint.y);
event.time = aTime;
event.mTime = aTime;
event.button = WidgetMouseEvent::eLeftButton;
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
event.ignoreRootScrollFrame = true;

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

@ -66,7 +66,7 @@ EvictTouchPoint(RefPtr<dom::Touch>& aTouch,
if (widget) {
WidgetTouchEvent event(true, eTouchEnd, widget);
event.widget = widget;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.touches.AppendElement(aTouch);
nsEventStatus status;
widget->DispatchEvent(&event, status);

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

@ -5510,7 +5510,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
WidgetMouseEvent event(true, eMouseMove, view->GetWidget(),
WidgetMouseEvent::eSynthesized);
event.refPoint = LayoutDeviceIntPoint::FromAppUnitsToNearest(refpoint, viewAPD);
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
// XXX set event.modifiers ?
// XXX mnakano I think that we should get the latest information from widget.
@ -6884,7 +6884,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
event.height = touch->RadiusY();
event.tiltX = touch->tiltX;
event.tiltY = touch->tiltY;
event.time = touchEvent->time;
event.mTime = touchEvent->mTime;
event.timeStamp = touchEvent->timeStamp;
event.mFlags = touchEvent->mFlags;
event.button = WidgetMouseEvent::eLeftButton;

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

@ -2303,7 +2303,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
// string we will use to find options and start searching at the current
// keystroke. Otherwise, Truncate the string if it's been a long time
// since our last keypress.
if (keyEvent->time - gLastKeyTime > INCREMENTAL_SEARCH_KEYPRESS_TIME) {
if (keyEvent->mTime - gLastKeyTime > INCREMENTAL_SEARCH_KEYPRESS_TIME) {
// If this is ' ' and we are at the beginning of the string, treat it as
// "select this option" (bug 191543)
if (keyEvent->charCode == ' ') {
@ -2318,7 +2318,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
GetIncrementalString().Truncate();
}
gLastKeyTime = keyEvent->time;
gLastKeyTime = keyEvent->mTime;
// Append this keystroke to the search string.
char16_t uniChar = ToLowerCase(static_cast<char16_t>(keyEvent->charCode));

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

@ -233,27 +233,27 @@ class WidgetEventTime
public:
// Elapsed time, in milliseconds, from a platform-specific zero time
// to the time the message was created
uint64_t time;
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;
WidgetEventTime()
: time(0)
: mTime(0)
, timeStamp(TimeStamp::Now())
{
}
WidgetEventTime(uint64_t aTime,
TimeStamp aTimeStamp)
: time(aTime)
: mTime(aTime)
, timeStamp(aTimeStamp)
{
}
void AssignEventTime(const WidgetEventTime& aOther)
{
time = aOther.time;
mTime = aOther.mTime;
timeStamp = aOther.timeStamp;
}
};

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

@ -29,7 +29,7 @@ already_AddRefed<Touch> SingleTouchData::ToNewDOMTouch() const
}
MouseInput::MouseInput(const WidgetMouseEventBase& aMouseEvent)
: InputData(MOUSE_INPUT, aMouseEvent.time, aMouseEvent.timeStamp,
: InputData(MOUSE_INPUT, aMouseEvent.mTime, aMouseEvent.timeStamp,
aMouseEvent.modifiers)
, mType(MOUSE_NONE)
, mButtonType(NONE)
@ -156,7 +156,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
event.buttons = mButtons;
event.modifiers = modifiers;
event.time = mTime;
event.mTime = mTime;
event.timeStamp = mTimeStamp;
event.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
@ -169,7 +169,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
}
MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
: InputData(MULTITOUCH_INPUT, aTouchEvent.time, aTouchEvent.timeStamp,
: InputData(MULTITOUCH_INPUT, aTouchEvent.mTime, aTouchEvent.timeStamp,
aTouchEvent.modifiers)
, mHandledByAPZ(aTouchEvent.mFlags.mHandledByAPZ)
{
@ -246,7 +246,7 @@ MultiTouchInput::ToWidgetTouchEvent(nsIWidget* aWidget) const
}
event.modifiers = this->modifiers;
event.time = this->mTime;
event.mTime = this->mTime;
event.timeStamp = this->mTimeStamp;
event.mFlags.mHandledByAPZ = mHandledByAPZ;
@ -287,7 +287,7 @@ MultiTouchInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
event.refPoint.x = firstTouch.mScreenPoint.x;
event.refPoint.y = firstTouch.mScreenPoint.y;
event.time = mTime;
event.mTime = mTime;
event.button = WidgetMouseEvent::eLeftButton;
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
event.modifiers = modifiers;
@ -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.time, aMouseEvent.timeStamp,
: InputData(MULTITOUCH_INPUT, aMouseEvent.mTime, aMouseEvent.timeStamp,
aMouseEvent.modifiers)
, mHandledByAPZ(aMouseEvent.mFlags.mHandledByAPZ)
{
@ -385,7 +385,7 @@ PanGestureInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
{
WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
wheelEvent.modifiers = this->modifiers;
wheelEvent.time = mTime;
wheelEvent.mTime = mTime;
wheelEvent.timeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
@ -457,7 +457,7 @@ DeltaModeForDeltaType(ScrollWheelInput::ScrollDeltaType aDeltaType)
ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent)
: InputData(SCROLLWHEEL_INPUT,
aWheelEvent.time,
aWheelEvent.mTime,
aWheelEvent.timeStamp,
aWheelEvent.modifiers)
, mDeltaType(DeltaTypeForDeltaMode(aWheelEvent.deltaMode))
@ -485,7 +485,7 @@ ScrollWheelInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
{
WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
wheelEvent.modifiers = this->modifiers;
wheelEvent.time = mTime;
wheelEvent.mTime = mTime;
wheelEvent.timeStamp = mTimeStamp;
wheelEvent.refPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,

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

@ -302,7 +302,7 @@ PuppetWidget::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
// use the point override if provided
event.refPoint = *aPoint;
}
event.time = PR_Now() / 1000;
event.mTime = PR_Now() / 1000;
}
NS_IMETHODIMP

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

@ -152,7 +152,7 @@ TextEventDispatcher::GetState() const
void
TextEventDispatcher::InitEvent(WidgetGUIEvent& aEvent) const
{
aEvent.time = PR_IntervalNow();
aEvent.mTime = PR_IntervalNow();
aEvent.refPoint = LayoutDeviceIntPoint(0, 0);
aEvent.mFlags.mIsSynthesizedForTests = IsForTests();
if (aEvent.mClass != eCompositionEventClass) {

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

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

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

@ -608,7 +608,7 @@ AndroidGeckoEvent::MakeTouchEvent(nsIWidget* widget)
}
event.modifiers = DOMModifiers();
event.time = Time();
event.mTime = Time();
const LayoutDeviceIntPoint& offset = widget->WidgetToScreenOffset();
event.touches.SetCapacity(endIndex - startIndex);
@ -728,7 +728,7 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
event.clickCount = 1;
}
event.modifiers = DOMModifiers();
event.time = Time();
event.mTime = Time();
// We are dispatching this event directly into Gecko (as opposed to going
// through the AsyncPanZoomController), and the Points() array has points

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

@ -1857,7 +1857,7 @@ nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
event.refPoint.y = 0;
}
event.time = PR_Now() / 1000;
event.mTime = PR_Now() / 1000;
}
void
@ -1981,7 +1981,7 @@ nsWindow::OnLongTapEvent(AndroidGeckoEvent *ae)
event.refPoint =
RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
event.clickCount = 1;
event.time = ae->Time();
event.mTime = ae->Time();
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
event.ignoreRootScrollFrame = true;
@ -2117,7 +2117,7 @@ nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
event.direction = 0;
event.delta = delta;
event.modifiers = 0;
event.time = ae->Time();
event.mTime = ae->Time();
event.refPoint = pt;
DispatchEvent(&event);
@ -2488,7 +2488,7 @@ InitKeyEvent(WidgetKeyboardEvent& event,
event.location =
WidgetKeyboardEvent::ComputeLocationFromCodeValue(event.mCodeNameIndex);
event.time = time;
event.mTime = time;
}
void

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

@ -3508,7 +3508,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
nsEventStatus status = nsEventStatus_eIgnore;
WidgetGUIEvent focusGuiEvent(true, eventMessage, mGeckoChild);
focusGuiEvent.time = PR_IntervalNow();
focusGuiEvent.mTime = PR_IntervalNow();
mGeckoChild->DispatchEvent(&focusGuiEvent, status);
}

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

@ -609,7 +609,7 @@ nsCocoaUtils::InitInputEvent(WidgetInputEvent& aInputEvent,
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
aInputEvent.modifiers = ModifiersForEvent(aNativeEvent);
aInputEvent.time = PR_IntervalNow();
aInputEvent.mTime = PR_IntervalNow();
NS_OBJC_END_TRY_ABORT_BLOCK;
}

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

@ -315,7 +315,7 @@ KeyEventDispatcher::DispatchKeyEventInternal(EventMessage aEventMessage)
event.mCodeNameIndex = mDOMCodeNameIndex;
event.modifiers = getDOMModifiers(mData.metaState);
event.location = mDOMKeyLocation;
event.time = mData.timeMs;
event.mTime = mData.timeMs;
return nsWindow::DispatchKeyInput(event);
}

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

@ -2249,7 +2249,7 @@ IMContextWrapper::DeleteText(GtkIMContext* aContext,
void
IMContextWrapper::InitEvent(WidgetGUIEvent& aEvent)
{
aEvent.time = PR_Now() / 1000;
aEvent.mTime = PR_Now() / 1000;
}
bool

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

@ -1000,7 +1000,7 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent,
// event callback) to give plugins access to hardware_keycode and state.
// (An XEvent would be nice but the GdkEvent is good enough.)
aKeyEvent.mPluginEvent.Copy(*aGdkKeyEvent);
aKeyEvent.time = aGdkKeyEvent->time;
aKeyEvent.mTime = aGdkKeyEvent->time;
aKeyEvent.mNativeKeyEvent = static_cast<void*>(aGdkKeyEvent);
aKeyEvent.mIsRepeat = sRepeatState == REPEATING &&
aGdkKeyEvent->hardware_keycode == sLastRepeatableHardwareKeyCode;

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

@ -3440,7 +3440,7 @@ nsWindow::OnTouchEvent(GdkEventTouch* aEvent)
WidgetTouchEvent event(true, msg, this);
KeymapWrapper::InitInputEvent(event, aEvent->state);
event.time = aEvent->time;
event.mTime = aEvent->time;
if (aEvent->type == GDK_TOUCH_BEGIN || aEvent->type == GDK_TOUCH_UPDATE) {
mTouches.Put(aEvent->sequence, touch.forget());
@ -6589,7 +6589,7 @@ nsWindow::BeginMoveDrag(WidgetMouseEvent* aEvent)
screenX = DevicePixelsToGdkCoordRoundDown(screenX);
screenY = DevicePixelsToGdkCoordRoundDown(screenY);
gdk_window_begin_move_drag(gdk_window, button, screenX, screenY,
aEvent->time);
aEvent->mTime);
return NS_OK;
}
@ -6643,7 +6643,7 @@ nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent,
// tell the window manager to start the resize
gdk_window_begin_resize_drag(gdk_window, window_edge, button,
screenX, screenY, aEvent->time);
screenX, screenY, aEvent->mTime);
return NS_OK;
}

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

@ -69,7 +69,7 @@ struct ParamTraits<mozilla::WidgetEvent>
static_cast<mozilla::EventClassIDType>(aParam.mClass));
WriteParam(aMsg, aParam.mMessage);
WriteParam(aMsg, aParam.refPoint);
WriteParam(aMsg, aParam.time);
WriteParam(aMsg, aParam.mTime);
WriteParam(aMsg, aParam.timeStamp);
WriteParam(aMsg, aParam.mFlags);
}
@ -80,7 +80,7 @@ struct ParamTraits<mozilla::WidgetEvent>
bool ret = ReadParam(aMsg, aIter, &eventClassID) &&
ReadParam(aMsg, aIter, &aResult->mMessage) &&
ReadParam(aMsg, aIter, &aResult->refPoint) &&
ReadParam(aMsg, aIter, &aResult->time) &&
ReadParam(aMsg, aIter, &aResult->mTime) &&
ReadParam(aMsg, aIter, &aResult->timeStamp) &&
ReadParam(aMsg, aIter, &aResult->mFlags);
aResult->mClass = static_cast<mozilla::EventClassID>(eventClassID);

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

@ -1106,7 +1106,7 @@ InitKeyEvent(WidgetKeyboardEvent& aEvent, QKeyEvent* aQEvent)
aEvent.mIsRepeat =
(aEvent.mMessage == eKeyDown || aEvent.mMessage == eKeyPress) &&
aQEvent->isAutoRepeat();
aEvent.time = 0;
aEvent.mTime = 0;
if (sAltGrModifier) {
aEvent.modifiers |= (MODIFIER_CONTROL | MODIFIER_ALT);
@ -1294,7 +1294,7 @@ nsWindow::wheelEvent(QWheelEvent* aEvent)
aEvent->modifiers() & Qt::AltModifier,
aEvent->modifiers() & Qt::ShiftModifier,
aEvent->modifiers() & Qt::MetaModifier);
wheelEvent.time = 0;
wheelEvent.mTime = 0;
return DispatchEvent(&wheelEvent);
}

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

@ -146,7 +146,7 @@ private:
event.refPoint = aPoint;
event.clickCount = 1;
event.button = WidgetMouseEvent::eLeftButton;
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
nsEventStatus status;
@ -169,7 +169,7 @@ private:
WidgetTouchEvent event(true, aType, aWindow);
//XXX: I think nativeEvent.timestamp * 1000 is probably usable here but
// I don't care that much right now.
event.time = PR_IntervalNow();
event.mTime = PR_IntervalNow();
event.touches.SetCapacity(aTouches.count);
for (UITouch* touch in aTouches) {
LayoutDeviceIntPoint loc = UIKitPointsToDevPixels([touch locationInView:self], [self contentScaleFactor]);

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

@ -6513,8 +6513,8 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
modifierKeyState.InitInputEvent(wheelEvent);
wheelEvent.button = 0;
wheelEvent.time = ::GetMessageTime();
wheelEvent.timeStamp = GetMessageTimeStamp(wheelEvent.time);
wheelEvent.mTime = ::GetMessageTime();
wheelEvent.timeStamp = GetMessageTimeStamp(wheelEvent.mTime);
wheelEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
bool endFeedback = true;
@ -6550,8 +6550,8 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam)
ModifierKeyState modifierKeyState;
modifierKeyState.InitInputEvent(event);
event.button = 0;
event.time = ::GetMessageTime();
event.timeStamp = GetMessageTimeStamp(event.time);
event.mTime = ::GetMessageTime();
event.timeStamp = GetMessageTimeStamp(event.mTime);
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
nsEventStatus status;