mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
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:
parent
581b9986bb
commit
b58c08cb8f
@ -285,7 +285,7 @@ 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,
|
||||
|
@ -115,7 +115,7 @@ 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";
|
||||
@ -146,7 +146,7 @@ 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:
|
||||
|
@ -5782,7 +5782,7 @@ bool SelectionIterator::GetNextSegment(gfxFloat* aXOffset,
|
||||
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;
|
||||
@ -6292,12 +6292,12 @@ nsTextFrame::GetCaretColorAt(int32_t aOffset)
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user