Bug 1259662 part.2 Rename WidgetDragEvent::userCancelled to WidgetDragEvent::mUserCancelled r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 31 Mar 2016 19:06:05 +0900
changeset 330944 a31c3e92f148e297732eceabc01fe5e5df4bacbc
parent 330943 b6cb07fc550f4c4dac9e6fe21251ee0fb8d0f404
child 330945 8772f2293eaba94a6890eadb525711e5d11ebf63
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1259662
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1259662 part.2 Rename WidgetDragEvent::userCancelled to WidgetDragEvent::mUserCancelled r=smaug MozReview-Commit-ID: 1Nx5NssvbM9
dom/base/nsContentUtils.cpp
widget/MouseEvents.h
widget/nsBaseDragService.cpp
widget/nsGUIEventIPC.h
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -5275,17 +5275,17 @@ nsContentUtils::SetDataTransferInEvent(W
   bool isCrossDomainSubFrameDrop = false;
   if (aDragEvent->mMessage == eDrop ||
       aDragEvent->mMessage == eLegacyDragDrop) {
     isCrossDomainSubFrameDrop = CheckForSubFrameDrop(dragSession, aDragEvent);
   }
 
   // each event should use a clone of the original dataTransfer.
   initialDataTransfer->Clone(aDragEvent->target, aDragEvent->mMessage,
-                             aDragEvent->userCancelled,
+                             aDragEvent->mUserCancelled,
                              isCrossDomainSubFrameDrop,
                              getter_AddRefs(aDragEvent->mDataTransfer));
   if (NS_WARN_IF(!aDragEvent->mDataTransfer)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   // for the dragenter and dragover events, initialize the drop effect
   // from the drop action, which platform specific widget code sets before
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -319,26 +319,26 @@ public:
 
 class WidgetDragEvent : public WidgetMouseEvent
 {
 private:
   friend class mozilla::dom::PBrowserParent;
   friend class mozilla::dom::PBrowserChild;
 protected:
   WidgetDragEvent()
-    : userCancelled(false)
+    : mUserCancelled(false)
     , mDefaultPreventedOnContent(false)
   {
   }
 public:
   virtual WidgetDragEvent* AsDragEvent() override { return this; }
 
   WidgetDragEvent(bool aIsTrusted, EventMessage aMessage, nsIWidget* aWidget)
     : WidgetMouseEvent(aIsTrusted, aMessage, aWidget, eDragEventClass, eReal)
-    , userCancelled(false)
+    , mUserCancelled(false)
     , mDefaultPreventedOnContent(false)
   {
     mFlags.mCancelable =
       (aMessage != eDragExit && aMessage != eDragLeave && aMessage != eDragEnd);
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
@@ -350,28 +350,28 @@ public:
     result->mFlags = mFlags;
     return result;
   }
 
   // The dragging data.
   nsCOMPtr<dom::DataTransfer> mDataTransfer;
 
   // If this is true, user has cancelled the drag operation.
-  bool userCancelled;
+  bool mUserCancelled;
   // If this is true, the drag event's preventDefault() is called on content.
   bool mDefaultPreventedOnContent;
 
   // XXX Not tested by test_assign_event_data.html
   void AssignDragEventData(const WidgetDragEvent& aEvent, bool aCopyTargets)
   {
     AssignMouseEventData(aEvent, aCopyTargets);
 
     mDataTransfer = aEvent.mDataTransfer;
-    // XXX userCancelled isn't copied, is this instentionally?
-    userCancelled = false;
+    // XXX mUserCancelled isn't copied, is this intentionally?
+    mUserCancelled = false;
     mDefaultPreventedOnContent = aEvent.mDefaultPreventedOnContent;
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetMouseScrollEvent
  *
  * This is used for legacy DOM mouse scroll events, i.e.,
--- a/widget/nsBaseDragService.cpp
+++ b/widget/nsBaseDragService.cpp
@@ -429,17 +429,17 @@ nsBaseDragService::FireDragEventAtSource
     if (doc) {
       nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
       if (presShell) {
         nsEventStatus status = nsEventStatus_eIgnore;
         WidgetDragEvent event(true, aEventMessage, nullptr);
         event.inputSource = mInputSource;
         if (aEventMessage == eDragEnd) {
           event.refPoint = mEndDragPoint;
-          event.userCancelled = mUserCancelled;
+          event.mUserCancelled = mUserCancelled;
         }
 
         nsCOMPtr<nsIContent> content = do_QueryInterface(mSourceNode);
         return presShell->HandleDOMEventWithTarget(content, &event, &status);
       }
     }
   }
 
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -245,25 +245,25 @@ struct ParamTraits<mozilla::WidgetMouseE
 template<>
 struct ParamTraits<mozilla::WidgetDragEvent>
 {
   typedef mozilla::WidgetDragEvent paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg, static_cast<mozilla::WidgetMouseEvent>(aParam));
-    WriteParam(aMsg, aParam.userCancelled);
+    WriteParam(aMsg, aParam.mUserCancelled);
     WriteParam(aMsg, aParam.mDefaultPreventedOnContent);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
     bool rv =
       ReadParam(aMsg, aIter, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
-      ReadParam(aMsg, aIter, &aResult->userCancelled) &&
+      ReadParam(aMsg, aIter, &aResult->mUserCancelled) &&
       ReadParam(aMsg, aIter, &aResult->mDefaultPreventedOnContent);
     return rv;
   }
 };
 
 template<>
 struct ParamTraits<mozilla::WidgetPointerEvent>
 {