Bug 1254755 part.5 Rename WidgetKeyboardEvent::isChar to WidgetKeyboardEvent::mIsChar r=smaug

MozReview-Commit-ID: 58mri5IP3dV

--HG--
extra : rebase_source : fadfc0eb40c2ea9a3a60ba54b0ae7c5cae94f96e
This commit is contained in:
Masayuki Nakano 2016-05-12 18:31:05 +09:00
Родитель e2fb1c839c
Коммит 1252a7bf75
6 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -352,7 +352,7 @@ bool
UIEvent::IsChar() const
{
WidgetKeyboardEvent* keyEvent = mEvent->AsKeyboardEvent();
return keyEvent ? keyEvent->isChar : false;
return keyEvent ? keyEvent->mIsChar : false;
}
mozilla::dom::Event*

Просмотреть файл

@ -106,7 +106,7 @@ protected:
, mCharCode(0)
, mPseudoCharCode(0)
, mLocation(nsIDOMKeyEvent::DOM_KEY_LOCATION_STANDARD)
, isChar(false)
, mIsChar(false)
, mIsRepeat(false)
, mIsComposing(false)
, mIsReserved(false)
@ -135,7 +135,7 @@ public:
, mCharCode(0)
, mPseudoCharCode(0)
, mLocation(nsIDOMKeyEvent::DOM_KEY_LOCATION_STANDARD)
, isChar(false)
, mIsChar(false)
, mIsRepeat(false)
, mIsComposing(false)
, mIsReserved(false)
@ -211,7 +211,7 @@ public:
// handling. The handlers will try from first character to last character.
nsTArray<AlternativeCharCode> mAlternativeCharCodes;
// Indicates whether the event signifies a printable character
bool isChar;
bool mIsChar;
// Indicates whether the event is generated by auto repeat or not.
// if this is keyup event, always false.
bool mIsRepeat;
@ -377,7 +377,7 @@ public:
mPseudoCharCode = aEvent.mPseudoCharCode;
mLocation = aEvent.mLocation;
mAlternativeCharCodes = aEvent.mAlternativeCharCodes;
isChar = aEvent.isChar;
mIsChar = aEvent.mIsChar;
mIsRepeat = aEvent.mIsRepeat;
mIsComposing = aEvent.mIsComposing;
mIsReserved = aEvent.mIsReserved;

Просмотреть файл

@ -2461,9 +2461,9 @@ InitKeyEvent(WidgetKeyboardEvent& event,
if (event.mMessage == eKeyPress) {
// Android gives us \n, so filter out some control characters.
event.isChar = (charCode >= ' ');
event.mCharCode = event.isChar ? charCode : 0;
event.mKeyCode = event.isChar ? 0 : domKeyCode;
event.mIsChar = (charCode >= ' ');
event.mCharCode = event.mIsChar ? charCode : 0;
event.mKeyCode = event.mIsChar ? 0 : domKeyCode;
event.mPluginEvent.Clear();
// For keypress, if the unicode char already has modifiers applied, we
@ -2478,7 +2478,7 @@ InitKeyEvent(WidgetKeyboardEvent& event,
}
} else {
event.isChar = false;
event.mIsChar = false;
event.mCharCode = 0;
event.mKeyCode = domKeyCode;

Просмотреть файл

@ -914,7 +914,7 @@ TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
}
aKeyEvent.mRefPoint = LayoutDeviceIntPoint(0, 0);
aKeyEvent.isChar = false; // XXX not used in XP level
aKeyEvent.mIsChar = false; // XXX not used in XP level
UInt32 kbType = GetKbdType();
UInt32 nativeKeyCode = [aNativeKeyEvent keyCode];
@ -1096,7 +1096,7 @@ TISInputSourceWrapper::WillDispatchKeyboardEvent(
insertStringForCharCode.IsEmpty() ? 0 : insertStringForCharCode[0];
aKeyEvent.SetCharCode(charCode);
// this is not a special key XXX not used in XP
aKeyEvent.isChar = (aKeyEvent.mMessage == eKeyPress);
aKeyEvent.mIsChar = (aKeyEvent.mMessage == eKeyPress);
MOZ_LOG(gLog, LogLevel::Info,
("%p TISInputSourceWrapper::WillDispatchKeyboardEvent, "
@ -2224,7 +2224,7 @@ TextInputHandler::InsertText(NSAttributedString* aAttrString,
// Dispatch keypress event with char instead of compositionchange event
WidgetKeyboardEvent keypressEvent(true, eKeyPress, mWidget);
keypressEvent.isChar = IsPrintableChar(str.CharAt(0));
keypressEvent.mIsChar = IsPrintableChar(str.CharAt(0));
// Don't set other modifiers from the current event, because here in
// -insertText: they've already been taken into account in creating
@ -2235,7 +2235,7 @@ TextInputHandler::InsertText(NSAttributedString* aAttrString,
InitKeyEvent(keyEvent, keypressEvent, &str);
} else {
nsCocoaUtils::InitInputEvent(keypressEvent, static_cast<NSEvent*>(nullptr));
if (keypressEvent.isChar) {
if (keypressEvent.mIsChar) {
keypressEvent.mCharCode = str.CharAt(0);
}
// Note that insertText is not called only at key pressing.

Просмотреть файл

@ -306,7 +306,7 @@ KeyEventDispatcher::DispatchKeyEventInternal(EventMessage aEventMessage)
if (!event.mCharCode) {
event.mKeyCode = mDOMKeyCode;
}
event.isChar = !!event.mCharCode;
event.mIsChar = !!event.mCharCode;
event.mIsRepeat = IsRepeat();
event.mKeyNameIndex = mDOMKeyNameIndex;
if (mDOMPrintableKeyValue) {

Просмотреть файл

@ -398,7 +398,7 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
WriteParam(aMsg, aParam.mCharCode);
WriteParam(aMsg, aParam.mPseudoCharCode);
WriteParam(aMsg, aParam.mAlternativeCharCodes);
WriteParam(aMsg, aParam.isChar);
WriteParam(aMsg, aParam.mIsChar);
WriteParam(aMsg, aParam.mIsRepeat);
WriteParam(aMsg, aParam.mIsReserved);
WriteParam(aMsg, aParam.mAccessKeyForwardedToChild);
@ -434,7 +434,7 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
ReadParam(aMsg, aIter, &aResult->mCharCode) &&
ReadParam(aMsg, aIter, &aResult->mPseudoCharCode) &&
ReadParam(aMsg, aIter, &aResult->mAlternativeCharCodes) &&
ReadParam(aMsg, aIter, &aResult->isChar) &&
ReadParam(aMsg, aIter, &aResult->mIsChar) &&
ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
ReadParam(aMsg, aIter, &aResult->mIsReserved) &&
ReadParam(aMsg, aIter, &aResult->mAccessKeyForwardedToChild) &&