Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r?smaug draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Thu, 09 Jun 2016 20:58:56 +0900
changeset 377659 b0572042d17a374bf480bedc20252b0d40226bdd
parent 377658 2fde6f642814d5fe11c4db22d7666739eef82b6d
child 523405 151c680539cd13e3c00ea940ddc2a3f0b97ad20f
push id20850
push usermasayuki@d-toybox.com
push dateSat, 11 Jun 2016 06:51:43 +0000
reviewerssmaug
bugs1278014
milestone50.0a1
Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r?smaug MozReview-Commit-ID: 7AqeDbHxGE2
dom/base/nsISelectionController.idl
layout/generic/nsFrame.cpp
layout/generic/nsSelection.cpp
layout/generic/nsTextFrame.cpp
--- a/dom/base/nsISelectionController.idl
+++ b/dom/base/nsISelectionController.idl
@@ -291,17 +291,17 @@ enum class SelectionType : RawSelectionT
   eIMERawClause = nsISelectionController::SELECTION_IME_RAWINPUT,
   eIMESelectedRawClause = nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT,
   eIMEConvertedClause = nsISelectionController::SELECTION_IME_CONVERTEDTEXT,
   eIMESelectedClause =
     nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT,
   eAccessibility = nsISelectionController::SELECTION_ACCESSIBILITY,
   eFind = nsISelectionController::SELECTION_FIND,
   eURLSecondary = nsISelectionController::SELECTION_URLSECONDARY,
-  SELECTION_URLSTRIKEOUT = nsISelectionController::SELECTION_URLSTRIKEOUT,
+  eURLStrikeout = 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
 // use static/const even with extern since it causes failing to link or
 // initializes them after such headers.
 enum : size_t
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3373,17 +3373,17 @@ nsFrame::HandlePress(nsPresContext* aPre
       // If the user clicked inside a selection, then just
       // return without doing anything. We will handle placing
       // the caret later on when the mouse is released. We ignore
       // the spellcheck, find and url formatting selections.
       //
       if (curDetail->mSelectionType != SelectionType::eSpellCheck &&
           curDetail->mSelectionType != SelectionType::eFind &&
           curDetail->mSelectionType != SelectionType::eURLSecondary &&
-          curDetail->mSelectionType != SelectionType::SELECTION_URLSTRIKEOUT &&
+          curDetail->mSelectionType != SelectionType::eURLStrikeout &&
           curDetail->mStart <= offsets.StartOffset() &&
           offsets.EndOffset() <= curDetail->mEnd)
       {
         inSelection = true;
       }
 
       SelectionDetails *nextDetail = curDetail->mNext;
       delete curDetail;
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -130,17 +130,17 @@ ToChar(SelectionType aSelectionType)
     case SelectionType::eIMESelectedClause:
       return "SelectionType::eIMESelectedClause";
     case SelectionType::eAccessibility:
       return "SelectionType::eAccessibility";
     case SelectionType::eFind:
       return "SelectionType::eFind";
     case SelectionType::eURLSecondary:
       return "SelectionType::eURLSecondary";
-    case SelectionType::SELECTION_URLSTRIKEOUT:
+    case SelectionType::eURLStrikeout:
       return "SelectionType::eURLStrikeout";
     default:
       return "Invalid SelectionType";
   }
 }
 
 static bool
 IsValidSelectionType(RawSelectionType aRawSelectionType)
@@ -151,17 +151,17 @@ IsValidSelectionType(RawSelectionType aR
     case SelectionType::eSpellCheck:
     case SelectionType::eIMERawClause:
     case SelectionType::eIMESelectedRawClause:
     case SelectionType::eIMEConvertedClause:
     case SelectionType::eIMESelectedClause:
     case SelectionType::eAccessibility:
     case SelectionType::eFind:
     case SelectionType::eURLSecondary:
-    case SelectionType::SELECTION_URLSTRIKEOUT:
+    case SelectionType::eURLStrikeout:
       return true;
     default:
       return false;
   }
 }
 
 SelectionType
 ToSelectionType(RawSelectionType aRawSelectionType)
@@ -364,17 +364,17 @@ GetIndexFromSelectionType(SelectionType 
     case SelectionType::eIMESelectedClause:
       return 5;
     case SelectionType::eAccessibility:
       return 6;
     case SelectionType::eFind:
       return 7;
     case SelectionType::eURLSecondary:
       return 8;
-    case SelectionType::SELECTION_URLSTRIKEOUT:
+    case SelectionType::eURLStrikeout:
       return 9;
     default:
       return -1;
   }
   /* NOTREACHED */
 }
 
 static SelectionType
@@ -385,17 +385,17 @@ GetSelectionTypeFromIndex(int8_t aIndex)
     SelectionType::eSpellCheck,
     SelectionType::eIMERawClause,
     SelectionType::eIMESelectedRawClause,
     SelectionType::eIMEConvertedClause,
     SelectionType::eIMESelectedClause,
     SelectionType::eAccessibility,
     SelectionType::eFind,
     SelectionType::eURLSecondary,
-    SelectionType::SELECTION_URLSTRIKEOUT
+    SelectionType::eURLStrikeout
   };
   if (NS_WARN_IF(aIndex < 0) ||
       NS_WARN_IF(static_cast<size_t>(aIndex) >= ArrayLength(kSelectionTypes))) {
     return SelectionType::eNormal;
   }
   return kSelectionTypes[aIndex];
 }
 
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5599,17 +5599,17 @@ nsTextFrame::DrawSelectionDecorations(gf
         return;
       }
       break;
     }
     case SelectionType::eSpellCheck:
       if (!weDefineSelectionUnderline)
         return;
       break;
-    case SelectionType::SELECTION_URLSTRIKEOUT: {
+    case SelectionType::eURLStrikeout: {
       nscoord inflationMinFontSize =
         nsLayoutUtils::InflationMinFontSizeFor(this);
       float inflation =
         GetInflationForTextDecorations(this, inflationMinFontSize);
       const gfxFont::Metrics metrics =
         GetFirstFontMetrics(GetFontGroupForFrame(this, inflation), aVertical);
 
       relativeSize = 2.0f;