зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug
MozReview-Commit-ID: ESWM5ZyBpSR --HG-- extra : rebase_source : c5e1e3f60bcdde2a7f6c399e72430b29a3e552cd
This commit is contained in:
Родитель
d2514c163c
Коммит
cbe8f5268a
|
@ -138,7 +138,7 @@ nsCoreUtils::DispatchMouseEvent(EventMessage aMessage, int32_t aX, int32_t aY,
|
|||
WidgetMouseEvent event(true, aMessage, aRootWidget,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
|
||||
event.refPoint = LayoutDeviceIntPoint(aX, aY);
|
||||
event.mRefPoint = LayoutDeviceIntPoint(aX, aY);
|
||||
|
||||
event.clickCount = 1;
|
||||
event.button = WidgetMouseEvent::eLeftButton;
|
||||
|
|
|
@ -539,7 +539,7 @@ Accessible::ChildAtPoint(int32_t aX, int32_t aY,
|
|||
|
||||
WidgetMouseEvent dummyEvent(true, eMouseMove, rootWidget,
|
||||
WidgetMouseEvent::eSynthesized);
|
||||
dummyEvent.refPoint = LayoutDeviceIntPoint(aX - rootRect.x, aY - rootRect.y);
|
||||
dummyEvent.mRefPoint = LayoutDeviceIntPoint(aX - rootRect.x, aY - rootRect.y);
|
||||
|
||||
nsIFrame* popupFrame = nsLayoutUtils::
|
||||
GetPopupFrameForEventCoordinates(accDocument->PresContext()->GetRootPresContext(),
|
||||
|
|
|
@ -2083,7 +2083,7 @@ Element::DispatchClickEvent(nsPresContext* aPresContext,
|
|||
|
||||
WidgetMouseEvent event(aSourceEvent->IsTrusted(), eMouseClick,
|
||||
aSourceEvent->mWidget, WidgetMouseEvent::eReal);
|
||||
event.refPoint = aSourceEvent->refPoint;
|
||||
event.mRefPoint = aSourceEvent->mRefPoint;
|
||||
uint32_t clickCount = 1;
|
||||
float pressure = 0;
|
||||
uint16_t inputSource = 0;
|
||||
|
|
|
@ -7726,7 +7726,7 @@ nsContentUtils::SendKeyEvent(nsIWidget* aWidget,
|
|||
break;
|
||||
}
|
||||
|
||||
event.refPoint.x = event.refPoint.y = 0;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
event.mTime = PR_IntervalNow();
|
||||
if (!(aAdditionalFlags & nsIDOMWindowUtils::KEY_FLAG_NOT_SYNTHESIZED_FOR_TESTS)) {
|
||||
event.mFlags.mIsSynthesizedForTests = true;
|
||||
|
@ -7808,7 +7808,7 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
|
|||
if (!presContext)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
event.refPoint = ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
event.mRefPoint = ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
event.ignoreRootScrollFrame = aIgnoreRootScrollFrame;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
|
|
@ -689,7 +689,8 @@ nsDOMWindowUtils::SendPointerEventCommon(const nsAString& aType,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
event.refPoint = nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
event.mRefPoint =
|
||||
nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
event.ignoreRootScrollFrame = aIgnoreRootScrollFrame;
|
||||
|
||||
nsEventStatus status;
|
||||
|
@ -810,7 +811,8 @@ nsDOMWindowUtils::SendWheelEvent(float aX,
|
|||
nsPresContext* presContext = GetPresContext();
|
||||
NS_ENSURE_TRUE(presContext, NS_ERROR_FAILURE);
|
||||
|
||||
wheelEvent.refPoint = nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
wheelEvent.mRefPoint =
|
||||
nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
|
||||
widget->DispatchInputEvent(&wheelEvent);
|
||||
|
||||
|
@ -1299,7 +1301,8 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
|
|||
if (!presContext)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
event.refPoint = nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
event.mRefPoint =
|
||||
nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
|
||||
|
||||
nsEventStatus status;
|
||||
return widget->DispatchEvent(&event, status);
|
||||
|
@ -1797,7 +1800,7 @@ static void
|
|||
InitEvent(WidgetGUIEvent& aEvent, LayoutDeviceIntPoint* aPt = nullptr)
|
||||
{
|
||||
if (aPt) {
|
||||
aEvent.refPoint = *aPt;
|
||||
aEvent.mRefPoint = *aPt;
|
||||
}
|
||||
aEvent.mTime = PR_IntervalNow();
|
||||
}
|
||||
|
|
|
@ -3113,8 +3113,8 @@ nsGlobalWindow::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
|||
//let's only take the lowest half of the point structure.
|
||||
int16_t myCoord[2];
|
||||
|
||||
myCoord[0] = aVisitor.mEvent->refPoint.x;
|
||||
myCoord[1] = aVisitor.mEvent->refPoint.y;
|
||||
myCoord[0] = aVisitor.mEvent->mRefPoint.x;
|
||||
myCoord[1] = aVisitor.mEvent->mRefPoint.y;
|
||||
gEntropyCollector->RandomUpdate((void*)myCoord, sizeof(myCoord));
|
||||
gEntropyCollector->RandomUpdate((void*)&(aVisitor.mEvent->mTime),
|
||||
sizeof(uint32_t));
|
||||
|
|
|
@ -1547,9 +1547,9 @@ ContentEventHandler::OnQueryCharacterAtPoint(WidgetQueryContentEvent* aEvent)
|
|||
WidgetQueryContentEvent eventOnRoot(true, eQueryCharacterAtPoint,
|
||||
rootWidget);
|
||||
eventOnRoot.mUseNativeLineBreak = aEvent->mUseNativeLineBreak;
|
||||
eventOnRoot.refPoint = aEvent->refPoint;
|
||||
eventOnRoot.mRefPoint = aEvent->mRefPoint;
|
||||
if (rootWidget != aEvent->mWidget) {
|
||||
eventOnRoot.refPoint += aEvent->mWidget->WidgetToScreenOffset() -
|
||||
eventOnRoot.mRefPoint += aEvent->mWidget->WidgetToScreenOffset() -
|
||||
rootWidget->WidgetToScreenOffset();
|
||||
}
|
||||
nsPoint ptInRoot =
|
||||
|
@ -1645,7 +1645,7 @@ ContentEventHandler::OnQueryDOMWidgetHittest(WidgetQueryContentEvent* aEvent)
|
|||
NS_ENSURE_TRUE(docFrame, NS_ERROR_FAILURE);
|
||||
|
||||
LayoutDeviceIntPoint eventLoc =
|
||||
aEvent->refPoint + aEvent->mWidget->WidgetToScreenOffset();
|
||||
aEvent->mRefPoint + aEvent->mWidget->WidgetToScreenOffset();
|
||||
nsIntRect docFrameRect = docFrame->GetScreenRect(); // Returns CSS pixels
|
||||
CSSIntPoint eventLocCSS(
|
||||
mPresContext->DevPixelsToIntCSSPixels(eventLoc.x) - docFrameRect.x,
|
||||
|
|
|
@ -25,7 +25,7 @@ DragEvent::DragEvent(EventTarget* aOwner,
|
|||
else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
mEvent->AsMouseEvent()->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -582,9 +582,10 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
aEvent->mClass == eWheelEventClass) &&
|
||||
!sIsPointerLocked) {
|
||||
sLastScreenPoint =
|
||||
Event::GetScreenCoords(aPresContext, aEvent, aEvent->refPoint);
|
||||
Event::GetScreenCoords(aPresContext, aEvent, aEvent->mRefPoint);
|
||||
sLastClientPoint =
|
||||
Event::GetClientCoords(aPresContext, aEvent, aEvent->refPoint, CSSIntPoint(0, 0));
|
||||
Event::GetClientCoords(aPresContext, aEvent, aEvent->mRefPoint,
|
||||
CSSIntPoint(0, 0));
|
||||
}
|
||||
|
||||
*aStatus = nsEventStatus_eIgnore;
|
||||
|
@ -1591,7 +1592,7 @@ EventStateManager::BeginTrackingDragGesture(nsPresContext* aPresContext,
|
|||
// Note that |inDownEvent| could be either a mouse down event or a
|
||||
// synthesized mouse move event.
|
||||
mGestureDownPoint =
|
||||
inDownEvent->refPoint + inDownEvent->mWidget->WidgetToScreenOffset();
|
||||
inDownEvent->mRefPoint + inDownEvent->mWidget->WidgetToScreenOffset();
|
||||
|
||||
if (inDownFrame) {
|
||||
inDownFrame->GetContentForEvent(inDownEvent,
|
||||
|
@ -1640,7 +1641,7 @@ EventStateManager::FillInEventFromGestureDown(WidgetMouseEvent* aEvent)
|
|||
// Set the coordinates in the new event to the coordinates of
|
||||
// the old event, adjusted for the fact that the widget might be
|
||||
// different
|
||||
aEvent->refPoint =
|
||||
aEvent->mRefPoint =
|
||||
mGestureDownPoint - aEvent->mWidget->WidgetToScreenOffset();
|
||||
aEvent->mModifiers = mGestureModifiers;
|
||||
aEvent->buttons = mGestureDownButtons;
|
||||
|
@ -1698,7 +1699,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext,
|
|||
|
||||
// fire drag gesture if mouse has moved enough
|
||||
LayoutDeviceIntPoint pt =
|
||||
aEvent->refPoint + aEvent->mWidget->WidgetToScreenOffset();
|
||||
aEvent->mRefPoint + aEvent->mWidget->WidgetToScreenOffset();
|
||||
LayoutDeviceIntPoint distance = pt - mGestureDownPoint;
|
||||
if (Abs(distance.x) > AssertedCast<uint32_t>(pixelThresholdX) ||
|
||||
Abs(distance.y) > AssertedCast<uint32_t>(pixelThresholdY)) {
|
||||
|
@ -2301,7 +2302,7 @@ EventStateManager::SendLineScrollEvent(nsIFrame* aTargetFrame,
|
|||
eLegacyMouseLineOrPageScroll, aEvent->mWidget);
|
||||
event.mFlags.mDefaultPrevented = aState.mDefaultPrevented;
|
||||
event.mFlags.mDefaultPreventedByContent = aState.mDefaultPreventedByContent;
|
||||
event.refPoint = aEvent->refPoint;
|
||||
event.mRefPoint = aEvent->mRefPoint;
|
||||
event.mTime = aEvent->mTime;
|
||||
event.mTimeStamp = aEvent->mTimeStamp;
|
||||
event.mModifiers = aEvent->mModifiers;
|
||||
|
@ -2340,7 +2341,7 @@ EventStateManager::SendPixelScrollEvent(nsIFrame* aTargetFrame,
|
|||
eLegacyMousePixelScroll, aEvent->mWidget);
|
||||
event.mFlags.mDefaultPrevented = aState.mDefaultPrevented;
|
||||
event.mFlags.mDefaultPreventedByContent = aState.mDefaultPreventedByContent;
|
||||
event.refPoint = aEvent->refPoint;
|
||||
event.mRefPoint = aEvent->mRefPoint;
|
||||
event.mTime = aEvent->mTime;
|
||||
event.mTimeStamp = aEvent->mTimeStamp;
|
||||
event.mModifiers = aEvent->mModifiers;
|
||||
|
@ -3424,11 +3425,11 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
|||
WidgetDragEvent event(aEvent->IsTrusted(), eLegacyDragDrop, widget);
|
||||
|
||||
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
|
||||
event.refPoint = mouseEvent->refPoint;
|
||||
event.mRefPoint = mouseEvent->mRefPoint;
|
||||
if (mouseEvent->mWidget) {
|
||||
event.refPoint += mouseEvent->mWidget->WidgetToScreenOffset();
|
||||
event.mRefPoint += mouseEvent->mWidget->WidgetToScreenOffset();
|
||||
}
|
||||
event.refPoint -= widget->WidgetToScreenOffset();
|
||||
event.mRefPoint -= widget->WidgetToScreenOffset();
|
||||
event.mModifiers = mouseEvent->mModifiers;
|
||||
event.buttons = mouseEvent->buttons;
|
||||
event.inputSource = mouseEvent->inputSource;
|
||||
|
@ -3865,7 +3866,7 @@ CreateMouseOrPointerWidgetEvent(WidgetMouseEvent* aMouseEvent,
|
|||
aMouseEvent->mWidget, WidgetMouseEvent::eReal);
|
||||
aNewEvent->relatedTarget = aRelatedContent;
|
||||
}
|
||||
aNewEvent->refPoint = aMouseEvent->refPoint;
|
||||
aNewEvent->mRefPoint = aMouseEvent->mRefPoint;
|
||||
aNewEvent->mModifiers = aMouseEvent->mModifiers;
|
||||
aNewEvent->button = aMouseEvent->button;
|
||||
aNewEvent->buttons = aMouseEvent->buttons;
|
||||
|
@ -4206,7 +4207,7 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
|||
{
|
||||
// Mouse movement is reported on the MouseEvent.movement{X,Y} fields.
|
||||
// Movement is calculated in UIEvent::GetMovementPoint() as:
|
||||
// previous_mousemove_refPoint - current_mousemove_refPoint.
|
||||
// previous_mousemove_mRefPoint - current_mousemove_mRefPoint.
|
||||
if (sIsPointerLocked && aMouseEvent->mWidget) {
|
||||
// The pointer is locked. If the pointer is not located at the center of
|
||||
// the window, dispatch a synthetic mousemove to return the pointer there.
|
||||
|
@ -4217,7 +4218,7 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
|||
LayoutDeviceIntPoint center =
|
||||
GetWindowClientRectCenter(aMouseEvent->mWidget);
|
||||
aMouseEvent->lastRefPoint = center;
|
||||
if (aMouseEvent->refPoint != center) {
|
||||
if (aMouseEvent->mRefPoint != center) {
|
||||
// Mouse move doesn't finish at the center of the window. Dispatch a
|
||||
// synthetic native mouse event to move the pointer back to the center
|
||||
// of the window, to faciliate more movement. But first, record that
|
||||
|
@ -4226,7 +4227,7 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
|||
sSynthCenteringPoint = center;
|
||||
aMouseEvent->mWidget->SynthesizeNativeMouseMove(
|
||||
center + aMouseEvent->mWidget->WidgetToScreenOffset(), nullptr);
|
||||
} else if (aMouseEvent->refPoint == sSynthCenteringPoint) {
|
||||
} else if (aMouseEvent->mRefPoint == sSynthCenteringPoint) {
|
||||
// This is the "synthetic native" event we dispatched to re-center the
|
||||
// pointer. Cancel it so we don't expose the centering move to content.
|
||||
aMouseEvent->StopPropagation();
|
||||
|
@ -4235,17 +4236,17 @@ EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
|||
sSynthCenteringPoint = kInvalidRefPoint;
|
||||
}
|
||||
} else if (sLastRefPoint == kInvalidRefPoint) {
|
||||
// We don't have a valid previous mousemove refPoint. This is either
|
||||
// We don't have a valid previous mousemove mRefPoint. This is either
|
||||
// the first move we've encountered, or the mouse has just re-entered
|
||||
// the application window. We should report (0,0) movement for this
|
||||
// case, so make the current and previous refPoints the same.
|
||||
aMouseEvent->lastRefPoint = aMouseEvent->refPoint;
|
||||
// case, so make the current and previous mRefPoints the same.
|
||||
aMouseEvent->lastRefPoint = aMouseEvent->mRefPoint;
|
||||
} else {
|
||||
aMouseEvent->lastRefPoint = sLastRefPoint;
|
||||
}
|
||||
|
||||
// Update the last known refPoint with the current refPoint.
|
||||
sLastRefPoint = aMouseEvent->refPoint;
|
||||
// Update the last known mRefPoint with the current mRefPoint.
|
||||
sLastRefPoint = aMouseEvent->mRefPoint;
|
||||
}
|
||||
MOZ_FALLTHROUGH;
|
||||
case ePointerMove:
|
||||
|
@ -4474,7 +4475,7 @@ EventStateManager::FireDragEnterOrExit(nsPresContext* aPresContext,
|
|||
{
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
WidgetDragEvent event(aDragEvent->IsTrusted(), aMessage, aDragEvent->mWidget);
|
||||
event.refPoint = aDragEvent->refPoint;
|
||||
event.mRefPoint = aDragEvent->mRefPoint;
|
||||
event.mModifiers = aDragEvent->mModifiers;
|
||||
event.buttons = aDragEvent->buttons;
|
||||
event.relatedTarget = aRelatedTarget;
|
||||
|
@ -4638,7 +4639,7 @@ EventStateManager::CheckForAndDispatchClick(WidgetMouseEvent* aEvent,
|
|||
|
||||
WidgetMouseEvent event(aEvent->IsTrusted(), eMouseClick,
|
||||
aEvent->mWidget, WidgetMouseEvent::eReal);
|
||||
event.refPoint = aEvent->refPoint;
|
||||
event.mRefPoint = aEvent->mRefPoint;
|
||||
event.clickCount = aEvent->clickCount;
|
||||
event.mModifiers = aEvent->mModifiers;
|
||||
event.buttons = aEvent->buttons;
|
||||
|
@ -4672,7 +4673,7 @@ EventStateManager::CheckForAndDispatchClick(WidgetMouseEvent* aEvent,
|
|||
//fire double click
|
||||
WidgetMouseEvent event2(aEvent->IsTrusted(), eMouseDoubleClick,
|
||||
aEvent->mWidget, WidgetMouseEvent::eReal);
|
||||
event2.refPoint = aEvent->refPoint;
|
||||
event2.mRefPoint = aEvent->mRefPoint;
|
||||
event2.clickCount = aEvent->clickCount;
|
||||
event2.mModifiers = aEvent->mModifiers;
|
||||
event2.buttons = aEvent->buttons;
|
||||
|
|
|
@ -907,12 +907,12 @@ private:
|
|||
int32_t mLockCursor;
|
||||
bool mLastFrameConsumedSetCursor;
|
||||
|
||||
// Last mouse event refPoint (the offset from the widget's origin in
|
||||
// Last mouse event mRefPoint (the offset from the widget's origin in
|
||||
// device pixels) when mouse was locked, used to restore mouse position
|
||||
// after unlocking.
|
||||
LayoutDeviceIntPoint mPreLockPoint;
|
||||
|
||||
// Stores the refPoint of the last synthetic mouse move we dispatched
|
||||
// Stores the mRefPoint of the last synthetic mouse move we dispatched
|
||||
// to re-center the mouse when we were pointer locked. If this is (-1,-1) it
|
||||
// means we've not recently dispatched a centering event. We use this to
|
||||
// detect when we receive the synth event, so we can cancel and not send it
|
||||
|
@ -923,7 +923,7 @@ private:
|
|||
nsCOMPtr<nsIContent> mCurrentTargetContent;
|
||||
static nsWeakFrame sLastDragOverFrame;
|
||||
|
||||
// Stores the refPoint (the offset from the widget's origin in device
|
||||
// Stores the mRefPoint (the offset from the widget's origin in device
|
||||
// pixels) of the last mouse event.
|
||||
static LayoutDeviceIntPoint sLastRefPoint;
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ IMEContentObserver::OnMouseButtonEvent(nsPresContext* aPresContext,
|
|||
|
||||
WidgetQueryContentEvent charAtPt(true, eQueryCharacterAtPoint,
|
||||
aMouseEvent->mWidget);
|
||||
charAtPt.refPoint = aMouseEvent->refPoint;
|
||||
charAtPt.mRefPoint = aMouseEvent->mRefPoint;
|
||||
ContentEventHandler handler(aPresContext);
|
||||
handler.OnQueryCharacterAtPoint(&charAtPt);
|
||||
if (NS_WARN_IF(!charAtPt.mSucceeded) ||
|
||||
|
@ -802,7 +802,7 @@ IMEContentObserver::OnMouseButtonEvent(nsPresContext* aPresContext,
|
|||
// The refPt is relative to its widget.
|
||||
// We should notify it with offset in the widget.
|
||||
if (aMouseEvent->mWidget != mWidget) {
|
||||
charAtPt.refPoint += aMouseEvent->mWidget->WidgetToScreenOffset() -
|
||||
charAtPt.mRefPoint += aMouseEvent->mWidget->WidgetToScreenOffset() -
|
||||
mWidget->WidgetToScreenOffset();
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ IMEContentObserver::OnMouseButtonEvent(nsPresContext* aPresContext,
|
|||
notification.mMouseButtonEventData.mEventMessage = aMouseEvent->mMessage;
|
||||
notification.mMouseButtonEventData.mOffset = charAtPt.mReply.mOffset;
|
||||
notification.mMouseButtonEventData.mCursorPos.Set(
|
||||
charAtPt.refPoint.ToUnknownPoint());
|
||||
charAtPt.mRefPoint.ToUnknownPoint());
|
||||
notification.mMouseButtonEventData.mCharRect.Set(
|
||||
charAtPt.mReply.mRect.ToUnknownRect());
|
||||
notification.mMouseButtonEventData.mButton = aMouseEvent->button;
|
||||
|
|
|
@ -32,7 +32,7 @@ MouseEvent::MouseEvent(EventTarget* aOwner,
|
|||
else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
|
||||
|
@ -82,8 +82,8 @@ MouseEvent::InitMouseEvent(const nsAString& aType,
|
|||
mouseEventBase->InitBasicModifiers(aCtrlKey, aAltKey, aShiftKey, aMetaKey);
|
||||
mClientPoint.x = aClientX;
|
||||
mClientPoint.y = aClientY;
|
||||
mouseEventBase->refPoint.x = aScreenX;
|
||||
mouseEventBase->refPoint.y = aScreenY;
|
||||
mouseEventBase->mRefPoint.x = aScreenX;
|
||||
mouseEventBase->mRefPoint.y = aScreenY;
|
||||
|
||||
WidgetMouseEvent* mouseEvent = mEvent->AsMouseEvent();
|
||||
if (mouseEvent) {
|
||||
|
@ -357,7 +357,7 @@ MouseEvent::GetScreenX(int32_t* aScreenX)
|
|||
int32_t
|
||||
MouseEvent::ScreenX()
|
||||
{
|
||||
return Event::GetScreenCoords(mPresContext, mEvent, mEvent->refPoint).x;
|
||||
return Event::GetScreenCoords(mPresContext, mEvent, mEvent->mRefPoint).x;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -371,7 +371,7 @@ MouseEvent::GetScreenY(int32_t* aScreenY)
|
|||
int32_t
|
||||
MouseEvent::ScreenY()
|
||||
{
|
||||
return Event::GetScreenCoords(mPresContext, mEvent, mEvent->refPoint).y;
|
||||
return Event::GetScreenCoords(mPresContext, mEvent, mEvent->mRefPoint).y;
|
||||
}
|
||||
|
||||
|
||||
|
@ -386,7 +386,7 @@ MouseEvent::GetClientX(int32_t* aClientX)
|
|||
int32_t
|
||||
MouseEvent::ClientX()
|
||||
{
|
||||
return Event::GetClientCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetClientCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).x;
|
||||
}
|
||||
|
||||
|
@ -401,21 +401,21 @@ MouseEvent::GetClientY(int32_t* aClientY)
|
|||
int32_t
|
||||
MouseEvent::ClientY()
|
||||
{
|
||||
return Event::GetClientCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetClientCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).y;
|
||||
}
|
||||
|
||||
int32_t
|
||||
MouseEvent::OffsetX()
|
||||
{
|
||||
return Event::GetOffsetCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetOffsetCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).x;
|
||||
}
|
||||
|
||||
int32_t
|
||||
MouseEvent::OffsetY()
|
||||
{
|
||||
return Event::GetOffsetCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetOffsetCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).y;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ MouseScrollEvent::MouseScrollEvent(EventTarget* aOwner,
|
|||
} else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
static_cast<WidgetMouseEventBase*>(mEvent)->inputSource =
|
||||
nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ PointerEvent::PointerEvent(EventTarget* aOwner,
|
|||
} else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ SimpleGestureEvent::SimpleGestureEvent(EventTarget* aOwner,
|
|||
} else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
static_cast<WidgetMouseEventBase*>(mEvent)->inputSource =
|
||||
nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ UIEvent::GetMovementPoint()
|
|||
}
|
||||
|
||||
// Calculate the delta between the last screen point and the current one.
|
||||
nsIntPoint current = DevPixelsToCSSPixels(mEvent->refPoint, mPresContext);
|
||||
nsIntPoint current = DevPixelsToCSSPixels(mEvent->mRefPoint, mPresContext);
|
||||
nsIntPoint last = DevPixelsToCSSPixels(mEvent->lastRefPoint, mPresContext);
|
||||
return current - last;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ UIEvent::PageX() const
|
|||
return mPagePoint.x;
|
||||
}
|
||||
|
||||
return Event::GetPageCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetPageCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).x;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ UIEvent::PageY() const
|
|||
return mPagePoint.y;
|
||||
}
|
||||
|
||||
return Event::GetPageCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
return Event::GetPageCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint).y;
|
||||
}
|
||||
|
||||
|
@ -365,20 +365,20 @@ NS_IMETHODIMP
|
|||
UIEvent::DuplicatePrivateData()
|
||||
{
|
||||
mClientPoint =
|
||||
Event::GetClientCoords(mPresContext, mEvent, mEvent->refPoint,
|
||||
Event::GetClientCoords(mPresContext, mEvent, mEvent->mRefPoint,
|
||||
mClientPoint);
|
||||
mMovementPoint = GetMovementPoint();
|
||||
mLayerPoint = GetLayerPoint();
|
||||
mPagePoint =
|
||||
Event::GetPageCoords(mPresContext, mEvent, mEvent->refPoint, mClientPoint);
|
||||
// GetScreenPoint converts mEvent->refPoint to right coordinates.
|
||||
Event::GetPageCoords(mPresContext, mEvent, mEvent->mRefPoint, mClientPoint);
|
||||
// GetScreenPoint converts mEvent->mRefPoint to right coordinates.
|
||||
CSSIntPoint screenPoint =
|
||||
Event::GetScreenCoords(mPresContext, mEvent, mEvent->refPoint);
|
||||
Event::GetScreenCoords(mPresContext, mEvent, mEvent->mRefPoint);
|
||||
nsresult rv = Event::DuplicatePrivateData();
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
CSSToLayoutDeviceScale scale = mPresContext ? mPresContext->CSSToDevPixelScale()
|
||||
: CSSToLayoutDeviceScale(1);
|
||||
mEvent->refPoint = RoundedToInt(screenPoint * scale);
|
||||
mEvent->mRefPoint = RoundedToInt(screenPoint * scale);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ protected:
|
|||
nsCOMPtr<nsPIDOMWindowOuter> mView;
|
||||
int32_t mDetail;
|
||||
CSSIntPoint mClientPoint;
|
||||
// Screenpoint is mEvent->refPoint.
|
||||
// Screenpoint is mEvent->mRefPoint.
|
||||
nsIntPoint mLayerPoint;
|
||||
CSSIntPoint mPagePoint;
|
||||
nsIntPoint mMovementPoint;
|
||||
|
|
|
@ -31,7 +31,7 @@ WheelEvent::WheelEvent(EventTarget* aOwner,
|
|||
} else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->mTime = PR_Now();
|
||||
mEvent->refPoint.x = mEvent->refPoint.y = 0;
|
||||
mEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
mEvent->AsWheelEvent()->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ WheelTransaction::GetScreenPoint(WidgetGUIEvent* aEvent)
|
|||
{
|
||||
NS_ASSERTION(aEvent, "aEvent is null");
|
||||
NS_ASSERTION(aEvent->mWidget, "aEvent-mWidget is null");
|
||||
return (aEvent->refPoint + aEvent->mWidget->WidgetToScreenOffset())
|
||||
return (aEvent->mRefPoint + aEvent->mWidget->WidgetToScreenOffset())
|
||||
.ToUnknownPoint();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ HTMLLabelElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||
// We reset the mouse-down point on every event because there is
|
||||
// no guarantee we will reach the eMouseClick code below.
|
||||
LayoutDeviceIntPoint* curPoint =
|
||||
new LayoutDeviceIntPoint(mouseEvent->refPoint);
|
||||
new LayoutDeviceIntPoint(mouseEvent->mRefPoint);
|
||||
SetProperty(nsGkAtoms::labelMouseDownPtProperty,
|
||||
static_cast<void*>(curPoint),
|
||||
nsINode::DeleteProperty<LayoutDeviceIntPoint>);
|
||||
|
@ -146,7 +146,7 @@ HTMLLabelElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||
LayoutDeviceIntPoint dragDistance = *mouseDownPoint;
|
||||
DeleteProperty(nsGkAtoms::labelMouseDownPtProperty);
|
||||
|
||||
dragDistance -= mouseEvent->refPoint;
|
||||
dragDistance -= mouseEvent->mRefPoint;
|
||||
const int CLICK_DISTANCE = 2;
|
||||
dragSelect = dragDistance.x > CLICK_DISTANCE ||
|
||||
dragDistance.x < -CLICK_DISTANCE ||
|
||||
|
|
|
@ -1168,7 +1168,7 @@ bool TabParent::SendRealMouseEvent(WidgetMouseEvent& event)
|
|||
if (mIsDestroyed) {
|
||||
return false;
|
||||
}
|
||||
event.refPoint += GetChildProcessOffset();
|
||||
event.mRefPoint += GetChildProcessOffset();
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = GetWidget();
|
||||
if (widget) {
|
||||
|
@ -1220,7 +1220,7 @@ TabParent::SendRealDragEvent(WidgetDragEvent& event, uint32_t aDragAction,
|
|||
if (mIsDestroyed) {
|
||||
return false;
|
||||
}
|
||||
event.refPoint += GetChildProcessOffset();
|
||||
event.mRefPoint += GetChildProcessOffset();
|
||||
return PBrowserParent::SendRealDragEvent(event, aDragAction, aDropEffect);
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ bool TabParent::SendMouseWheelEvent(WidgetWheelEvent& event)
|
|||
ScrollableLayerGuid guid;
|
||||
uint64_t blockId;
|
||||
ApzAwareEventRoutingToChild(&guid, &blockId, nullptr);
|
||||
event.refPoint += GetChildProcessOffset();
|
||||
event.mRefPoint += GetChildProcessOffset();
|
||||
return PBrowserParent::SendMouseWheelEvent(event, guid, blockId);
|
||||
}
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ bool TabParent::RecvDispatchWheelEvent(const mozilla::WidgetWheelEvent& aEvent)
|
|||
|
||||
WidgetWheelEvent localEvent(aEvent);
|
||||
localEvent.mWidget = widget;
|
||||
localEvent.refPoint -= GetChildProcessOffset();
|
||||
localEvent.mRefPoint -= GetChildProcessOffset();
|
||||
|
||||
widget->DispatchInputEvent(&localEvent);
|
||||
return true;
|
||||
|
@ -1267,7 +1267,7 @@ TabParent::RecvDispatchMouseEvent(const mozilla::WidgetMouseEvent& aEvent)
|
|||
|
||||
WidgetMouseEvent localEvent(aEvent);
|
||||
localEvent.mWidget = widget;
|
||||
localEvent.refPoint -= GetChildProcessOffset();
|
||||
localEvent.mRefPoint -= GetChildProcessOffset();
|
||||
|
||||
widget->DispatchInputEvent(&localEvent);
|
||||
return true;
|
||||
|
@ -1283,7 +1283,7 @@ TabParent::RecvDispatchKeyboardEvent(const mozilla::WidgetKeyboardEvent& aEvent)
|
|||
|
||||
WidgetKeyboardEvent localEvent(aEvent);
|
||||
localEvent.mWidget = widget;
|
||||
localEvent.refPoint -= GetChildProcessOffset();
|
||||
localEvent.mRefPoint -= GetChildProcessOffset();
|
||||
|
||||
widget->DispatchInputEvent(&localEvent);
|
||||
return true;
|
||||
|
@ -1505,7 +1505,7 @@ bool TabParent::SendRealKeyEvent(WidgetKeyboardEvent& event)
|
|||
if (mIsDestroyed) {
|
||||
return false;
|
||||
}
|
||||
event.refPoint += GetChildProcessOffset();
|
||||
event.mRefPoint += GetChildProcessOffset();
|
||||
|
||||
MaybeNativeKeyBinding bindings;
|
||||
bindings = void_t();
|
||||
|
|
|
@ -2565,8 +2565,9 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
|||
const WidgetMouseEvent& mouseEvent = *anEvent.AsMouseEvent();
|
||||
// Get reference point relative to screen:
|
||||
LayoutDeviceIntPoint rootPoint(-1, -1);
|
||||
if (widget)
|
||||
rootPoint = anEvent.refPoint + widget->WidgetToScreenOffset();
|
||||
if (widget) {
|
||||
rootPoint = anEvent.mRefPoint + widget->WidgetToScreenOffset();
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
Window root = GDK_ROOT_WINDOW();
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
|
|
|
@ -1006,7 +1006,8 @@ APZCTreeManager::UpdateWheelTransaction(WidgetInputEvent& aEvent)
|
|||
}
|
||||
|
||||
ScreenIntPoint point =
|
||||
ViewAs<ScreenPixel>(aEvent.refPoint, PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
|
||||
ViewAs<ScreenPixel>(aEvent.mRefPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
|
||||
txn->OnMouseMove(point);
|
||||
return;
|
||||
}
|
||||
|
@ -1037,11 +1038,12 @@ APZCTreeManager::ProcessEvent(WidgetInputEvent& aEvent,
|
|||
// Note, we call this before having transformed the reference point.
|
||||
UpdateWheelTransaction(aEvent);
|
||||
|
||||
// Transform the refPoint.
|
||||
// Transform the mRefPoint.
|
||||
// If the event hits an overscrolled APZC, instruct the caller to ignore it.
|
||||
HitTestResult hitResult = HitNothing;
|
||||
PixelCastJustification LDIsScreen = PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent;
|
||||
ScreenIntPoint refPointAsScreen = ViewAs<ScreenPixel>(aEvent.refPoint, LDIsScreen);
|
||||
ScreenIntPoint refPointAsScreen =
|
||||
ViewAs<ScreenPixel>(aEvent.mRefPoint, LDIsScreen);
|
||||
RefPtr<AsyncPanZoomController> apzc = GetTargetAPZC(refPointAsScreen, &hitResult);
|
||||
if (apzc) {
|
||||
MOZ_ASSERT(hitResult == HitLayer || hitResult == HitDispatchToContentRegion);
|
||||
|
@ -1052,7 +1054,8 @@ APZCTreeManager::ProcessEvent(WidgetInputEvent& aEvent,
|
|||
Maybe<ScreenIntPoint> untransformedRefPoint =
|
||||
UntransformBy(outTransform, refPointAsScreen);
|
||||
if (untransformedRefPoint) {
|
||||
aEvent.refPoint = ViewAs<LayoutDevicePixel>(*untransformedRefPoint, LDIsScreen);
|
||||
aEvent.mRefPoint =
|
||||
ViewAs<LayoutDevicePixel>(*untransformedRefPoint, LDIsScreen);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -1069,12 +1072,12 @@ APZCTreeManager::ProcessMouseEvent(WidgetMouseEventBase& aEvent,
|
|||
UpdateWheelTransaction(aEvent);
|
||||
|
||||
MouseInput input(aEvent);
|
||||
input.mOrigin = ScreenPoint(aEvent.refPoint.x, aEvent.refPoint.y);
|
||||
input.mOrigin = ScreenPoint(aEvent.mRefPoint.x, aEvent.mRefPoint.y);
|
||||
|
||||
nsEventStatus status = ReceiveInputEvent(input, aOutTargetGuid, aOutInputBlockId);
|
||||
|
||||
aEvent.refPoint.x = input.mOrigin.x;
|
||||
aEvent.refPoint.y = input.mOrigin.y;
|
||||
aEvent.mRefPoint.x = input.mOrigin.x;
|
||||
aEvent.mRefPoint.y = input.mOrigin.y;
|
||||
aEvent.mFlags.mHandledByAPZ = true;
|
||||
return status;
|
||||
}
|
||||
|
@ -1102,7 +1105,7 @@ APZCTreeManager::ProcessWheelEvent(WidgetWheelEvent& aEvent,
|
|||
scrollMode = ScrollWheelInput::SCROLLMODE_SMOOTH;
|
||||
}
|
||||
|
||||
ScreenPoint origin(aEvent.refPoint.x, aEvent.refPoint.y);
|
||||
ScreenPoint origin(aEvent.mRefPoint.x, aEvent.mRefPoint.y);
|
||||
ScrollWheelInput input(aEvent.mTime, aEvent.mTimeStamp, 0,
|
||||
scrollMode,
|
||||
ScrollWheelInput::DeltaTypeForDeltaMode(
|
||||
|
@ -1122,8 +1125,8 @@ APZCTreeManager::ProcessWheelEvent(WidgetWheelEvent& aEvent,
|
|||
&input.mUserDeltaMultiplierY);
|
||||
|
||||
nsEventStatus status = ReceiveInputEvent(input, aOutTargetGuid, aOutInputBlockId);
|
||||
aEvent.refPoint.x = input.mOrigin.x;
|
||||
aEvent.refPoint.y = input.mOrigin.y;
|
||||
aEvent.mRefPoint.x = input.mOrigin.x;
|
||||
aEvent.mRefPoint.y = input.mOrigin.y;
|
||||
aEvent.mFlags.mHandledByAPZ = input.mHandledByAPZ;
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -457,8 +457,7 @@ APZCCallbackHelper::ApplyCallbackTransform(WidgetEvent& aEvent,
|
|||
event.mTouches[i]->mRefPoint, aGuid, aScale);
|
||||
}
|
||||
} else {
|
||||
aEvent.refPoint = ApplyCallbackTransform(
|
||||
aEvent.refPoint, aGuid, aScale);
|
||||
aEvent.mRefPoint = ApplyCallbackTransform(aEvent.mRefPoint, aGuid, aScale);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,7 +483,7 @@ APZCCallbackHelper::DispatchSynthesizedMouseEvent(EventMessage aMsg,
|
|||
|
||||
WidgetMouseEvent event(true, aMsg, aWidget,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
event.refPoint = LayoutDeviceIntPoint(aRefPoint.x, aRefPoint.y);
|
||||
event.mRefPoint = LayoutDeviceIntPoint(aRefPoint.x, aRefPoint.y);
|
||||
event.mTime = aTime;
|
||||
event.button = WidgetMouseEvent::eLeftButton;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
|
@ -762,7 +761,7 @@ APZCCallbackHelper::SendSetTargetAPZCNotification(nsIWidget* aWidget,
|
|||
}
|
||||
} else if (const WidgetWheelEvent* wheelEvent = aEvent.AsWheelEvent()) {
|
||||
waitForRefresh = PrepareForSetTargetAPZCNotification(aWidget, aGuid,
|
||||
rootFrame, wheelEvent->refPoint, &targets);
|
||||
rootFrame, wheelEvent->mRefPoint, &targets);
|
||||
}
|
||||
// TODO: Do other types of events need to be handled?
|
||||
|
||||
|
|
|
@ -797,7 +797,7 @@ AccessibleCaretEventHub::GetTouchEventPosition(WidgetTouchEvent* aEvent,
|
|||
nsPoint
|
||||
AccessibleCaretEventHub::GetMouseEventPosition(WidgetMouseEvent* aEvent) const
|
||||
{
|
||||
LayoutDeviceIntPoint mouseIntPoint = aEvent->AsGUIEvent()->refPoint;
|
||||
LayoutDeviceIntPoint mouseIntPoint = aEvent->AsGUIEvent()->mRefPoint;
|
||||
|
||||
// Get event coordinate relative to root frame.
|
||||
nsIFrame* rootFrame = mPresShell->GetRootFrame();
|
||||
|
|
|
@ -648,7 +648,7 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent,
|
|||
aRootFrame->PresContext(), view, point, aEvent->mWidget);
|
||||
if (widgetPoint.x != NS_UNCONSTRAINEDSIZE) {
|
||||
// If that succeeded, we update the point in the event
|
||||
aEvent->refPoint = widgetPoint;
|
||||
aEvent->mRefPoint = widgetPoint;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
virtual nsPoint GetMouseEventPosition(WidgetMouseEvent* aEvent) const override
|
||||
{
|
||||
// Return the device point directly.
|
||||
LayoutDeviceIntPoint mouseIntPoint = aEvent->AsGUIEvent()->refPoint;
|
||||
LayoutDeviceIntPoint mouseIntPoint = aEvent->AsGUIEvent()->mRefPoint;
|
||||
return nsPoint(mouseIntPoint.x, mouseIntPoint.y);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ public:
|
|||
WidgetMouseEvent::eReal);
|
||||
|
||||
event->button = WidgetMouseEvent::eLeftButton;
|
||||
event->refPoint = LayoutDeviceIntPoint(aX, aY);
|
||||
event->mRefPoint = LayoutDeviceIntPoint(aX, aY);
|
||||
|
||||
return Move(event);
|
||||
}
|
||||
|
|
|
@ -2169,7 +2169,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
|
|||
return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
|
||||
|
||||
return GetEventCoordinatesRelativeTo(aEvent,
|
||||
aEvent->AsGUIEvent()->refPoint,
|
||||
aEvent->AsGUIEvent()->mRefPoint,
|
||||
aFrame);
|
||||
}
|
||||
|
||||
|
|
|
@ -5513,7 +5513,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
|
|||
// The appunits per devpixel ratio of |view|.
|
||||
int32_t viewAPD;
|
||||
|
||||
// refPoint will be mMouseLocation relative to the widget of |view|, the
|
||||
// mRefPoint will be mMouseLocation relative to the widget of |view|, the
|
||||
// widget we will put in the event we dispatch, in viewAPD appunits
|
||||
nsPoint refpoint(0, 0);
|
||||
|
||||
|
@ -5543,7 +5543,8 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
|
|||
NS_ASSERTION(view->GetWidget(), "view should have a widget here");
|
||||
WidgetMouseEvent event(true, eMouseMove, view->GetWidget(),
|
||||
WidgetMouseEvent::eSynthesized);
|
||||
event.refPoint = LayoutDeviceIntPoint::FromAppUnitsToNearest(refpoint, viewAPD);
|
||||
event.mRefPoint =
|
||||
LayoutDeviceIntPoint::FromAppUnitsToNearest(refpoint, viewAPD);
|
||||
event.mTime = PR_IntervalNow();
|
||||
// XXX set event.mModifiers ?
|
||||
// XXX mnakano I think that we should get the latest information from widget.
|
||||
|
@ -6789,7 +6790,7 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
|||
if (!rootFrame) {
|
||||
nsView* rootView = mViewManager->GetRootView();
|
||||
mMouseLocation = nsLayoutUtils::TranslateWidgetToView(mPresContext,
|
||||
aEvent->mWidget, aEvent->refPoint, rootView);
|
||||
aEvent->mWidget, aEvent->mRefPoint, rootView);
|
||||
mMouseEventTargetGuid = InputAPZContext::GetTargetLayerGuid();
|
||||
} else {
|
||||
mMouseLocation =
|
||||
|
@ -6929,7 +6930,7 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
|
|||
touchEvent->mWidget);
|
||||
event.isPrimary = i == 0;
|
||||
event.pointerId = touch->Identifier();
|
||||
event.refPoint = touch->mRefPoint;
|
||||
event.mRefPoint = touch->mRefPoint;
|
||||
event.mModifiers = touchEvent->mModifiers;
|
||||
event.width = touch->RadiusX();
|
||||
event.height = touch->RadiusY();
|
||||
|
@ -8502,7 +8503,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
nsCOMPtr<nsIWidget> widget = popupFrame->GetNearestWidget();
|
||||
aEvent->mWidget = widget;
|
||||
LayoutDeviceIntPoint widgetPoint = widget->WidgetToScreenOffset();
|
||||
aEvent->refPoint = LayoutDeviceIntPoint::FromUnknownPoint(
|
||||
aEvent->mRefPoint = LayoutDeviceIntPoint::FromUnknownPoint(
|
||||
itemFrame->GetScreenRect().BottomLeft()) - widgetPoint;
|
||||
|
||||
mCurrentEventContent = itemFrame->GetContent();
|
||||
|
@ -8522,8 +8523,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
// and the coordinates returned by GetCurrentItemAndPositionForElement
|
||||
// are relative to the widget of the root of the root view manager.
|
||||
nsRootPresContext* rootPC = mPresContext->GetRootPresContext();
|
||||
aEvent->refPoint.x = 0;
|
||||
aEvent->refPoint.y = 0;
|
||||
aEvent->mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
if (rootPC) {
|
||||
rootPC->PresShell()->GetViewManager()->
|
||||
GetRootWidget(getter_AddRefs(aEvent->mWidget));
|
||||
|
@ -8535,7 +8535,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
if (rootFrame) {
|
||||
nsView* view = rootFrame->GetClosestView(&offset);
|
||||
offset += view->GetOffsetToWidget(aEvent->mWidget);
|
||||
aEvent->refPoint =
|
||||
aEvent->mRefPoint =
|
||||
LayoutDeviceIntPoint::FromAppUnitsToNearest(offset, mPresContext->AppUnitsPerDevPixel());
|
||||
}
|
||||
}
|
||||
|
@ -8549,7 +8549,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
// ScrollSelectionIntoView.
|
||||
if (PrepareToUseCaretPosition(aEvent->mWidget, caretPoint)) {
|
||||
// caret position is good
|
||||
aEvent->refPoint = caretPoint;
|
||||
aEvent->mRefPoint = caretPoint;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -8566,7 +8566,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
nsCOMPtr<nsIContent> currentPointElement;
|
||||
GetCurrentItemAndPositionForElement(currentFocus,
|
||||
getter_AddRefs(currentPointElement),
|
||||
aEvent->refPoint,
|
||||
aEvent->mRefPoint,
|
||||
aEvent->mWidget);
|
||||
if (currentPointElement) {
|
||||
mCurrentEventContent = currentPointElement;
|
||||
|
@ -8586,7 +8586,7 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
|
|||
// will also scroll the window as needed to make the caret visible.
|
||||
//
|
||||
// The event widget should be the widget that generated the event, and
|
||||
// whose coordinate system the resulting event's refPoint should be
|
||||
// whose coordinate system the resulting event's mRefPoint should be
|
||||
// relative to. The returned point is in device pixels realtive to the
|
||||
// widget passed in.
|
||||
bool
|
||||
|
|
|
@ -621,7 +621,7 @@ nsNumberControlFrame::GetSpinButtonForPointerEvent(WidgetGUIEvent* aEvent) const
|
|||
// half of the element, or down if it's over the bottom half. This is
|
||||
// important to handle since this is the state things are in for the
|
||||
// default UA style sheet. See the comment in forms.css for why.
|
||||
LayoutDeviceIntPoint absPoint = aEvent->refPoint;
|
||||
LayoutDeviceIntPoint absPoint = aEvent->mRefPoint;
|
||||
nsPoint point =
|
||||
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
|
||||
absPoint, mSpinBox->GetPrimaryFrame());
|
||||
|
|
|
@ -517,7 +517,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
|
|||
{
|
||||
MOZ_ASSERT(aEvent->mClass == eMouseEventClass ||
|
||||
aEvent->mClass == eTouchEventClass,
|
||||
"Unexpected event type - aEvent->refPoint may be meaningless");
|
||||
"Unexpected event type - aEvent->mRefPoint may be meaningless");
|
||||
|
||||
MOZ_ASSERT(mContent->IsHTMLElement(nsGkAtoms::input), "bad cast");
|
||||
dom::HTMLInputElement* input = static_cast<dom::HTMLInputElement*>(mContent);
|
||||
|
@ -539,7 +539,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
|
|||
"Unexpected number of mTouches");
|
||||
absPoint = aEvent->AsTouchEvent()->mTouches[0]->mRefPoint;
|
||||
} else {
|
||||
absPoint = aEvent->refPoint;
|
||||
absPoint = aEvent->mRefPoint;
|
||||
}
|
||||
nsPoint point =
|
||||
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, absPoint, this);
|
||||
|
|
|
@ -1222,7 +1222,7 @@ nsHTMLFramesetFrame::StartMouseDrag(nsPresContext* aPresContext,
|
|||
|
||||
mDragger = aBorder;
|
||||
|
||||
mFirstDragPoint = aEvent->refPoint;
|
||||
mFirstDragPoint = aEvent->mRefPoint;
|
||||
|
||||
// Store the original frame sizes
|
||||
if (mDragger->mVertical) {
|
||||
|
@ -1251,7 +1251,8 @@ nsHTMLFramesetFrame::MouseDrag(nsPresContext* aPresContext,
|
|||
int32_t change; // measured positive from left-to-right or top-to-bottom
|
||||
nsWeakFrame weakFrame(this);
|
||||
if (mDragger->mVertical) {
|
||||
change = aPresContext->DevPixelsToAppUnits(aEvent->refPoint.x - mFirstDragPoint.x);
|
||||
change = aPresContext->DevPixelsToAppUnits(
|
||||
aEvent->mRefPoint.x - mFirstDragPoint.x);
|
||||
if (change > mNextNeighborOrigSize - mMinDrag) {
|
||||
change = mNextNeighborOrigSize - mMinDrag;
|
||||
} else if (change <= mMinDrag - mPrevNeighborOrigSize) {
|
||||
|
@ -1274,7 +1275,8 @@ nsHTMLFramesetFrame::MouseDrag(nsPresContext* aPresContext,
|
|||
mContent->SetAttr(kNameSpaceID_None, nsGkAtoms::cols, newColAttr, true);
|
||||
}
|
||||
} else {
|
||||
change = aPresContext->DevPixelsToAppUnits(aEvent->refPoint.y - mFirstDragPoint.y);
|
||||
change = aPresContext->DevPixelsToAppUnits(
|
||||
aEvent->mRefPoint.y - mFirstDragPoint.y);
|
||||
if (change > mNextNeighborOrigSize - mMinDrag) {
|
||||
change = mNextNeighborOrigSize - mMinDrag;
|
||||
} else if (change <= mMinDrag - mPrevNeighborOrigSize) {
|
||||
|
|
|
@ -2103,7 +2103,7 @@ nsBoxFrame::GetEventPoint(WidgetGUIEvent* aEvent, LayoutDeviceIntPoint& aPoint)
|
|||
}
|
||||
aPoint = touch->mRefPoint;
|
||||
} else {
|
||||
aPoint = aEvent->refPoint;
|
||||
aPoint = aEvent->mRefPoint;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
|
|||
nsIPresShell::SetCapturingContent(GetContent(), CAPTURE_IGNOREALLOWED);
|
||||
|
||||
// remember current mouse coordinates.
|
||||
mLastPoint = aEvent->refPoint;
|
||||
mLastPoint = aEvent->mRefPoint;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
|
|||
case eMouseMove: {
|
||||
if(mTrackingMouseMove)
|
||||
{
|
||||
LayoutDeviceIntPoint nsMoveBy = aEvent->refPoint - mLastPoint;
|
||||
LayoutDeviceIntPoint nsMoveBy = aEvent->mRefPoint - mLastPoint;
|
||||
|
||||
nsIFrame* parent = GetParent();
|
||||
while (parent) {
|
||||
|
|
|
@ -1421,7 +1421,7 @@ nsXULPopupManager::FirePopupShowingEvent(nsIContent* aPopup,
|
|||
event.mWidget = nullptr;
|
||||
}
|
||||
|
||||
event.refPoint = mCachedMousePoint;
|
||||
event.mRefPoint = mCachedMousePoint;
|
||||
event.mModifiers = mCachedModifiers;
|
||||
EventDispatcher::Dispatch(popup, presContext, &event, nullptr, &status);
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ protected:
|
|||
: WidgetEventTime()
|
||||
, mClass(aEventClassID)
|
||||
, mMessage(aMessage)
|
||||
, refPoint(0, 0)
|
||||
, mRefPoint(0, 0)
|
||||
, lastRefPoint(0, 0)
|
||||
, userType(nullptr)
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ public:
|
|||
: WidgetEventTime()
|
||||
, mClass(eBasicEventClass)
|
||||
, mMessage(aMessage)
|
||||
, refPoint(0, 0)
|
||||
, mRefPoint(0, 0)
|
||||
, lastRefPoint(0, 0)
|
||||
, userType(nullptr)
|
||||
{
|
||||
|
@ -329,8 +329,8 @@ public:
|
|||
EventMessage mMessage;
|
||||
// Relative to the widget of the event, or if there is no widget then it is
|
||||
// in screen coordinates. Not modified by layout code.
|
||||
LayoutDeviceIntPoint refPoint;
|
||||
// The previous refPoint, if known, used to calculate mouse movement deltas.
|
||||
LayoutDeviceIntPoint mRefPoint;
|
||||
// The previous mRefPoint, if known, used to calculate mouse movement deltas.
|
||||
LayoutDeviceIntPoint lastRefPoint;
|
||||
// See BaseEventFlags definition for the detail.
|
||||
BaseEventFlags mFlags;
|
||||
|
@ -349,7 +349,7 @@ public:
|
|||
{
|
||||
// mClass should be initialized with the constructor.
|
||||
// mMessage should be initialized with the constructor.
|
||||
refPoint = aEvent.refPoint;
|
||||
mRefPoint = aEvent.mRefPoint;
|
||||
// lastRefPoint doesn't need to be copied.
|
||||
AssignEventTime(aEvent);
|
||||
// mFlags should be copied manually if it's necessary.
|
||||
|
|
|
@ -235,9 +235,9 @@ NS_EVENT_MESSAGE(eQueryContentState)
|
|||
NS_EVENT_MESSAGE(eQuerySelectionAsTransferable)
|
||||
// Query for character at a point. This returns the character offset, its
|
||||
// rect and also tentative caret point if the point is clicked. The point is
|
||||
// specified by Event::refPoint.
|
||||
// specified by Event::mRefPoint.
|
||||
NS_EVENT_MESSAGE(eQueryCharacterAtPoint)
|
||||
// Query if the DOM element under Event::refPoint belongs to our widget
|
||||
// Query if the DOM element under Event::mRefPoint belongs to our widget
|
||||
// or not.
|
||||
NS_EVENT_MESSAGE(eQueryDOMWidgetHittest)
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ MouseInput::MouseInput(const WidgetMouseEventBase& aMouseEvent)
|
|||
}
|
||||
|
||||
mOrigin =
|
||||
ScreenPoint(ViewAs<ScreenPixel>(aMouseEvent.refPoint,
|
||||
ScreenPoint(ViewAs<ScreenPixel>(aMouseEvent.mRefPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ MouseInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
|
|||
event.mModifiers = modifiers;
|
||||
event.mTime = mTime;
|
||||
event.mTimeStamp = mTimeStamp;
|
||||
event.refPoint =
|
||||
event.mRefPoint =
|
||||
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
event.clickCount = clickCount;
|
||||
|
@ -284,8 +284,8 @@ MultiTouchInput::ToWidgetMouseEvent(nsIWidget* aWidget) const
|
|||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
|
||||
const SingleTouchData& firstTouch = mTouches[0];
|
||||
event.refPoint.x = firstTouch.mScreenPoint.x;
|
||||
event.refPoint.y = firstTouch.mScreenPoint.y;
|
||||
event.mRefPoint.x = firstTouch.mScreenPoint.x;
|
||||
event.mRefPoint.y = firstTouch.mScreenPoint.y;
|
||||
|
||||
event.mTime = mTime;
|
||||
event.button = WidgetMouseEvent::eLeftButton;
|
||||
|
@ -347,7 +347,7 @@ MultiTouchInput::MultiTouchInput(const WidgetMouseEvent& aMouseEvent)
|
|||
}
|
||||
|
||||
mTouches.AppendElement(SingleTouchData(0,
|
||||
ViewAs<ScreenPixel>(aMouseEvent.refPoint,
|
||||
ViewAs<ScreenPixel>(aMouseEvent.mRefPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent),
|
||||
ScreenSize(1, 1),
|
||||
180.0f,
|
||||
|
@ -387,7 +387,7 @@ PanGestureInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
|
|||
wheelEvent.mModifiers = this->modifiers;
|
||||
wheelEvent.mTime = mTime;
|
||||
wheelEvent.mTimeStamp = mTimeStamp;
|
||||
wheelEvent.refPoint =
|
||||
wheelEvent.mRefPoint =
|
||||
RoundedToInt(ViewAs<LayoutDevicePixel>(mPanStartPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
wheelEvent.buttons = 0;
|
||||
|
@ -476,7 +476,7 @@ ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent)
|
|||
aWheelEvent.mAllowToOverrideSystemScrollSpeed)
|
||||
{
|
||||
mOrigin =
|
||||
ScreenPoint(ViewAs<ScreenPixel>(aWheelEvent.refPoint,
|
||||
ScreenPoint(ViewAs<ScreenPixel>(aWheelEvent.mRefPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
}
|
||||
|
||||
|
@ -487,7 +487,7 @@ ScrollWheelInput::ToWidgetWheelEvent(nsIWidget* aWidget) const
|
|||
wheelEvent.mModifiers = this->modifiers;
|
||||
wheelEvent.mTime = mTime;
|
||||
wheelEvent.mTimeStamp = mTimeStamp;
|
||||
wheelEvent.refPoint =
|
||||
wheelEvent.mRefPoint =
|
||||
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
wheelEvent.buttons = 0;
|
||||
|
|
|
@ -295,11 +295,10 @@ void
|
|||
PuppetWidget::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
|
||||
{
|
||||
if (nullptr == aPoint) {
|
||||
event.refPoint.x = 0;
|
||||
event.refPoint.y = 0;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
} else {
|
||||
// use the point override if provided
|
||||
event.refPoint = *aPoint;
|
||||
event.mRefPoint = *aPoint;
|
||||
}
|
||||
event.mTime = PR_Now() / 1000;
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ void
|
|||
TextEventDispatcher::InitEvent(WidgetGUIEvent& aEvent) const
|
||||
{
|
||||
aEvent.mTime = PR_IntervalNow();
|
||||
aEvent.refPoint = LayoutDeviceIntPoint(0, 0);
|
||||
aEvent.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
aEvent.mFlags.mIsSynthesizedForTests = IsForTests();
|
||||
if (aEvent.mClass != eCompositionEventClass) {
|
||||
return;
|
||||
|
|
|
@ -628,7 +628,7 @@ public:
|
|||
{
|
||||
NS_ASSERTION(mMessage == eQueryDOMWidgetHittest,
|
||||
"wrong initializer is called");
|
||||
refPoint = aPoint;
|
||||
mRefPoint = aPoint;
|
||||
}
|
||||
|
||||
void RequestFontRanges()
|
||||
|
@ -682,7 +682,7 @@ public:
|
|||
void* mContentsRoot;
|
||||
uint32_t mOffset;
|
||||
// mTentativeCaretOffset is used by only eQueryCharacterAtPoint.
|
||||
// This is the offset where caret would be if user clicked at the refPoint.
|
||||
// This is the offset where caret would be if user clicked at the mRefPoint.
|
||||
uint32_t mTentativeCaretOffset;
|
||||
nsString mString;
|
||||
// mRect is used by eQueryTextRect, eQueryCaretRect, eQueryCharacterAtPoint
|
||||
|
|
|
@ -270,7 +270,7 @@ WidgetEvent::IsAllowedToDispatchDOMEvent() const
|
|||
// DOM events (EventStateManager::PreHandleEvent), but not mousemove
|
||||
// DOM events.
|
||||
// Synthesized button up events also do not cause DOM events because they
|
||||
// do not have a reliable refPoint.
|
||||
// do not have a reliable mRefPoint.
|
||||
return AsMouseEvent()->reason == WidgetMouseEvent::eReal;
|
||||
|
||||
case eWheelEventClass: {
|
||||
|
|
|
@ -732,8 +732,9 @@ AndroidGeckoEvent::MakeMouseEvent(nsIWidget* widget)
|
|||
// in CSS pixels, which we need to convert to LayoutDevice pixels.
|
||||
const LayoutDeviceIntPoint& offset = widget->WidgetToScreenOffset();
|
||||
CSSToLayoutDeviceScale scale = widget->GetDefaultScale();
|
||||
event.refPoint = LayoutDeviceIntPoint((Points()[0].x * scale.scale) - offset.x,
|
||||
(Points()[0].y * scale.scale) - offset.y);
|
||||
event.mRefPoint =
|
||||
LayoutDeviceIntPoint((Points()[0].x * scale.scale) - offset.x,
|
||||
(Points()[0].y * scale.scale) - offset.y);
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -1864,10 +1864,9 @@ void
|
|||
nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
|
||||
{
|
||||
if (aPoint) {
|
||||
event.refPoint = *aPoint;
|
||||
event.mRefPoint = *aPoint;
|
||||
} else {
|
||||
event.refPoint.x = 0;
|
||||
event.refPoint.y = 0;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
}
|
||||
|
||||
event.mTime = PR_Now() / 1000;
|
||||
|
@ -1966,7 +1965,7 @@ nsWindow::OnContextmenuEvent(AndroidGeckoEvent *ae)
|
|||
// Send the contextmenu event.
|
||||
WidgetMouseEvent contextMenuEvent(true, eContextMenu, this,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
contextMenuEvent.refPoint =
|
||||
contextMenuEvent.mRefPoint =
|
||||
RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
|
||||
contextMenuEvent.ignoreRootScrollFrame = true;
|
||||
contextMenuEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
|
@ -2002,7 +2001,7 @@ nsWindow::OnLongTapEvent(AndroidGeckoEvent *ae)
|
|||
WidgetMouseEvent event(true, eMouseLongTap, this,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
event.button = WidgetMouseEvent::eLeftButton;
|
||||
event.refPoint =
|
||||
event.mRefPoint =
|
||||
RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
|
||||
event.clickCount = 1;
|
||||
event.mTime = ae->Time();
|
||||
|
@ -2022,7 +2021,7 @@ nsWindow::DispatchHitTest(const WidgetTouchEvent& aEvent)
|
|||
// highlight element in case the this touchstart is the start of a tap.
|
||||
WidgetMouseEvent hittest(true, eMouseHitTest, this,
|
||||
WidgetMouseEvent::eReal);
|
||||
hittest.refPoint = aEvent.mTouches[0]->mRefPoint;
|
||||
hittest.mRefPoint = aEvent.mTouches[0]->mRefPoint;
|
||||
hittest.ignoreRootScrollFrame = true;
|
||||
hittest.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
nsEventStatus status;
|
||||
|
@ -2142,7 +2141,7 @@ nsWindow::OnNativeGestureEvent(AndroidGeckoEvent *ae)
|
|||
event.delta = delta;
|
||||
event.mModifiers = 0;
|
||||
event.mTime = ae->Time();
|
||||
event.refPoint = pt;
|
||||
event.mRefPoint = pt;
|
||||
|
||||
DispatchEvent(&event);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ SwipeTracker::CreateSwipeGestureEvent(EventMessage aMsg, nsIWidget* aWidget,
|
|||
WidgetSimpleGestureEvent geckoEvent(true, aMsg, aWidget);
|
||||
geckoEvent.mModifiers = 0;
|
||||
geckoEvent.mTimeStamp = TimeStamp::Now();
|
||||
geckoEvent.refPoint = aPosition;
|
||||
geckoEvent.mRefPoint = aPosition;
|
||||
geckoEvent.buttons = 0;
|
||||
return geckoEvent;
|
||||
}
|
||||
|
|
|
@ -913,7 +913,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
|
|||
aKeyEvent.mNativeModifierFlags = [aNativeKeyEvent modifierFlags];
|
||||
}
|
||||
|
||||
aKeyEvent.refPoint = LayoutDeviceIntPoint(0, 0);
|
||||
aKeyEvent.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
aKeyEvent.isChar = false; // XXX not used in XP level
|
||||
|
||||
UInt32 kbType = GetKbdType();
|
||||
|
@ -3562,9 +3562,9 @@ IMEInputHandler::CharacterIndexForPoint(NSPoint& aPoint)
|
|||
WidgetQueryContentEvent charAt(true, eQueryCharacterAtPoint, mWidget);
|
||||
NSPoint ptInWindow = [mainWindow convertScreenToBase:aPoint];
|
||||
NSPoint ptInView = [mView convertPoint:ptInWindow fromView:nil];
|
||||
charAt.refPoint.x =
|
||||
charAt.mRefPoint.x =
|
||||
static_cast<int32_t>(ptInView.x) * mWidget->BackingScaleFactor();
|
||||
charAt.refPoint.y =
|
||||
charAt.mRefPoint.y =
|
||||
static_cast<int32_t>(ptInView.y) * mWidget->BackingScaleFactor();
|
||||
mWidget->DispatchWindowEvent(charAt);
|
||||
if (!charAt.mSucceeded ||
|
||||
|
|
|
@ -4561,7 +4561,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
|
||||
// Check to see if we are double-clicking in the titlebar.
|
||||
CGFloat locationInTitlebar = [[self window] frame].size.height - [theEvent locationInWindow].y;
|
||||
LayoutDeviceIntPoint pos = geckoEvent.refPoint;
|
||||
LayoutDeviceIntPoint pos = geckoEvent.mRefPoint;
|
||||
if (!defaultPrevented && [theEvent clickCount] == 2 &&
|
||||
mGeckoChild->GetDraggableRegion().Contains(pos.x, pos.y) &&
|
||||
[[self window] isKindOfClass:[ToolbarWindow class]] &&
|
||||
|
@ -4590,7 +4590,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
|
||||
EventMessage msg = aEnter ? eMouseEnterIntoWidget : eMouseExitFromWidget;
|
||||
WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal);
|
||||
event.refPoint = mGeckoChild->CocoaPointsToDevPixels(localEventLocation);
|
||||
event.mRefPoint = mGeckoChild->CocoaPointsToDevPixels(localEventLocation);
|
||||
|
||||
event.exit = aType;
|
||||
|
||||
|
@ -5177,7 +5177,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
|
|||
// convert point to view coordinate system
|
||||
NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(aMouseEvent, [self window]);
|
||||
|
||||
outGeckoEvent->refPoint = [self convertWindowCoordinates:locationInWindow];
|
||||
outGeckoEvent->mRefPoint = [self convertWindowCoordinates:locationInWindow];
|
||||
|
||||
WidgetMouseEventBase* mouseEvent = outGeckoEvent->AsMouseEventBase();
|
||||
mouseEvent->buttons = 0;
|
||||
|
@ -5709,7 +5709,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
|
|||
// Convert event from gecko global coords to gecko view coords.
|
||||
NSPoint draggingLoc = [aSender draggingLocation];
|
||||
|
||||
geckoEvent.refPoint = [self convertWindowCoordinates:draggingLoc];
|
||||
geckoEvent.mRefPoint = [self convertWindowCoordinates:draggingLoc];
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
mGeckoChild->DispatchInputEvent(&geckoEvent);
|
||||
|
|
|
@ -2505,7 +2505,7 @@ nsWindow::OnEnterNotifyEvent(GdkEventCrossing *aEvent)
|
|||
WidgetMouseEvent event(true, eMouseEnterIntoWidget, this,
|
||||
WidgetMouseEvent::eReal);
|
||||
|
||||
event.refPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
|
||||
|
||||
LOG(("OnEnterNotify: %p\n", (void *)this));
|
||||
|
@ -2545,7 +2545,7 @@ nsWindow::OnLeaveNotifyEvent(GdkEventCrossing *aEvent)
|
|||
WidgetMouseEvent event(true, eMouseExitFromWidget, this,
|
||||
WidgetMouseEvent::eReal);
|
||||
|
||||
event.refPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
|
||||
|
||||
event.exit = is_top_level_mouse_exit(mGdkWindow, aEvent)
|
||||
|
@ -2615,21 +2615,21 @@ nsWindow::OnMotionNotifyEvent(GdkEventMotion *aEvent)
|
|||
guint modifierState;
|
||||
if (synthEvent) {
|
||||
#ifdef MOZ_X11
|
||||
event.refPoint.x = nscoord(xevent.xmotion.x);
|
||||
event.refPoint.y = nscoord(xevent.xmotion.y);
|
||||
event.mRefPoint.x = nscoord(xevent.xmotion.x);
|
||||
event.mRefPoint.y = nscoord(xevent.xmotion.y);
|
||||
|
||||
modifierState = xevent.xmotion.state;
|
||||
|
||||
event.AssignEventTime(GetWidgetEventTime(xevent.xmotion.time));
|
||||
#else
|
||||
event.refPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
event.mRefPoint = GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
|
||||
|
||||
modifierState = aEvent->state;
|
||||
|
||||
event.AssignEventTime(GetWidgetEventTime(aEvent->time));
|
||||
#endif /* MOZ_X11 */
|
||||
} else {
|
||||
event.refPoint = GetRefPoint(this, aEvent);
|
||||
event.mRefPoint = GetRefPoint(this, aEvent);
|
||||
|
||||
modifierState = aEvent->state;
|
||||
|
||||
|
@ -2697,7 +2697,7 @@ void
|
|||
nsWindow::InitButtonEvent(WidgetMouseEvent& aEvent,
|
||||
GdkEventButton* aGdkEvent)
|
||||
{
|
||||
aEvent.refPoint = GetRefPoint(this, aGdkEvent);
|
||||
aEvent.mRefPoint = GetRefPoint(this, aGdkEvent);
|
||||
|
||||
guint modifierState = aGdkEvent->state;
|
||||
// aEvent's state includes the button state from immediately before this
|
||||
|
@ -3115,7 +3115,7 @@ nsWindow::OnKeyPressEvent(GdkEventKey *aEvent)
|
|||
WidgetMouseEvent::eReal,
|
||||
WidgetMouseEvent::eContextMenuKey);
|
||||
|
||||
contextMenuEvent.refPoint = LayoutDeviceIntPoint(0, 0);
|
||||
contextMenuEvent.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
contextMenuEvent.AssignEventTime(GetWidgetEventTime(aEvent->time));
|
||||
contextMenuEvent.clickCount = 1;
|
||||
KeymapWrapper::InitInputEvent(contextMenuEvent, aEvent->state);
|
||||
|
@ -3222,7 +3222,7 @@ nsWindow::OnScrollEvent(GdkEventScroll *aEvent)
|
|||
break;
|
||||
}
|
||||
|
||||
wheelEvent.refPoint = GetRefPoint(this, aEvent);
|
||||
wheelEvent.mRefPoint = GetRefPoint(this, aEvent);
|
||||
|
||||
KeymapWrapper::InitInputEvent(wheelEvent, aEvent->state);
|
||||
|
||||
|
@ -3380,7 +3380,7 @@ nsWindow::DispatchDragEvent(EventMessage aMsg, const LayoutDeviceIntPoint& aRefP
|
|||
InitDragEvent(event);
|
||||
}
|
||||
|
||||
event.refPoint = aRefPoint;
|
||||
event.mRefPoint = aRefPoint;
|
||||
event.AssignEventTime(GetWidgetEventTime(aTime));
|
||||
|
||||
DispatchInputEvent(&event);
|
||||
|
@ -6570,8 +6570,8 @@ nsWindow::GetDragInfo(WidgetMouseEvent* aMouseEvent,
|
|||
// that the mouse has moved, which is why we use the mouse position
|
||||
// from the event.)
|
||||
LayoutDeviceIntPoint offset = aMouseEvent->mWidget->WidgetToScreenOffset();
|
||||
*aRootX = aMouseEvent->refPoint.x + offset.x;
|
||||
*aRootY = aMouseEvent->refPoint.y + offset.y;
|
||||
*aRootX = aMouseEvent->mRefPoint.x + offset.x;
|
||||
*aRootY = aMouseEvent->mRefPoint.y + offset.y;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ nsBaseDragService::FireDragEventAtSource(EventMessage aEventMessage)
|
|||
WidgetDragEvent event(true, aEventMessage, nullptr);
|
||||
event.inputSource = mInputSource;
|
||||
if (aEventMessage == eDragEnd) {
|
||||
event.refPoint = mEndDragPoint;
|
||||
event.mRefPoint = mEndDragPoint;
|
||||
event.mUserCancelled = mUserCancelled;
|
||||
}
|
||||
|
||||
|
|
|
@ -3037,8 +3037,8 @@ nsBaseWidget::debug_DumpEvent(FILE * aFileOut,
|
|||
(void *) aWidget,
|
||||
aWidgetName,
|
||||
aWindowID,
|
||||
aGuiEvent->refPoint.x,
|
||||
aGuiEvent->refPoint.y);
|
||||
aGuiEvent->mRefPoint.x,
|
||||
aGuiEvent->mRefPoint.y);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////
|
||||
/* static */ void
|
||||
|
|
|
@ -68,7 +68,7 @@ struct ParamTraits<mozilla::WidgetEvent>
|
|||
WriteParam(aMsg,
|
||||
static_cast<mozilla::EventClassIDType>(aParam.mClass));
|
||||
WriteParam(aMsg, aParam.mMessage);
|
||||
WriteParam(aMsg, aParam.refPoint);
|
||||
WriteParam(aMsg, aParam.mRefPoint);
|
||||
WriteParam(aMsg, aParam.mTime);
|
||||
WriteParam(aMsg, aParam.mTimeStamp);
|
||||
WriteParam(aMsg, aParam.mFlags);
|
||||
|
@ -79,7 +79,7 @@ struct ParamTraits<mozilla::WidgetEvent>
|
|||
mozilla::EventClassIDType eventClassID = 0;
|
||||
bool ret = ReadParam(aMsg, aIter, &eventClassID) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mMessage) &&
|
||||
ReadParam(aMsg, aIter, &aResult->refPoint) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mRefPoint) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mTime) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mFlags);
|
||||
|
|
|
@ -944,8 +944,8 @@ static void
|
|||
InitMouseEvent(WidgetMouseEvent& aMouseEvent, QMouseEvent* aEvent,
|
||||
int aClickCount)
|
||||
{
|
||||
aMouseEvent.refPoint.x = nscoord(aEvent->pos().x());
|
||||
aMouseEvent.refPoint.y = nscoord(aEvent->pos().y());
|
||||
aMouseEvent.mRefPoint.x = nscoord(aEvent->pos().x());
|
||||
aMouseEvent.mRefPoint.y = nscoord(aEvent->pos().y());
|
||||
|
||||
aMouseEvent.InitBasicModifiers(aEvent->modifiers() & Qt::ControlModifier,
|
||||
aEvent->modifiers() & Qt::AltModifier,
|
||||
|
@ -1287,8 +1287,8 @@ nsWindow::wheelEvent(QWheelEvent* aEvent)
|
|||
break;
|
||||
}
|
||||
|
||||
wheelEvent.refPoint.x = nscoord(aEvent->pos().x());
|
||||
wheelEvent.refPoint.y = nscoord(aEvent->pos().y());
|
||||
wheelEvent.mRefPoint.x = nscoord(aEvent->pos().x());
|
||||
wheelEvent.mRefPoint.y = nscoord(aEvent->pos().y());
|
||||
|
||||
wheelEvent.InitBasicModifiers(aEvent->modifiers() & Qt::ControlModifier,
|
||||
aEvent->modifiers() & Qt::AltModifier,
|
||||
|
@ -1970,8 +1970,8 @@ nsWindow::ProcessMotionEvent()
|
|||
if (mMoveEvent.needDispatch) {
|
||||
WidgetMouseEvent event(true, eMouseMove, this, WidgetMouseEvent::eReal);
|
||||
|
||||
event.refPoint.x = nscoord(mMoveEvent.pos.x());
|
||||
event.refPoint.y = nscoord(mMoveEvent.pos.y());
|
||||
event.mRefPoint.x = nscoord(mMoveEvent.pos.x());
|
||||
event.mRefPoint.y = nscoord(mMoveEvent.pos.y());
|
||||
|
||||
event.InitBasicModifiers(mMoveEvent.modifiers & Qt::ControlModifier,
|
||||
mMoveEvent.modifiers & Qt::AltModifier,
|
||||
|
|
|
@ -143,7 +143,7 @@ private:
|
|||
WidgetMouseEvent event(true, aType, aWindow,
|
||||
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
|
||||
|
||||
event.refPoint = aPoint;
|
||||
event.mRefPoint = aPoint;
|
||||
event.clickCount = 1;
|
||||
event.button = WidgetMouseEvent::eLeftButton;
|
||||
event.mTime = PR_IntervalNow();
|
||||
|
@ -182,7 +182,7 @@ private:
|
|||
}
|
||||
int id = reinterpret_cast<int>(value);
|
||||
RefPtr<Touch> t = new Touch(id, loc, radius, 0.0f, 1.0f);
|
||||
event.refPoint = loc;
|
||||
event.mRefPoint = loc;
|
||||
event.mTouches.AppendElement(t);
|
||||
}
|
||||
aWindow->DispatchInputEvent(&event);
|
||||
|
|
|
@ -711,11 +711,11 @@ MouseScrollHandler::HandleScrollMessageAsMouseWheelMessage(nsWindowBase* aWidget
|
|||
MOZ_LOG(gMouseScrollLog, LogLevel::Info,
|
||||
("MouseScroll::HandleScrollMessageAsMouseWheelMessage: aWidget=%p, "
|
||||
"aMessage=MOZ_WM_%sSCROLL, aWParam=0x%08X, aLParam=0x%08X, "
|
||||
"wheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %f, "
|
||||
"wheelEvent { mRefPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %f, "
|
||||
"mLineOrPageDeltaX: %d, mLineOrPageDeltaY: %d, "
|
||||
"isShift: %s, isControl: %s, isAlt: %s, isMeta: %s }",
|
||||
aWidget, (aMessage == MOZ_WM_VSCROLL) ? "V" : "H", aWParam, aLParam,
|
||||
wheelEvent.refPoint.x, wheelEvent.refPoint.y,
|
||||
wheelEvent.mRefPoint.x, wheelEvent.mRefPoint.y,
|
||||
wheelEvent.mDeltaX, wheelEvent.mDeltaY,
|
||||
wheelEvent.mLineOrPageDeltaX, wheelEvent.mLineOrPageDeltaY,
|
||||
GetBoolName(wheelEvent.IsShift()),
|
||||
|
@ -896,12 +896,12 @@ MouseScrollHandler::LastEventInfo::InitWheelEvent(
|
|||
|
||||
MOZ_LOG(gMouseScrollLog, LogLevel::Info,
|
||||
("MouseScroll::LastEventInfo::InitWheelEvent: aWidget=%p, "
|
||||
"aWheelEvent { refPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %f, "
|
||||
"aWheelEvent { mRefPoint: { x: %d, y: %d }, mDeltaX: %f, mDeltaY: %f, "
|
||||
"mLineOrPageDeltaX: %d, mLineOrPageDeltaY: %d, "
|
||||
"isShift: %s, isControl: %s, isAlt: %s, isMeta: %s, "
|
||||
"mAllowToOverrideSystemScrollSpeed: %s }, "
|
||||
"mAccumulatedDelta: %d",
|
||||
aWidget, aWheelEvent.refPoint.x, aWheelEvent.refPoint.y,
|
||||
aWidget, aWheelEvent.mRefPoint.x, aWheelEvent.mRefPoint.y,
|
||||
aWheelEvent.mDeltaX, aWheelEvent.mDeltaY,
|
||||
aWheelEvent.mLineOrPageDeltaX, aWheelEvent.mLineOrPageDeltaY,
|
||||
GetBoolName(aWheelEvent.IsShift()),
|
||||
|
|
|
@ -167,11 +167,9 @@ nsNativeDragTarget::DispatchDragDropEvent(EventMessage aEventMessage,
|
|||
|
||||
if (mHWnd != nullptr) {
|
||||
::ScreenToClient(mHWnd, &cpos);
|
||||
event.refPoint.x = cpos.x;
|
||||
event.refPoint.y = cpos.y;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(cpos.x, cpos.y);
|
||||
} else {
|
||||
event.refPoint.x = 0;
|
||||
event.refPoint.y = 0;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
}
|
||||
|
||||
ModifierKeyState modifierKeyState;
|
||||
|
|
|
@ -314,8 +314,7 @@ nsWinGesture::ProcessGestureMessage(HWND hWnd, WPARAM wParam, LPARAM lParam,
|
|||
coord = gi.ptsLocation;
|
||||
coord.ScreenToClient(hWnd);
|
||||
|
||||
evt.refPoint.x = coord.x;
|
||||
evt.refPoint.y = coord.y;
|
||||
evt.mRefPoint = LayoutDeviceIntPoint(coord.x, coord.y);
|
||||
|
||||
// Multiple gesture can occur at the same time so gesture state
|
||||
// info can't be shared.
|
||||
|
@ -568,8 +567,7 @@ nsWinGesture::PanDeltaToPixelScroll(WidgetWheelEvent& aWheelEvent)
|
|||
aWheelEvent.mDeltaX = aWheelEvent.mDeltaY = aWheelEvent.mDeltaZ = 0.0;
|
||||
aWheelEvent.mLineOrPageDeltaX = aWheelEvent.mLineOrPageDeltaY = 0;
|
||||
|
||||
aWheelEvent.refPoint.x = mPanRefPoint.x;
|
||||
aWheelEvent.refPoint.y = mPanRefPoint.y;
|
||||
aWheelEvent.mRefPoint = LayoutDeviceIntPoint(mPanRefPoint.x, mPanRefPoint.y);
|
||||
aWheelEvent.mDeltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
|
||||
aWheelEvent.mScrollType = WidgetWheelEvent::SCROLL_SYNCHRONOUSLY;
|
||||
aWheelEvent.mIsNoLineOrPageDelta = true;
|
||||
|
|
|
@ -1706,7 +1706,7 @@ nsWindow::BeginResizeDrag(WidgetGUIEvent* aEvent,
|
|||
|
||||
// tell Windows to start the resize
|
||||
::PostMessage(toplevelWnd, WM_SYSCOMMAND, syscommand,
|
||||
POINTTOPOINTS(aEvent->refPoint));
|
||||
POINTTOPOINTS(aEvent->mRefPoint));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -3830,15 +3830,13 @@ void nsWindow::InitEvent(WidgetGUIEvent& event, LayoutDeviceIntPoint* aPoint)
|
|||
cpos.y = GET_Y_LPARAM(pos);
|
||||
|
||||
::ScreenToClient(mWnd, &cpos);
|
||||
event.refPoint.x = cpos.x;
|
||||
event.refPoint.y = cpos.y;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(cpos.x, cpos.y);
|
||||
} else {
|
||||
event.refPoint.x = 0;
|
||||
event.refPoint.y = 0;
|
||||
event.mRefPoint = LayoutDeviceIntPoint(0, 0);
|
||||
}
|
||||
} else {
|
||||
// use the point override if provided
|
||||
event.refPoint = *aPoint;
|
||||
event.mRefPoint = *aPoint;
|
||||
}
|
||||
|
||||
event.AssignEventTime(CurrentMessageWidgetEventTime());
|
||||
|
@ -4230,7 +4228,7 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
|
|||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
|
||||
if (rect.Contains(event.refPoint)) {
|
||||
if (rect.Contains(event.mRefPoint)) {
|
||||
if (sCurrentWindow == nullptr || sCurrentWindow != this) {
|
||||
if ((nullptr != sCurrentWindow) && (!sCurrentWindow->mInDtor)) {
|
||||
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
|
||||
|
@ -5667,7 +5665,8 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
|||
touchPoint = gestureinfo->ptsLocation;
|
||||
touchPoint.ScreenToClient(mWnd);
|
||||
WidgetGestureNotifyEvent gestureNotifyEvent(true, eGestureNotify, this);
|
||||
gestureNotifyEvent.refPoint = LayoutDeviceIntPoint::FromUnknownPoint(touchPoint);
|
||||
gestureNotifyEvent.mRefPoint =
|
||||
LayoutDeviceIntPoint::FromUnknownPoint(touchPoint);
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&gestureNotifyEvent, status);
|
||||
mDisplayPanFeedback = gestureNotifyEvent.displayPanFeedback;
|
||||
|
|
Загрузка…
Ссылка в новой задаче