Bug 1259671 part.5 Rename InternalScrollPortEvent::orient to InternalScrollPortEvent::mOrient r?smaug draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 30 Mar 2016 17:48:23 +0900
changeset 346178 1972e2c2fa322a302cb08720038df0545d533fad
parent 346177 d041969bb0ebf90835399df69827361b80a14ebf
child 346179 bf201bd20127533dbc9e4b80e3458cb125aed212
push id14266
push usermasayuki@d-toybox.com
push dateThu, 31 Mar 2016 06:03:50 +0000
reviewerssmaug
bugs1259671
milestone48.0a1
Bug 1259671 part.5 Rename InternalScrollPortEvent::orient to InternalScrollPortEvent::mOrient r?smaug MozReview-Commit-ID: HHWPSAeeaPr
dom/events/UIEvent.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
widget/ContentEvents.h
--- a/dom/events/UIEvent.cpp
+++ b/dom/events/UIEvent.cpp
@@ -52,17 +52,17 @@ UIEvent::UIEvent(EventTarget* aOwner,
     {
       mDetail = mEvent->AsUIEvent()->mDetail;
       break;
     }
 
     case eScrollPortEventClass:
     {
       InternalScrollPortEvent* scrollEvent = mEvent->AsScrollPortEvent();
-      mDetail = (int32_t)scrollEvent->orient;
+      mDetail = static_cast<int32_t>(scrollEvent->mOrient);
       break;
     }
 
     default:
       mDetail = 0;
       break;
   }
 
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -4139,17 +4139,17 @@ ScrollFrameHelper::FireScrollPortEvent()
     orient = InternalScrollPortEvent::eHorizontal;
     mHorizontalOverflow = newHorizontalOverflow;
   }
 
   InternalScrollPortEvent event(true,
     (orient == InternalScrollPortEvent::eHorizontal ? mHorizontalOverflow :
                                                       mVerticalOverflow) ?
     eScrollPortOverflow : eScrollPortUnderflow, nullptr);
-  event.orient = orient;
+  event.mOrient = orient;
   return EventDispatcher::Dispatch(mOuter->GetContent(),
                                    mOuter->PresContext(), &event);
 }
 
 void
 ScrollFrameHelper::ReloadChildFrames()
 {
   mScrolledFrame = nullptr;
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -914,25 +914,25 @@ nsTreeBodyFrame::CheckOverflow(const Scr
   RefPtr<nsPresContext> presContext = PresContext();
   nsCOMPtr<nsIPresShell> presShell = presContext->GetPresShell();
   nsCOMPtr<nsIContent> content = mContent;
 
   if (verticalOverflowChanged) {
     InternalScrollPortEvent event(true,
       mVerticalOverflow ? eScrollPortOverflow : eScrollPortUnderflow,
       nullptr);
-    event.orient = InternalScrollPortEvent::eVertical;
+    event.mOrient = InternalScrollPortEvent::eVertical;
     EventDispatcher::Dispatch(content, presContext, &event);
   }
 
   if (horizontalOverflowChanged) {
     InternalScrollPortEvent event(true,
       mHorizontalOverflow ? eScrollPortOverflow : eScrollPortUnderflow,
       nullptr);
-    event.orient = InternalScrollPortEvent::eHorizontal;
+    event.mOrient = InternalScrollPortEvent::eHorizontal;
     EventDispatcher::Dispatch(content, presContext, &event);
   }
 
   // The synchronous event dispatch above can trigger reflow notifications.
   // Flush those explicitly now, so that we can guard against potential infinite
   // recursion. See bug 905909.
   if (!weakFrame.IsAlive()) {
     return;
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -36,40 +36,40 @@ public:
     eVertical,
     eHorizontal,
     eBoth
   };
 
   InternalScrollPortEvent(bool aIsTrusted, EventMessage aMessage,
                           nsIWidget* aWidget)
     : WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eScrollPortEventClass)
-    , orient(eVertical)
+    , mOrient(eVertical)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eScrollPortEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     InternalScrollPortEvent* result =
       new InternalScrollPortEvent(false, mMessage, nullptr);
     result->AssignScrollPortEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
-  OrientType orient;
+  OrientType mOrient;
 
   void AssignScrollPortEventData(const InternalScrollPortEvent& aEvent,
                                  bool aCopyTargets)
   {
     AssignGUIEventData(aEvent, aCopyTargets);
 
-    orient = aEvent.orient;
+    mOrient = aEvent.mOrient;
   }
 };
 
 /******************************************************************************
  * mozilla::InternalScrollPortEvent
  ******************************************************************************/
 
 class InternalScrollAreaEvent : public WidgetGUIEvent