Bug 1259669 Rename WidgetCommandEvent::command to WidgetCommandEvent::mCommand r=masayuki draft
authorTakahiro <hogehoge@gachapin.jp>
Sun, 17 Apr 2016 12:07:23 -0700
changeset 354180 7df5bbeb3a03cb5261e61c04a0ed5889d019a3eb
parent 350969 10f66b3164570b2183333262fa91a16004cbb908
child 518918 2bda9d57c75b652164bc8fcc1c68ee3800ebd687
push id15985
push userbmo:hogehoge@gachapin.jp
push dateWed, 20 Apr 2016 06:40:45 +0000
reviewersmasayuki
bugs1259669
milestone48.0a1
Bug 1259669 Rename WidgetCommandEvent::command to WidgetCommandEvent::mCommand r=masayuki MozReview-Commit-ID: 4ZjhCsPOcBN
dom/events/CommandEvent.cpp
widget/MiscEvents.h
--- a/dom/events/CommandEvent.cpp
+++ b/dom/events/CommandEvent.cpp
@@ -31,34 +31,34 @@ NS_INTERFACE_MAP_BEGIN(CommandEvent)
 NS_INTERFACE_MAP_END_INHERITING(Event)
 
 NS_IMPL_ADDREF_INHERITED(CommandEvent, Event)
 NS_IMPL_RELEASE_INHERITED(CommandEvent, Event)
 
 NS_IMETHODIMP
 CommandEvent::GetCommand(nsAString& aCommand)
 {
-  nsIAtom* command = mEvent->AsCommandEvent()->command;
+  nsIAtom* command = mEvent->AsCommandEvent()->mCommand;
   if (command) {
     command->ToString(aCommand);
   } else {
     aCommand.Truncate();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CommandEvent::InitCommandEvent(const nsAString& aTypeArg,
                                bool aCanBubbleArg,
                                bool aCancelableArg,
                                const nsAString& aCommand)
 {
   Event::InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg);
 
-  mEvent->AsCommandEvent()->command = NS_Atomize(aCommand);
+  mEvent->AsCommandEvent()->mCommand = NS_Atomize(aCommand);
   return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
 
 using namespace mozilla;
 using namespace mozilla::dom;
--- a/widget/MiscEvents.h
+++ b/widget/MiscEvents.h
@@ -105,42 +105,42 @@ class WidgetCommandEvent : public Widget
 {
 public:
   virtual WidgetCommandEvent* AsCommandEvent() override { return this; }
 
   WidgetCommandEvent(bool aIsTrusted, nsIAtom* aEventType,
                      nsIAtom* aCommand, nsIWidget* aWidget)
     : WidgetGUIEvent(aIsTrusted, eUnidentifiedEvent, aWidget,
                      eCommandEventClass)
-    , command(aCommand)
+    , mCommand(aCommand)
   {
     userType = aEventType;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eCommandEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetCommandEvent* result =
-      new WidgetCommandEvent(false, userType, command, nullptr);
+      new WidgetCommandEvent(false, userType, mCommand, nullptr);
     result->AssignCommandEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
-  nsCOMPtr<nsIAtom> command;
+  nsCOMPtr<nsIAtom> mCommand;
 
   // XXX Not tested by test_assign_event_data.html
   void AssignCommandEventData(const WidgetCommandEvent& aEvent,
                               bool aCopyTargets)
   {
     AssignGUIEventData(aEvent, aCopyTargets);
 
-    // command must have been initialized with the constructor.
+    // mCommand must have been initialized with the constructor.
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetPluginEvent
  *
  * This event delivers only a native event to focused plugin.
  ******************************************************************************/