mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920377 part.16 Get rid of nsAlternativeCharCode r=roc
This commit is contained in:
parent
d49eef9962
commit
a3f2b0b40c
@ -107,7 +107,6 @@ typedef mozilla::WidgetEvent nsEvent;
|
||||
typedef mozilla::WidgetGUIEvent nsGUIEvent;
|
||||
typedef mozilla::WidgetInputEvent nsInputEvent;
|
||||
typedef mozilla::InternalUIEvent nsUIEvent;
|
||||
typedef mozilla::AlternativeCharCode nsAlternativeCharCode;
|
||||
typedef mozilla::WidgetKeyboardEvent nsKeyEvent;
|
||||
typedef mozilla::TextRangeStyle nsTextRangeStyle;
|
||||
typedef mozilla::TextRange nsTextRange;
|
||||
|
@ -534,7 +534,6 @@ public:
|
||||
} // namespace mozilla
|
||||
|
||||
// TODO: Remove following typedefs
|
||||
typedef mozilla::AlternativeCharCode nsAlternativeCharCode;
|
||||
typedef mozilla::WidgetKeyboardEvent nsKeyEvent;
|
||||
typedef mozilla::TextRangeStyle nsTextRangeStyle;
|
||||
typedef mozilla::TextRange nsTextRange;
|
||||
|
@ -1071,7 +1071,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
// likely to associate with this key.
|
||||
if ((unshiftedChar || shiftedChar) &&
|
||||
(!aKeyEvent.IsMeta() || !isDvorakQWERTY)) {
|
||||
nsAlternativeCharCode altCharCodes(unshiftedChar, shiftedChar);
|
||||
AlternativeCharCode altCharCodes(unshiftedChar, shiftedChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
@ -1133,7 +1133,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
// chars have been appended already.
|
||||
if ((cmdedChar || cmdedShiftChar) && isCmdSwitchLayout &&
|
||||
(aKeyEvent.IsMeta() || !isDvorakQWERTY)) {
|
||||
nsAlternativeCharCode altCharCodes(cmdedChar, cmdedShiftChar);
|
||||
AlternativeCharCode altCharCodes(cmdedChar, cmdedShiftChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
@ -1145,7 +1145,7 @@ TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
|
||||
// Special case for 'SS' key of German layout. See the comment of
|
||||
// hasCmdShiftOnlyChar definition for the detail.
|
||||
if (hasCmdShiftOnlyChar && originalCmdedShiftChar) {
|
||||
nsAlternativeCharCode altCharCodes(0, originalCmdedShiftChar);
|
||||
AlternativeCharCode altCharCodes(0, originalCmdedShiftChar);
|
||||
aKeyEvent.alternativeCharCodes.AppendElement(altCharCodes);
|
||||
}
|
||||
PR_LOG(gLog, PR_LOG_ALWAYS,
|
||||
|
@ -1211,7 +1211,7 @@ KeymapWrapper::InitKeypressEvent(nsKeyEvent& aKeyEvent,
|
||||
// We shold send both shifted char and unshifted char, all keyboard layout
|
||||
// users can use all keys. Don't change event.charCode. On some keyboard
|
||||
// layouts, Ctrl/Alt/Meta keys are used for inputting some characters.
|
||||
nsAlternativeCharCode altCharCodes(0, 0);
|
||||
AlternativeCharCode altCharCodes(0, 0);
|
||||
// unshifted charcode of current keyboard layout.
|
||||
altCharCodes.mUnshiftedCharCode =
|
||||
GetCharCodeFor(aGdkKeyEvent, baseState, aGdkKeyEvent->group);
|
||||
@ -1259,7 +1259,7 @@ KeymapWrapper::InitKeypressEvent(nsKeyEvent& aKeyEvent,
|
||||
return;
|
||||
}
|
||||
|
||||
nsAlternativeCharCode altLatinCharCodes(0, 0);
|
||||
AlternativeCharCode altLatinCharCodes(0, 0);
|
||||
uint32_t unmodifiedCh =
|
||||
aKeyEvent.IsShift() ? altCharCodes.mShiftedCharCode :
|
||||
altCharCodes.mUnshiftedCharCode;
|
||||
|
@ -1723,7 +1723,7 @@ nsWindow::OnKeyPressEvent(QKeyEvent *aEvent)
|
||||
|
||||
event.charCode = domCharCode;
|
||||
event.keyCode = 0;
|
||||
nsAlternativeCharCode altCharCode(0, 0);
|
||||
AlternativeCharCode altCharCode(0, 0);
|
||||
// if character has a lower and upper representation
|
||||
if ((unshiftedChar.isUpper() || unshiftedChar.isLower()) &&
|
||||
unshiftedChar.toLower() == shiftedChar.toLower()) {
|
||||
|
@ -1311,15 +1311,15 @@ NativeKey::DispatchKeyPressEventsWithKeyboardLayout() const
|
||||
shiftedChar = shiftedChars.mChars[cnt - skipShiftedChars];
|
||||
if (skipUnshiftedChars <= cnt)
|
||||
unshiftedChar = unshiftedChars.mChars[cnt - skipUnshiftedChars];
|
||||
nsAutoTArray<nsAlternativeCharCode, 5> altArray;
|
||||
nsAutoTArray<AlternativeCharCode, 5> altArray;
|
||||
|
||||
if (shiftedChar || unshiftedChar) {
|
||||
nsAlternativeCharCode chars(unshiftedChar, shiftedChar);
|
||||
AlternativeCharCode chars(unshiftedChar, shiftedChar);
|
||||
altArray.AppendElement(chars);
|
||||
}
|
||||
if (cnt == longestLength - 1) {
|
||||
if (unshiftedLatinChar || shiftedLatinChar) {
|
||||
nsAlternativeCharCode chars(unshiftedLatinChar, shiftedLatinChar);
|
||||
AlternativeCharCode chars(unshiftedLatinChar, shiftedLatinChar);
|
||||
altArray.AppendElement(chars);
|
||||
}
|
||||
|
||||
@ -1341,7 +1341,7 @@ NativeKey::DispatchKeyPressEventsWithKeyboardLayout() const
|
||||
charForOEMKeyCode != shiftedChars.mChars[0] &&
|
||||
charForOEMKeyCode != unshiftedLatinChar &&
|
||||
charForOEMKeyCode != shiftedLatinChar) {
|
||||
nsAlternativeCharCode OEMChars(charForOEMKeyCode, charForOEMKeyCode);
|
||||
AlternativeCharCode OEMChars(charForOEMKeyCode, charForOEMKeyCode);
|
||||
altArray.AppendElement(OEMChars);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user