From c09dd559c3281bd41385159998082373e4ec7e75 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 9 Jul 2013 22:42:59 -0500 Subject: [PATCH] Bug 282097 - Part 1: Add mNativeKeyEvent to nsKeyEvent. r=masayuki --- widget/nsGUIEvent.h | 5 ++++- widget/nsGUIEventIPC.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/widget/nsGUIEvent.h b/widget/nsGUIEvent.h index f77c18583104..06eb6468c9db 100644 --- a/widget/nsGUIEvent.h +++ b/widget/nsGUIEvent.h @@ -1076,7 +1076,8 @@ public: : nsInputEvent(isTrusted, msg, w, NS_KEY_EVENT), keyCode(0), charCode(0), location(nsIDOMKeyEvent::DOM_KEY_LOCATION_STANDARD), isChar(0), - mKeyNameIndex(mozilla::widget::KEY_NAME_INDEX_Unidentified) + mKeyNameIndex(mozilla::widget::KEY_NAME_INDEX_Unidentified), + mNativeKeyEvent(nullptr) { } @@ -1093,6 +1094,8 @@ public: bool isChar; // DOM KeyboardEvent.key mozilla::widget::KeyNameIndex mKeyNameIndex; + // OS-specific native event can optionally be preserved + void* mNativeKeyEvent; void GetDOMKeyName(nsAString& aKeyName) { diff --git a/widget/nsGUIEventIPC.h b/widget/nsGUIEventIPC.h index 07dfc84ab89f..101bea524fb3 100644 --- a/widget/nsGUIEventIPC.h +++ b/widget/nsGUIEventIPC.h @@ -258,6 +258,8 @@ struct ParamTraits WriteParam(aMsg, aParam.charCode); WriteParam(aMsg, aParam.isChar); WriteParam(aMsg, aParam.location); + // An OS-specific native event might be attached in |mNativeKeyEvent|, but + // that cannot be copied across process boundaries. } static bool Read(const Message* aMsg, void** aIter, paramType* aResult)