Bug 1259661 part.8 Rename WidgetMouseEvent::ignoreRootScrollFrame to WidgetMouseEvent::mIgnoreRootScrollFrame r?smaug
MozReview-Commit-ID: 98G9UMv4qqj
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -7788,17 +7788,17 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<
event.mTime = PR_IntervalNow();
event.mFlags.mIsSynthesizedForTests = aIsSynthesized;
nsPresContext* presContext = aPresShell->GetPresContext();
if (!presContext)
return NS_ERROR_FAILURE;
event.mRefPoint = ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
- event.ignoreRootScrollFrame = aIgnoreRootScrollFrame;
+ event.mIgnoreRootScrollFrame = aIgnoreRootScrollFrame;
nsEventStatus status = nsEventStatus_eIgnore;
if (aToWindow) {
nsCOMPtr<nsIPresShell> presShell;
nsView* view = GetViewToDispatchEvent(presContext, getter_AddRefs(presShell));
if (!presShell || !view) {
return NS_ERROR_FAILURE;
}
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -689,17 +689,17 @@ nsDOMWindowUtils::SendPointerEventCommon
nsPresContext* presContext = GetPresContext();
if (!presContext) {
return NS_ERROR_FAILURE;
}
event.mRefPoint =
nsContentUtils::ToWidgetPoint(CSSPoint(aX, aY), offset, presContext);
- event.ignoreRootScrollFrame = aIgnoreRootScrollFrame;
+ event.mIgnoreRootScrollFrame = aIgnoreRootScrollFrame;
nsEventStatus status;
if (aToWindow) {
nsCOMPtr<nsIPresShell> presShell;
nsView* view = nsContentUtils::GetViewToDispatchEvent(presContext, getter_AddRefs(presShell));
if (!presShell || !view) {
return NS_ERROR_FAILURE;
}
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -482,17 +482,17 @@ APZCCallbackHelper::DispatchSynthesizedM
aMsg == eMouseUp || aMsg == eMouseLongTap);
WidgetMouseEvent event(true, aMsg, aWidget,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
event.mRefPoint = LayoutDeviceIntPoint(aRefPoint.x, aRefPoint.y);
event.mTime = aTime;
event.button = WidgetMouseEvent::eLeftButton;
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
- event.ignoreRootScrollFrame = true;
+ event.mIgnoreRootScrollFrame = true;
if (aMsg != eMouseMove) {
event.clickCount = 1;
}
event.mModifiers = aModifiers;
return DispatchWidgetEvent(event);
}
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7663,17 +7663,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
touch->SetTarget(oldTouch->mTarget);
}
}
}
} else {
eventPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, frame);
}
if (mouseEvent && mouseEvent->mClass == eMouseEventClass &&
- mouseEvent->ignoreRootScrollFrame) {
+ mouseEvent->mIgnoreRootScrollFrame) {
flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
}
nsIFrame* target =
FindFrameTargetedByInputEvent(aEvent, frame, eventPoint, flags);
if (target) {
frame = target;
}
}
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -158,17 +158,17 @@ MouseInput::ToWidgetMouseEvent(nsIWidget
event.mModifiers = modifiers;
event.mTime = mTime;
event.mTimeStamp = mTimeStamp;
event.mRefPoint =
RoundedToInt(ViewAs<LayoutDevicePixel>(mOrigin,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
event.clickCount = clickCount;
event.inputSource = mInputSource;
- event.ignoreRootScrollFrame = true;
+ event.mIgnoreRootScrollFrame = true;
return event;
}
MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
: InputData(MULTITOUCH_INPUT, aTouchEvent.mTime, aTouchEvent.mTimeStamp,
aTouchEvent.mModifiers)
, mHandledByAPZ(aTouchEvent.mFlags.mHandledByAPZ)
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -202,45 +202,45 @@ public:
eTopLevel
};
protected:
WidgetMouseEvent()
: mReason(eReal)
, mContextMenuTrigger(eNormal)
, mExitFrom(eChild)
- , ignoreRootScrollFrame(false)
+ , mIgnoreRootScrollFrame(false)
, clickCount(0)
{
}
WidgetMouseEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget,
EventClassID aEventClassID, Reason aReason)
: WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, aEventClassID)
, mReason(aReason)
, mContextMenuTrigger(eNormal)
, mExitFrom(eChild)
- , ignoreRootScrollFrame(false)
+ , mIgnoreRootScrollFrame(false)
, clickCount(0)
{
}
public:
virtual WidgetMouseEvent* AsMouseEvent() override { return this; }
WidgetMouseEvent(bool aIsTrusted,
EventMessage aMessage,
nsIWidget* aWidget,
Reason aReason,
ContextMenuTrigger aContextMenuTrigger = eNormal)
: WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, eMouseEventClass)
, mReason(aReason)
, mContextMenuTrigger(aContextMenuTrigger)
, mExitFrom(eChild)
- , ignoreRootScrollFrame(false)
+ , mIgnoreRootScrollFrame(false)
, clickCount(0)
{
if (aMessage == eContextMenu) {
button = (mContextMenuTrigger == eNormal) ? eRightButton : eLeftButton;
}
}
#ifdef DEBUG
@@ -269,27 +269,27 @@ public:
Reason mReason;
ContextMenuTrigger mContextMenuTrigger;
ExitFrom mExitFrom;
// Whether the event should ignore scroll frame bounds during dispatch.
- bool ignoreRootScrollFrame;
+ bool mIgnoreRootScrollFrame;
/// The number of mouse clicks.
uint32_t clickCount;
void AssignMouseEventData(const WidgetMouseEvent& aEvent, bool aCopyTargets)
{
AssignMouseEventBaseData(aEvent, aCopyTargets);
AssignPointerHelperData(aEvent);
- ignoreRootScrollFrame = aEvent.ignoreRootScrollFrame;
+ mIgnoreRootScrollFrame = aEvent.mIgnoreRootScrollFrame;
clickCount = aEvent.clickCount;
}
/**
* Returns true if the event is a context menu event caused by key.
*/
bool IsContextMenuKeyEvent() const
{
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1965,17 +1965,17 @@ nsWindow::OnContextmenuEvent(AndroidGeck
pt = CSSPoint(points[0].x, points[0].y);
}
// Send the contextmenu event.
WidgetMouseEvent contextMenuEvent(true, eContextMenu, this,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
contextMenuEvent.mRefPoint =
RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
- contextMenuEvent.ignoreRootScrollFrame = true;
+ contextMenuEvent.mIgnoreRootScrollFrame = true;
contextMenuEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
nsEventStatus contextMenuStatus;
DispatchEvent(&contextMenuEvent, contextMenuStatus);
// If the contextmenu event was consumed (preventDefault issued), we follow with a
// touchcancel event. This avoids followup touchend events passsing through and
// triggering further element behaviour such as link-clicks.
@@ -2004,33 +2004,33 @@ nsWindow::OnLongTapEvent(AndroidGeckoEve
WidgetMouseEvent event(true, eMouseLongTap, this,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
event.button = WidgetMouseEvent::eLeftButton;
event.mRefPoint =
RoundedToInt(pt * GetDefaultScale()) - WidgetToScreenOffset();
event.clickCount = 1;
event.mTime = ae->Time();
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
- event.ignoreRootScrollFrame = true;
+ event.mIgnoreRootScrollFrame = true;
DispatchEvent(&event);
}
void
nsWindow::DispatchHitTest(const WidgetTouchEvent& aEvent)
{
if (aEvent.mMessage == eTouchStart && aEvent.mTouches.Length() == 1) {
// Since touch events don't get retargeted by PositionedEventTargeting.cpp
// code on Fennec, we dispatch a dummy mouse event that *does* get
// retargeted. The Fennec browser.js code can use this to activate the
// highlight element in case the this touchstart is the start of a tap.
WidgetMouseEvent hittest(true, eMouseHitTest, this,
WidgetMouseEvent::eReal);
hittest.mRefPoint = aEvent.mTouches[0]->mRefPoint;
- hittest.ignoreRootScrollFrame = true;
+ hittest.mIgnoreRootScrollFrame = true;
hittest.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
nsEventStatus status;
DispatchEvent(&hittest, status);
if (mAPZEventState && hittest.hitCluster) {
mAPZEventState->ProcessClusterHit();
}
}
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -225,33 +225,33 @@ struct ParamTraits<mozilla::WidgetWheelE
template<>
struct ParamTraits<mozilla::WidgetMouseEvent>
{
typedef mozilla::WidgetMouseEvent paramType;
static void Write(Message* aMsg, const paramType& aParam)
{
WriteParam(aMsg, static_cast<mozilla::WidgetMouseEventBase>(aParam));
- WriteParam(aMsg, aParam.ignoreRootScrollFrame);
+ WriteParam(aMsg, aParam.mIgnoreRootScrollFrame);
WriteParam(aMsg, static_cast<paramType::ReasonType>(aParam.mReason));
WriteParam(aMsg, static_cast<paramType::ContextMenuTriggerType>(
aParam.mContextMenuTrigger));
WriteParam(aMsg, static_cast<paramType::ExitFromType>(aParam.mExitFrom));
WriteParam(aMsg, aParam.clickCount);
}
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
{
bool rv;
paramType::ReasonType reason = 0;
paramType::ContextMenuTriggerType contextMenuTrigger = 0;
paramType::ExitFromType exitFrom = 0;
rv = ReadParam(aMsg, aIter,
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
- ReadParam(aMsg, aIter, &aResult->ignoreRootScrollFrame) &&
+ ReadParam(aMsg, aIter, &aResult->mIgnoreRootScrollFrame) &&
ReadParam(aMsg, aIter, &reason) &&
ReadParam(aMsg, aIter, &contextMenuTrigger) &&
ReadParam(aMsg, aIter, &exitFrom) &&
ReadParam(aMsg, aIter, &aResult->clickCount);
aResult->mReason = static_cast<paramType::Reason>(reason);
aResult->mContextMenuTrigger =
static_cast<paramType::ContextMenuTrigger>(contextMenuTrigger);
aResult->mExitFrom = static_cast<paramType::ExitFrom>(exitFrom);