Bug 282097 - Part 1: Add mNativeKeyEvent to nsKeyEvent. r=masayuki

This commit is contained in:
J. Ryan Stinnett 2013-07-09 22:42:59 -05:00
Родитель 85bc4fa046
Коммит c09dd559c3
2 изменённых файлов: 6 добавлений и 1 удалений

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

@ -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)
{

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

@ -258,6 +258,8 @@ struct ParamTraits<nsKeyEvent>
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)