Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r?smaug
MozReview-Commit-ID: 7AqeDbHxGE2
--- 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;