Bug 1278014 part.11 Rename SelectionType::SELECTION_ACCESSIBILITY to SelectionType::eAccessibility r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 09 Jun 2016 20:32:36 +0900
changeset 377784 601d00411494fb3823a7b4930113f81ef66631e8
parent 377783 6e5f5c83523f1ed2612d0b1d09e2225dd2ff7fdd
child 377785 524e2f692ac2d9d2c4babd69934b8e4bda98c3a1
push id20857
push userbmo:james@hoppipolla.co.uk
push dateSun, 12 Jun 2016 16:59:39 +0000
reviewerssmaug
bugs1278014
milestone50.0a1
Bug 1278014 part.11 Rename SelectionType::SELECTION_ACCESSIBILITY to SelectionType::eAccessibility r=smaug MozReview-Commit-ID: 2nU4KQB5S7N
dom/base/nsISelectionController.idl
layout/generic/nsSelection.cpp
--- a/dom/base/nsISelectionController.idl
+++ b/dom/base/nsISelectionController.idl
@@ -288,18 +288,17 @@ enum class SelectionType : RawSelectionT
   eNone = nsISelectionController::SELECTION_NONE,
   eNormal = nsISelectionController::SELECTION_NORMAL,
   eSpellCheck = nsISelectionController::SELECTION_SPELLCHECK,
   eIMERawClause = nsISelectionController::SELECTION_IME_RAWINPUT,
   eIMESelectedRawClause = nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT,
   eIMEConvertedClause = nsISelectionController::SELECTION_IME_CONVERTEDTEXT,
   eIMESelectedClause =
     nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT,
-  SELECTION_ACCESSIBILITY =
-    nsISelectionController::SELECTION_ACCESSIBILITY,
+  eAccessibility = nsISelectionController::SELECTION_ACCESSIBILITY,
   SELECTION_FIND = nsISelectionController::SELECTION_FIND,
   SELECTION_URLSECONDARY = nsISelectionController::SELECTION_URLSECONDARY,
   SELECTION_URLSTRIKEOUT = nsISelectionController::SELECTION_URLSTRIKEOUT,
 };
 
 // Using anonymous enum to define constants because these constants may be
 // used at defining fixed size array in some header files (e.g.,
 // nsFrameSelection.h).  So, the values needs to be defined here, but we cannot
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -124,17 +124,17 @@ ToChar(SelectionType aSelectionType)
     case SelectionType::eIMERawClause:
       return "SelectionType::eIMERawClause";
     case SelectionType::eIMESelectedRawClause:
       return "SelectionType::eIMESelectedRawClause";
     case SelectionType::eIMEConvertedClause:
       return "SelectionType::eIMEConvertedClause";
     case SelectionType::eIMESelectedClause:
       return "SelectionType::eIMESelectedClause";
-    case SelectionType::SELECTION_ACCESSIBILITY:
+    case SelectionType::eAccessibility:
       return "SelectionType::eAccessibility";
     case SelectionType::SELECTION_FIND:
       return "SelectionType::eFind";
     case SelectionType::SELECTION_URLSECONDARY:
       return "SelectionType::eURLSecondary";
     case SelectionType::SELECTION_URLSTRIKEOUT:
       return "SelectionType::eURLStrikeout";
     default:
@@ -148,17 +148,17 @@ IsValidSelectionType(RawSelectionType aR
   switch (static_cast<SelectionType>(aRawSelectionType)) {
     case SelectionType::eNone:
     case SelectionType::eNormal:
     case SelectionType::eSpellCheck:
     case SelectionType::eIMERawClause:
     case SelectionType::eIMESelectedRawClause:
     case SelectionType::eIMEConvertedClause:
     case SelectionType::eIMESelectedClause:
-    case SelectionType::SELECTION_ACCESSIBILITY:
+    case SelectionType::eAccessibility:
     case SelectionType::SELECTION_FIND:
     case SelectionType::SELECTION_URLSECONDARY:
     case SelectionType::SELECTION_URLSTRIKEOUT:
       return true;
     default:
       return false;
   }
 }
@@ -358,17 +358,17 @@ GetIndexFromSelectionType(SelectionType 
     case SelectionType::eIMERawClause:
       return 2;
     case SelectionType::eIMESelectedRawClause:
       return 3;
     case SelectionType::eIMEConvertedClause:
       return 4;
     case SelectionType::eIMESelectedClause:
       return 5;
-    case SelectionType::SELECTION_ACCESSIBILITY:
+    case SelectionType::eAccessibility:
       return 6;
     case SelectionType::SELECTION_FIND:
       return 7;
     case SelectionType::SELECTION_URLSECONDARY:
       return 8;
     case SelectionType::SELECTION_URLSTRIKEOUT:
       return 9;
     default:
@@ -382,17 +382,17 @@ GetSelectionTypeFromIndex(int8_t aIndex)
 {
   static const SelectionType kSelectionTypes[] = {
     SelectionType::eNormal,
     SelectionType::eSpellCheck,
     SelectionType::eIMERawClause,
     SelectionType::eIMESelectedRawClause,
     SelectionType::eIMEConvertedClause,
     SelectionType::eIMESelectedClause,
-    SelectionType::SELECTION_ACCESSIBILITY,
+    SelectionType::eAccessibility,
     SelectionType::SELECTION_FIND,
     SelectionType::SELECTION_URLSECONDARY,
     SelectionType::SELECTION_URLSTRIKEOUT
   };
   if (NS_WARN_IF(aIndex < 0) ||
       NS_WARN_IF(static_cast<size_t>(aIndex) >= ArrayLength(kSelectionTypes))) {
     return SelectionType::eNormal;
   }