зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1013744 - Send alternative char codes for keypress events to the child (for shortcuts etc.). r=masayuki
This commit is contained in:
Родитель
9e43c1bb47
Коммит
cbbe8c75a1
|
@ -53,6 +53,10 @@ namespace plugins {
|
|||
|
||||
struct AlternativeCharCode
|
||||
{
|
||||
AlternativeCharCode() :
|
||||
mUnshiftedCharCode(0), mShiftedCharCode(0)
|
||||
{
|
||||
}
|
||||
AlternativeCharCode(uint32_t aUnshiftedCharCode, uint32_t aShiftedCharCode) :
|
||||
mUnshiftedCharCode(aUnshiftedCharCode), mShiftedCharCode(aShiftedCharCode)
|
||||
{
|
||||
|
|
|
@ -290,6 +290,25 @@ struct ParamTraits<mozilla::WidgetTouchEvent>
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct ParamTraits<mozilla::AlternativeCharCode>
|
||||
{
|
||||
typedef mozilla::AlternativeCharCode paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
WriteParam(aMsg, aParam.mUnshiftedCharCode);
|
||||
WriteParam(aMsg, aParam.mShiftedCharCode);
|
||||
}
|
||||
|
||||
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
{
|
||||
return ReadParam(aMsg, aIter, &aResult->mUnshiftedCharCode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mShiftedCharCode);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
||||
{
|
||||
|
@ -304,6 +323,7 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
|||
WriteParam(aMsg, aParam.mCodeValue);
|
||||
WriteParam(aMsg, aParam.keyCode);
|
||||
WriteParam(aMsg, aParam.charCode);
|
||||
WriteParam(aMsg, aParam.alternativeCharCodes);
|
||||
WriteParam(aMsg, aParam.isChar);
|
||||
WriteParam(aMsg, aParam.mIsRepeat);
|
||||
WriteParam(aMsg, aParam.location);
|
||||
|
@ -323,6 +343,7 @@ struct ParamTraits<mozilla::WidgetKeyboardEvent>
|
|||
ReadParam(aMsg, aIter, &aResult->mCodeValue) &&
|
||||
ReadParam(aMsg, aIter, &aResult->keyCode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->charCode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->alternativeCharCodes) &&
|
||||
ReadParam(aMsg, aIter, &aResult->isChar) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
|
||||
ReadParam(aMsg, aIter, &aResult->location) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче