Bug 895274 part.66 Rename NS_FORM_SELECTED to eFormSelect r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 02 Sep 2015 15:08:00 +0900
changeset 260487 932f80808057e731b911c0a8cfd218541a03d324
parent 260486 a4db59edaa15f10f93bbb372cf53224c1ecc6482
child 260488 5653edb7c0f71dfd7444ba15e5f09e4182076f9b
push id29311
push usercbook@mozilla.com
push dateWed, 02 Sep 2015 11:53:18 +0000
treeherdermozilla-central@1b687fcb5213 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.66 Rename NS_FORM_SELECTED to eFormSelect r=smaug
dom/base/FragmentOrElement.cpp
dom/events/Event.cpp
dom/events/EventNameList.h
dom/html/HTMLInputElement.cpp
dom/html/HTMLTextAreaElement.cpp
dom/html/nsTextEditorState.cpp
widget/EventMessageList.h
widget/nsBaseWidget.cpp
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -803,17 +803,17 @@ nsIContent::PreHandleEvent(EventChainPre
     //   reset
     //   resize
     //   scroll
     //   selectstart
     bool stopEvent = false;
     switch (aVisitor.mEvent->mMessage) {
       case eImageAbort:
       case eLoadError:
-      case NS_FORM_SELECTED:
+      case eFormSelect:
       case eFormChange:
       case eLoad:
       case eFormReset:
       case eResize:
       case eScroll:
         stopEvent = true;
         break;
       case NS_USER_DEFINED_EVENT:
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -711,17 +711,17 @@ Event::GetEventPopupControlState(WidgetE
 
   switch(aEvent->mClass) {
   case eBasicEventClass:
     // For these following events only allow popups if they're
     // triggered while handling user input. See
     // nsPresShell::HandleEventInternal() for details.
     if (EventStateManager::IsHandlingUserInput()) {
       switch(aEvent->mMessage) {
-      case NS_FORM_SELECTED :
+      case eFormSelect:
         if (PopupAllowedForEvent("select")) {
           abuse = openControlled;
         }
         break;
       case eFormChange:
         if (PopupAllowedForEvent("change")) {
           abuse = openControlled;
         }
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -381,17 +381,17 @@ EVENT(seeked,
       NS_SEEKED,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(seeking,
       NS_SEEKING,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(select,
-      NS_FORM_SELECTED,
+      eFormSelect,
       EventNameType_HTMLXUL,
       eBasicEventClass)
 EVENT(show,
       NS_SHOW_EVENT,
       EventNameType_HTML,
       eBasicEventClass)
 EVENT(stalled,
       NS_STALLED,
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -2982,17 +2982,17 @@ HTMLInputElement::Select()
 
 bool
 HTMLInputElement::DispatchSelectEvent(nsPresContext* aPresContext)
 {
   nsEventStatus status = nsEventStatus_eIgnore;
 
   // If already handling select event, don't dispatch a second.
   if (!mHandlingSelectEvent) {
-    WidgetEvent event(nsContentUtils::IsCallerChrome(), NS_FORM_SELECTED);
+    WidgetEvent event(nsContentUtils::IsCallerChrome(), eFormSelect);
 
     mHandlingSelectEvent = true;
     EventDispatcher::Dispatch(static_cast<nsIContent*>(this),
                               aPresContext, &event, nullptr, &status);
     mHandlingSelectEvent = false;
   }
 
   // If the DOM event was not canceled (e.g. by a JS event handler
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -132,17 +132,17 @@ HTMLTextAreaElement::Select()
   if (state == eInactiveWindow) {
     if (fm)
       fm->SetFocus(this, nsIFocusManager::FLAG_NOSCROLL);
     SelectAll(presContext);
     return NS_OK;
   }
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  WidgetGUIEvent event(true, NS_FORM_SELECTED, nullptr);
+  WidgetGUIEvent event(true, eFormSelect, nullptr);
   // XXXbz HTMLInputElement guards against this reentering; shouldn't we?
   EventDispatcher::Dispatch(static_cast<nsIContent*>(this), presContext,
                             &event, nullptr, &status);
 
   // If the DOM event was not canceled (e.g. by a JS event handler
   // returning false)
   if (status == nsEventStatus_eIgnore) {
     if (fm) {
@@ -481,17 +481,17 @@ HTMLTextAreaElement::PreHandleEvent(Even
 {
   aVisitor.mCanHandle = false;
   if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   // Don't dispatch a second select event if we are already handling
   // one.
-  if (aVisitor.mEvent->mMessage == NS_FORM_SELECTED) {
+  if (aVisitor.mEvent->mMessage == eFormSelect) {
     if (mHandlingSelect) {
       return NS_OK;
     }
     mHandlingSelect = true;
   }
 
   // If noContentDispatch is true we will not allow content to handle
   // this event.  But to allow middle mouse button paste to work we must allow 
@@ -529,17 +529,17 @@ HTMLTextAreaElement::FireChangeEventIfNe
                                        static_cast<nsIContent*>(this),
                                        NS_LITERAL_STRING("change"), true,
                                        false);
 }
 
 nsresult
 HTMLTextAreaElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
-  if (aVisitor.mEvent->mMessage == NS_FORM_SELECTED) {
+  if (aVisitor.mEvent->mMessage == eFormSelect) {
     mHandlingSelect = false;
   }
 
   if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
       aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
     if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
       // If the invalid UI is shown, we should show it while focusing (and
       // update). Otherwise, we should not.
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -814,17 +814,17 @@ nsTextInputListener::NotifySelectionChan
     {
       nsCOMPtr<nsIDocument> doc = content->GetComposedDoc();
       if (doc) 
       {
         nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
         if (presShell) 
         {
           nsEventStatus status = nsEventStatus_eIgnore;
-          WidgetEvent event(true, NS_FORM_SELECTED);
+          WidgetEvent event(true, eFormSelect);
 
           presShell->HandleEventWithTarget(&event, mFrame, content, &status);
         }
       }
     }
   }
 
   // if the collapsed state did not change, don't fire notifications
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -88,17 +88,17 @@ NS_EVENT_MESSAGE(eLoadError,            
 NS_EVENT_MESSAGE(ePopState,             eStreamEventFirst + 5)
 NS_EVENT_MESSAGE(eBeforeUnload,         eStreamEventFirst + 6)
 NS_EVENT_MESSAGE(eReadyStateChange,     eStreamEventFirst + 8)
  
 NS_EVENT_MESSAGE(eFormEventFirst,       1200)
 NS_EVENT_MESSAGE(eFormSubmit,           eFormEventFirst)
 NS_EVENT_MESSAGE(eFormReset,            eFormEventFirst + 1)
 NS_EVENT_MESSAGE(eFormChange,           eFormEventFirst + 2)
-NS_EVENT_MESSAGE(NS_FORM_SELECTED,      eFormEventFirst + 3)
+NS_EVENT_MESSAGE(eFormSelect,           eFormEventFirst + 3)
 NS_EVENT_MESSAGE(NS_FORM_INVALID,       eFormEventFirst + 4)
 
 //Need separate focus/blur notifications for non-native widgets
 NS_EVENT_MESSAGE(NS_FOCUS_EVENT_START,  1300)
 NS_EVENT_MESSAGE(NS_FOCUS_CONTENT,      NS_FOCUS_EVENT_START)
 NS_EVENT_MESSAGE(NS_BLUR_CONTENT,       NS_FOCUS_EVENT_START + 1)
 
 NS_EVENT_MESSAGE(NS_DRAGDROP_EVENT_START, 1400)
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -2634,17 +2634,17 @@ case _value: eventName.AssignLiteral(_na
     _ASSIGN_eventName(NS_BLUR_CONTENT,"NS_BLUR_CONTENT");
     _ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE");
     _ASSIGN_eventName(NS_DRAGDROP_DROP,"NS_DND_DROP");
     _ASSIGN_eventName(NS_DRAGDROP_ENTER,"NS_DND_ENTER");
     _ASSIGN_eventName(NS_DRAGDROP_EXIT,"NS_DND_EXIT");
     _ASSIGN_eventName(NS_DRAGDROP_OVER,"NS_DND_OVER");
     _ASSIGN_eventName(NS_EDITOR_INPUT,"NS_EDITOR_INPUT");
     _ASSIGN_eventName(NS_FOCUS_CONTENT,"NS_FOCUS_CONTENT");
-    _ASSIGN_eventName(NS_FORM_SELECTED,"NS_FORM_SELECTED");
+    _ASSIGN_eventName(eFormSelect,"eFormSelect");
     _ASSIGN_eventName(eFormChange,"eFormChange");
     _ASSIGN_eventName(eFormReset,"eFormReset");
     _ASSIGN_eventName(eFormSubmit,"eFormSubmit");
     _ASSIGN_eventName(eImageAbort,"eImageAbort");
     _ASSIGN_eventName(eLoadError,"eLoadError");
     _ASSIGN_eventName(eKeyDown,"eKeyDown");
     _ASSIGN_eventName(eKeyPress,"eKeyPress");
     _ASSIGN_eventName(eKeyUp,"eKeyUp");