Bug 895274 part.69 Rename NS_FOCUS_CONTENT to eFocus r=smaug

This commit is contained in:
Masayuki Nakano
2015-09-02 15:08:00 +09:00
parent 530aae5440
commit a5253572f6
15 changed files with 35 additions and 42 deletions

View File

@@ -3177,7 +3177,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
}
if (mType == NS_FORM_INPUT_RANGE &&
(aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
(aVisitor.mEvent->mMessage == eFocus ||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT)) {
// Just as nsGenericHTMLFormElementWithState::PreHandleEvent calls
// nsIFormControlFrame::SetFocus, we handle focus here.
@@ -3231,9 +3231,9 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
StopNumberControlSpinnerSpin();
}
}
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
if (aVisitor.mEvent->mMessage == eFocus ||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
if (aVisitor.mEvent->mMessage == eFocus) {
// Tell our frame it's getting focus so that it can make sure focus
// is moved to our anonymous text control.
nsNumberControlFrame* numberControlFrame =
@@ -3587,9 +3587,9 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
return MaybeInitPickers(aVisitor);
}
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
if (aVisitor.mEvent->mMessage == eFocus ||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT &&
if (aVisitor.mEvent->mMessage == eFocus &&
MayFireChangeOnBlur() &&
!mIsDraggingRange) { // StartRangeThumbDrag already set mFocusedValue
GetValue(mFocusedValue);
@@ -3603,7 +3603,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
}
}
UpdateValidityUIBits(aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT);
UpdateValidityUIBits(aVisitor.mEvent->mMessage == eFocus);
UpdateState(true);
}
@@ -3745,9 +3745,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
}
} else if (nsEventStatus_eIgnore == aVisitor.mEventStatus) {
switch (aVisitor.mEvent->mMessage) {
case NS_FOCUS_CONTENT:
{
case eFocus: {
// see if we should select the contents of the textbox. This happens
// for text and password fields when the field was focused by the
// keyboard or a navigation, the platform allows it, and it wasn't