Bug 1278014 part.4 Rename SelectionType::SELECTION_NONE to SelectionType::eNone r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 09 Jun 2016 18:07:18 +0900
changeset 343734 0e9c5aa89d704796898a42cdc88eba60b32091d0
parent 343733 5f3b2e3894087f757af4fed0d46443d7524b29c0
child 343735 5a29531874b52d8654b000d7de5e3b71b9af84fa
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1278014
milestone50.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 1278014 part.4 Rename SelectionType::SELECTION_NONE to SelectionType::eNone r=smaug MozReview-Commit-ID: BRfzs8sColP
dom/base/nsISelectionController.idl
layout/generic/nsSelection.cpp
layout/generic/nsTextFrame.cpp
--- a/dom/base/nsISelectionController.idl
+++ b/dom/base/nsISelectionController.idl
@@ -280,17 +280,17 @@ interface nsISelectionController : nsISe
    { 0xb6, 0xf9, 0x0b, 0x8a, 0xe4, 0x37, 0x2a, 0x3b }}
 
 namespace mozilla {
 
 typedef short RawSelectionType;
 enum class SelectionType : RawSelectionType
 {
   eInvalid = -1,
-  SELECTION_NONE = nsISelectionController::SELECTION_NONE,
+  eNone = nsISelectionController::SELECTION_NONE,
   SELECTION_NORMAL = nsISelectionController::SELECTION_NORMAL,
   SELECTION_SPELLCHECK = nsISelectionController::SELECTION_SPELLCHECK,
   SELECTION_IME_RAWINPUT = nsISelectionController::SELECTION_IME_RAWINPUT,
   SELECTION_IME_SELECTEDRAWTEXT =
     nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT,
   SELECTION_IME_CONVERTEDTEXT =
     nsISelectionController::SELECTION_IME_CONVERTEDTEXT,
   SELECTION_IME_SELECTEDCONVERTEDTEXT =
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -110,17 +110,17 @@ static void printRange(nsRange *aDomRang
 namespace mozilla {
 
 const char*
 ToChar(SelectionType aSelectionType)
 {
   switch (aSelectionType) {
     case SelectionType::eInvalid:
       return "SelectionType::eInvalid";
-    case SelectionType::SELECTION_NONE:
+    case SelectionType::eNone:
       return "SelectionType::eNone";
     case SelectionType::SELECTION_NORMAL:
       return "SelectionType::eNormal";
     case SelectionType::SELECTION_SPELLCHECK:
       return "SelectionType::eSpellCheck";
     case SelectionType::SELECTION_IME_RAWINPUT:
       return "SelectionType::eIMERawClause";
     case SelectionType::SELECTION_IME_SELECTEDRAWTEXT:
@@ -141,17 +141,17 @@ ToChar(SelectionType aSelectionType)
       return "Invalid SelectionType";
   }
 }
 
 static bool
 IsValidSelectionType(RawSelectionType aRawSelectionType)
 {
   switch (static_cast<SelectionType>(aRawSelectionType)) {
-    case SelectionType::SELECTION_NONE:
+    case SelectionType::eNone:
     case SelectionType::SELECTION_NORMAL:
     case SelectionType::SELECTION_SPELLCHECK:
     case SelectionType::SELECTION_IME_RAWINPUT:
     case SelectionType::SELECTION_IME_SELECTEDRAWTEXT:
     case SelectionType::SELECTION_IME_CONVERTEDTEXT:
     case SelectionType::SELECTION_IME_SELECTEDCONVERTEDTEXT:
     case SelectionType::SELECTION_ACCESSIBILITY:
     case SelectionType::SELECTION_FIND:
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5777,17 +5777,17 @@ bool SelectionIterator::GetNextSegment(g
     return false;
   
   // save offset into transformed string now
   uint32_t runOffset = mIterator.GetSkippedOffset();
   
   uint32_t index = mIterator.GetOriginalOffset() - mOriginalRange.start;
   SelectionDetails* sdptr = mSelectionDetails[index];
   SelectionType selectionType =
-    sdptr ? sdptr->mSelectionType : SelectionType::SELECTION_NONE;
+    sdptr ? sdptr->mSelectionType : SelectionType::eNone;
   TextRangeStyle style;
   if (sdptr) {
     style = sdptr->mTextRangeStyle;
   }
   for (++index; index < mOriginalRange.Length(); ++index) {
     if (sdptr != mSelectionDetails[index])
       break;
   }
@@ -6287,22 +6287,22 @@ nsTextFrame::GetCaretColorAt(int32_t aOf
       isSolidTextColor = false;
     }
   }
 
   nsTextPaintStyle textPaintStyle(this);
   textPaintStyle.SetResolveColors(isSolidTextColor);
   SelectionDetails* details = GetSelectionDetails();
   SelectionDetails* sdptr = details;
-  SelectionType selectionType = SelectionType::SELECTION_NONE;
+  SelectionType selectionType = SelectionType::eNone;
   while (sdptr) {
     int32_t start = std::max(0, sdptr->mStart - contentOffset);
     int32_t end = std::min(contentLength, sdptr->mEnd - contentOffset);
     if (start <= offsetInFrame && offsetInFrame < end &&
-        (selectionType == SelectionType::SELECTION_NONE ||
+        (selectionType == SelectionType::eNone ||
          sdptr->mSelectionType < selectionType)) {
       nscolor foreground, background;
       if (GetSelectionTextColors(sdptr->mSelectionType, textPaintStyle,
                                  sdptr->mTextRangeStyle,
                                  &foreground, &background)) {
         if (!isSolidTextColor &&
             NS_IS_SELECTION_SPECIAL_COLOR(foreground)) {
           result = NS_RGBA(0, 0, 0, 255);