diff --git a/widget/TextEvents.h b/widget/TextEvents.h index 0c9311d5a5c5..5e4d78151539 100644 --- a/widget/TextEvents.h +++ b/widget/TextEvents.h @@ -53,6 +53,10 @@ namespace plugins { struct AlternativeCharCode { + AlternativeCharCode() : + mUnshiftedCharCode(0), mShiftedCharCode(0) + { + } AlternativeCharCode(uint32_t aUnshiftedCharCode, uint32_t aShiftedCharCode) : mUnshiftedCharCode(aUnshiftedCharCode), mShiftedCharCode(aShiftedCharCode) { diff --git a/widget/nsGUIEventIPC.h b/widget/nsGUIEventIPC.h index 0f8114043c1f..4228bae4ef3e 100644 --- a/widget/nsGUIEventIPC.h +++ b/widget/nsGUIEventIPC.h @@ -290,6 +290,25 @@ struct ParamTraits } }; +template<> +struct ParamTraits +{ + 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 { @@ -304,6 +323,7 @@ struct ParamTraits 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 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) &&