Bug 1278014 part.4 Rename SelectionType::SELECTION_NONE to SelectionType::eNone r=smaug

MozReview-Commit-ID: BRfzs8sColP

--HG--
extra : rebase_source : a5190cb20c263b01205e1ff75c76b2970c229b4e
This commit is contained in:
Masayuki Nakano 2016-06-09 18:07:18 +09:00
parent 581b9986bb
commit b58c08cb8f
3 changed files with 6 additions and 6 deletions

View File

@ -285,7 +285,7 @@ typedef short RawSelectionType;
enum class SelectionType : RawSelectionType enum class SelectionType : RawSelectionType
{ {
eInvalid = -1, eInvalid = -1,
SELECTION_NONE = nsISelectionController::SELECTION_NONE, eNone = nsISelectionController::SELECTION_NONE,
SELECTION_NORMAL = nsISelectionController::SELECTION_NORMAL, SELECTION_NORMAL = nsISelectionController::SELECTION_NORMAL,
SELECTION_SPELLCHECK = nsISelectionController::SELECTION_SPELLCHECK, SELECTION_SPELLCHECK = nsISelectionController::SELECTION_SPELLCHECK,
SELECTION_IME_RAWINPUT = nsISelectionController::SELECTION_IME_RAWINPUT, SELECTION_IME_RAWINPUT = nsISelectionController::SELECTION_IME_RAWINPUT,

View File

@ -115,7 +115,7 @@ ToChar(SelectionType aSelectionType)
switch (aSelectionType) { switch (aSelectionType) {
case SelectionType::eInvalid: case SelectionType::eInvalid:
return "SelectionType::eInvalid"; return "SelectionType::eInvalid";
case SelectionType::SELECTION_NONE: case SelectionType::eNone:
return "SelectionType::eNone"; return "SelectionType::eNone";
case SelectionType::SELECTION_NORMAL: case SelectionType::SELECTION_NORMAL:
return "SelectionType::eNormal"; return "SelectionType::eNormal";
@ -146,7 +146,7 @@ static bool
IsValidSelectionType(RawSelectionType aRawSelectionType) IsValidSelectionType(RawSelectionType aRawSelectionType)
{ {
switch (static_cast<SelectionType>(aRawSelectionType)) { switch (static_cast<SelectionType>(aRawSelectionType)) {
case SelectionType::SELECTION_NONE: case SelectionType::eNone:
case SelectionType::SELECTION_NORMAL: case SelectionType::SELECTION_NORMAL:
case SelectionType::SELECTION_SPELLCHECK: case SelectionType::SELECTION_SPELLCHECK:
case SelectionType::SELECTION_IME_RAWINPUT: case SelectionType::SELECTION_IME_RAWINPUT:

View File

@ -5782,7 +5782,7 @@ bool SelectionIterator::GetNextSegment(gfxFloat* aXOffset,
uint32_t index = mIterator.GetOriginalOffset() - mOriginalRange.start; uint32_t index = mIterator.GetOriginalOffset() - mOriginalRange.start;
SelectionDetails* sdptr = mSelectionDetails[index]; SelectionDetails* sdptr = mSelectionDetails[index];
SelectionType selectionType = SelectionType selectionType =
sdptr ? sdptr->mSelectionType : SelectionType::SELECTION_NONE; sdptr ? sdptr->mSelectionType : SelectionType::eNone;
TextRangeStyle style; TextRangeStyle style;
if (sdptr) { if (sdptr) {
style = sdptr->mTextRangeStyle; style = sdptr->mTextRangeStyle;
@ -6292,12 +6292,12 @@ nsTextFrame::GetCaretColorAt(int32_t aOffset)
textPaintStyle.SetResolveColors(isSolidTextColor); textPaintStyle.SetResolveColors(isSolidTextColor);
SelectionDetails* details = GetSelectionDetails(); SelectionDetails* details = GetSelectionDetails();
SelectionDetails* sdptr = details; SelectionDetails* sdptr = details;
SelectionType selectionType = SelectionType::SELECTION_NONE; SelectionType selectionType = SelectionType::eNone;
while (sdptr) { while (sdptr) {
int32_t start = std::max(0, sdptr->mStart - contentOffset); int32_t start = std::max(0, sdptr->mStart - contentOffset);
int32_t end = std::min(contentLength, sdptr->mEnd - contentOffset); int32_t end = std::min(contentLength, sdptr->mEnd - contentOffset);
if (start <= offsetInFrame && offsetInFrame < end && if (start <= offsetInFrame && offsetInFrame < end &&
(selectionType == SelectionType::SELECTION_NONE || (selectionType == SelectionType::eNone ||
sdptr->mSelectionType < selectionType)) { sdptr->mSelectionType < selectionType)) {
nscolor foreground, background; nscolor foreground, background;
if (GetSelectionTextColors(sdptr->mSelectionType, textPaintStyle, if (GetSelectionTextColors(sdptr->mSelectionType, textPaintStyle,