2010-08-17 12:07:42 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
#ifndef nsGUIEventIPC_h__
|
|
|
|
#define nsGUIEventIPC_h__
|
|
|
|
|
2020-12-10 14:09:21 +03:00
|
|
|
#include "ipc/EnumSerializer.h"
|
2012-08-28 16:41:04 +04:00
|
|
|
#include "ipc/IPCMessageUtils.h"
|
2015-06-05 12:28:19 +03:00
|
|
|
#include "mozilla/ContentCache.h"
|
2013-07-26 23:28:31 +04:00
|
|
|
#include "mozilla/GfxMessageUtils.h"
|
2013-04-05 12:49:00 +04:00
|
|
|
#include "mozilla/dom/Touch.h"
|
2020-11-23 19:21:38 +03:00
|
|
|
#include "mozilla/layers/LayersMessageUtils.h"
|
2013-09-25 15:21:20 +04:00
|
|
|
#include "mozilla/MiscEvents.h"
|
2013-09-25 15:21:18 +04:00
|
|
|
#include "mozilla/MouseEvents.h"
|
2013-09-25 15:21:19 +04:00
|
|
|
#include "mozilla/TextEvents.h"
|
2013-09-25 15:21:16 +04:00
|
|
|
#include "mozilla/TouchEvents.h"
|
2018-03-16 14:23:53 +03:00
|
|
|
#include "mozilla/WheelHandlingHelper.h" // for WheelDeltaAdjustmentStrategy
|
2017-08-02 00:19:19 +03:00
|
|
|
#include "mozilla/dom/Selection.h"
|
2016-07-20 14:37:00 +03:00
|
|
|
#include "InputData.h"
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
namespace IPC {
|
|
|
|
|
2015-08-26 15:56:59 +03:00
|
|
|
template <>
|
2017-12-01 21:00:56 +03:00
|
|
|
struct ParamTraits<mozilla::EventMessage>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::EventMessage, mozilla::EventMessage(0),
|
|
|
|
mozilla::EventMessage::eEventMessage_MaxValue> {};
|
2015-08-26 15:56:59 +03:00
|
|
|
|
2012-12-16 05:26:03 +04:00
|
|
|
template <>
|
2013-09-14 06:39:41 +04:00
|
|
|
struct ParamTraits<mozilla::BaseEventFlags> {
|
|
|
|
typedef mozilla::BaseEventFlags paramType;
|
2012-12-16 05:26:03 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2012-12-20 07:42:29 +04:00
|
|
|
aMsg->WriteBytes(&aParam, sizeof(aParam));
|
2012-12-16 05:26:03 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-05-17 00:32:37 +03:00
|
|
|
return aMsg->ReadBytesInto(aIter, aResult, sizeof(*aResult));
|
2012-12-16 05:26:03 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
template <>
|
2013-10-02 07:46:04 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetEvent> {
|
|
|
|
typedef mozilla::WidgetEvent paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
// Mark the event as posted to another process.
|
|
|
|
const_cast<mozilla::WidgetEvent&>(aParam).MarkAsPostedToRemoteProcess();
|
|
|
|
|
2014-08-04 09:28:46 +04:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::EventClassIDType>(aParam.mClass));
|
2015-08-22 04:34:51 +03:00
|
|
|
WriteParam(aMsg, aParam.mMessage);
|
2016-04-18 17:09:02 +03:00
|
|
|
WriteParam(aMsg, aParam.mRefPoint);
|
2017-06-06 03:45:31 +03:00
|
|
|
WriteParam(aMsg, aParam.mFocusSequenceNumber);
|
2016-03-28 07:29:42 +03:00
|
|
|
WriteParam(aMsg, aParam.mTime);
|
2016-03-28 07:49:02 +03:00
|
|
|
WriteParam(aMsg, aParam.mTimeStamp);
|
2012-12-16 05:26:03 +04:00
|
|
|
WriteParam(aMsg, aParam.mFlags);
|
2019-05-06 11:12:21 +03:00
|
|
|
WriteParam(aMsg, aParam.mLayersId);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-08-04 09:28:46 +04:00
|
|
|
mozilla::EventClassIDType eventClassID = 0;
|
|
|
|
bool ret = ReadParam(aMsg, aIter, &eventClassID) &&
|
2015-08-22 04:34:51 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mMessage) &&
|
2016-04-18 17:09:02 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mRefPoint) &&
|
2017-06-06 03:45:31 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusSequenceNumber) &&
|
2016-03-28 07:29:42 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTime) &&
|
2016-03-28 07:49:02 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
2019-05-06 11:12:21 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFlags) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLayersId);
|
2014-08-04 09:28:46 +04:00
|
|
|
aResult->mClass = static_cast<mozilla::EventClassID>(eventClassID);
|
2017-07-05 12:59:44 +03:00
|
|
|
if (ret) {
|
|
|
|
// Reset cross process dispatching state here because the event has not
|
|
|
|
// been dispatched to different process from current process.
|
|
|
|
aResult->ResetCrossProcessDispatchingState();
|
2020-03-06 00:34:28 +03:00
|
|
|
// Mark the event comes from another process.
|
|
|
|
aResult->MarkAsComingFromAnotherProcess();
|
2017-07-05 12:59:44 +03:00
|
|
|
}
|
2012-11-20 10:05:56 +04:00
|
|
|
return ret;
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-04-05 08:23:13 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::NativeEventData> {
|
|
|
|
typedef mozilla::NativeEventData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mBuffer);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-04-05 08:23:13 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mBuffer);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
template <>
|
2013-10-02 07:46:03 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetGUIEvent> {
|
|
|
|
typedef mozilla::WidgetGUIEvent paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetEvent&>(aParam));
|
2016-04-05 08:23:13 +03:00
|
|
|
WriteParam(aMsg, aParam.mPluginEvent);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-07-23 23:55:51 +04:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetEvent*>(aResult)) &&
|
2016-04-05 08:23:13 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPluginEvent);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
2013-10-01 11:23:02 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetInputEvent> {
|
|
|
|
typedef mozilla::WidgetInputEvent paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetGUIEvent&>(aParam));
|
2016-03-31 11:03:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mModifiers);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2013-10-02 07:46:03 +04:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2016-03-31 11:03:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mModifiers);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-05-17 04:23:23 +04:00
|
|
|
template <>
|
2013-10-01 11:23:02 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetMouseEventBase> {
|
|
|
|
typedef mozilla::WidgetMouseEventBase paramType;
|
2011-05-17 04:23:23 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetInputEvent&>(aParam));
|
2019-04-21 21:17:10 +03:00
|
|
|
WriteParam(aMsg, aParam.mButton);
|
2019-04-21 22:42:37 +03:00
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
2019-04-21 21:19:18 +03:00
|
|
|
WriteParam(aMsg, aParam.mPressure);
|
2019-04-21 21:19:43 +03:00
|
|
|
WriteParam(aMsg, aParam.mInputSource);
|
2011-05-17 04:23:23 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2013-10-01 11:23:02 +04:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) &&
|
2019-04-21 21:17:10 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mButton) &&
|
2019-04-21 22:42:37 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons) &&
|
2019-04-21 21:19:18 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPressure) &&
|
2019-04-21 21:19:43 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mInputSource);
|
2011-05-17 04:23:23 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-08-12 05:42:34 +04:00
|
|
|
template <>
|
2013-10-16 13:37:36 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetWheelEvent> {
|
|
|
|
typedef mozilla::WidgetWheelEvent paramType;
|
2012-08-12 05:42:34 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetMouseEventBase&>(aParam));
|
2016-03-31 12:55:59 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaX);
|
2016-03-31 12:09:47 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaY);
|
2016-03-31 12:18:34 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaZ);
|
2016-03-31 12:35:24 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaMode);
|
2021-05-14 18:17:33 +03:00
|
|
|
WriteParam(aMsg, aParam.mWheelTicksX);
|
|
|
|
WriteParam(aMsg, aParam.mWheelTicksY);
|
2016-03-31 12:44:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mCustomizedByUserPrefs);
|
2016-03-31 17:36:49 +03:00
|
|
|
WriteParam(aMsg, aParam.mMayHaveMomentum);
|
2016-03-31 17:45:55 +03:00
|
|
|
WriteParam(aMsg, aParam.mIsMomentum);
|
2014-07-07 13:54:14 +04:00
|
|
|
WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
|
2016-03-31 18:10:46 +03:00
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
2016-03-31 18:10:09 +03:00
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
2016-03-31 18:46:18 +03:00
|
|
|
WriteParam(aMsg, static_cast<uint8_t>(aParam.mScrollType));
|
2016-03-31 18:27:45 +03:00
|
|
|
WriteParam(aMsg, aParam.mOverflowDeltaX);
|
2016-03-31 18:36:55 +03:00
|
|
|
WriteParam(aMsg, aParam.mOverflowDeltaY);
|
2015-03-07 00:45:59 +03:00
|
|
|
WriteParam(aMsg, aParam.mViewPortIsOverscrolled);
|
2015-08-28 06:50:31 +03:00
|
|
|
WriteParam(aMsg, aParam.mCanTriggerSwipe);
|
2016-01-27 09:09:13 +03:00
|
|
|
WriteParam(aMsg, aParam.mAllowToOverrideSystemScrollSpeed);
|
2018-03-15 11:31:07 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaValuesHorizontalizedForDefaultHandler);
|
2012-08-12 05:42:34 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-03-31 18:46:18 +03:00
|
|
|
uint8_t scrollType = 0;
|
2012-08-12 05:42:36 +04:00
|
|
|
bool rv =
|
2013-10-01 11:23:02 +04:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
|
2016-03-31 12:55:59 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
|
2016-03-31 12:09:47 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
|
2016-03-31 12:18:34 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaZ) &&
|
2016-03-31 12:35:24 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaMode) &&
|
2021-05-14 18:17:33 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWheelTicksX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mWheelTicksY) &&
|
2016-03-31 12:44:01 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCustomizedByUserPrefs) &&
|
2016-03-31 17:36:49 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mMayHaveMomentum) &&
|
2016-03-31 17:45:55 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsMomentum) &&
|
2014-07-07 13:54:14 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
|
2016-03-31 18:10:46 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
2016-03-31 18:10:09 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
2012-08-12 05:42:36 +04:00
|
|
|
ReadParam(aMsg, aIter, &scrollType) &&
|
2016-03-31 18:27:45 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOverflowDeltaX) &&
|
2016-03-31 18:36:55 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOverflowDeltaY) &&
|
2015-08-28 06:50:31 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mViewPortIsOverscrolled) &&
|
2016-01-27 09:09:13 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCanTriggerSwipe) &&
|
Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier r=smaug
This patch declares a new default action, "horizontal scroll", this scrolls
content horizontally with deltaY of wheel events and ignores deltaX and deltaZ.
This is used for default action with Shift key in default setting except on
macOS. On macOS, legacy mouse's vertical wheel operation with Shift key causes
native horizontal wheel event. Therefore, we don't need to use this new
default action on macOS. Additionally, old default action with Shift key,
navigating history, is moved to with Alt key. This makes same settings between
macOS and the others. So, this is better for users who use macOS and another
OS and web app developers who check wheel events only on macOS or other
platform(s).
For simpler implementation, default action handlers moves deltaY values to
deltaX values temporarily *only* while they handle wheel events. This is
performed by AutoWheelDeltaAdjuster and restored after handling it
automatically.
So, in other words, even if default action is "horizontal scroll", web apps
receives wheel events whose deltaY is not zero but its content will be
scrolled horizontally. This is same as Chromium, so, this behavior shouldn't
cause any incompatible behavior with it.
MozReview-Commit-ID: E4X3yZzLEAl
--HG--
extra : rebase_source : e20d854c6b0a181ad4c9e7304bd9ad14256481ff
2017-10-04 19:12:35 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAllowToOverrideSystemScrollSpeed) &&
|
2018-03-15 11:31:07 +03:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mDeltaValuesHorizontalizedForDefaultHandler);
|
2016-03-31 17:54:42 +03:00
|
|
|
aResult->mScrollType =
|
2013-10-16 13:37:36 +04:00
|
|
|
static_cast<mozilla::WidgetWheelEvent::ScrollType>(scrollType);
|
2012-08-12 05:42:36 +04:00
|
|
|
return rv;
|
2012-08-12 05:42:34 +04:00
|
|
|
}
|
|
|
|
};
|
2011-06-22 04:32:43 +04:00
|
|
|
|
2016-11-20 04:49:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::WidgetPointerHelper> {
|
|
|
|
typedef mozilla::WidgetPointerHelper paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.pointerId);
|
|
|
|
WriteParam(aMsg, aParam.tiltX);
|
|
|
|
WriteParam(aMsg, aParam.tiltY);
|
2017-02-09 05:49:00 +03:00
|
|
|
WriteParam(aMsg, aParam.twist);
|
|
|
|
WriteParam(aMsg, aParam.tangentialPressure);
|
2017-01-18 10:25:44 +03:00
|
|
|
// We don't serialize convertToPointer since it's temporarily variable and
|
|
|
|
// should be reset to default.
|
2016-11-20 04:49:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
bool rv;
|
|
|
|
rv = ReadParam(aMsg, aIter, &aResult->pointerId) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->tiltX) &&
|
2017-02-09 05:49:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->tiltY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->twist) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->tangentialPressure);
|
2016-11-20 04:49:00 +03:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-06-22 04:32:43 +04:00
|
|
|
template <>
|
2013-10-02 10:38:27 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetMouseEvent> {
|
|
|
|
typedef mozilla::WidgetMouseEvent paramType;
|
2011-06-22 04:32:43 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetMouseEventBase&>(aParam));
|
2017-09-21 11:17:30 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetPointerHelper&>(aParam));
|
2016-05-10 15:15:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mIgnoreRootScrollFrame);
|
Bug 1528289 - part 2: Dispatch same events on the web contents when autoscroll is canceled with a click r=Gijs,edgar
Chrome behaves like this:
1. When user starts autoscroll with a middle click, `mousedown` and `mouseup`
are fired, but `auxclick` nor `paste` event is not fired.
2. When user ends autoscroll with a left click, only `mouseup` event is fired.
I.e, `mousedown` nor `click` event is not fired.
3. When user ends autoscroll with a middle click, only `mouseup` event is fired.
I.e., `mousedown`, `auxclick` nor `paste` events is not fired.
4. When user ends autoscroll with a right click, `mouseup` and `contextmenu`
events are fired, but `mousedown` and `auxclick` events are not fired.
This patch emulates these Chrome's behavior as far as possible. However,
unfortunately, we cannot do exactly same behavior without some big patches
because each widget (`nsWindow` or `nsChildView`) discards a mouse event
which rolled up a widget before dispatching it into the DOM. Therefore,
for now, this patch does not fix the following issues:
1. `mousedown` event is not fired in content when clicking outside the
autoscroller to close it except when pressing the secondary button or on any
buttons on Linux.
2. `mouseup` event is not fired in content when clicking outside the
autoscroller to close it except when pressing the primary button macOS.
3. `click` event and `auxclick` events are fired when clicking outside the
autoscroller with the secondary button.
So, the middle button `click`/`auxclick` events and `paste` event which is
reported to the bug won't be fired with this patch. I'll file follow up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D104652
2021-03-23 22:22:48 +03:00
|
|
|
WriteParam(aMsg, aParam.mClickEventPrevented);
|
2016-05-12 05:36:41 +03:00
|
|
|
WriteParam(aMsg, static_cast<paramType::ReasonType>(aParam.mReason));
|
2016-05-12 05:39:05 +03:00
|
|
|
WriteParam(aMsg, static_cast<paramType::ContextMenuTriggerType>(
|
|
|
|
aParam.mContextMenuTrigger));
|
2020-08-27 20:19:03 +03:00
|
|
|
WriteParam(aMsg, aParam.mExitFrom.isSome());
|
|
|
|
if (aParam.mExitFrom.isSome()) {
|
|
|
|
WriteParam(
|
|
|
|
aMsg, static_cast<paramType::ExitFromType>(aParam.mExitFrom.value()));
|
|
|
|
}
|
2016-05-10 17:29:14 +03:00
|
|
|
WriteParam(aMsg, aParam.mClickCount);
|
2011-06-22 04:32:43 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2011-06-22 04:32:43 +04:00
|
|
|
bool rv;
|
2016-05-12 05:17:46 +03:00
|
|
|
paramType::ReasonType reason = 0;
|
2016-05-12 05:28:14 +03:00
|
|
|
paramType::ContextMenuTriggerType contextMenuTrigger = 0;
|
2020-08-27 20:19:03 +03:00
|
|
|
bool hasExitFrom = false;
|
2013-10-01 11:23:02 +04:00
|
|
|
rv = ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEventBase*>(aResult)) &&
|
2016-11-20 04:49:00 +03:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetPointerHelper*>(aResult)) &&
|
2016-05-10 15:15:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIgnoreRootScrollFrame) &&
|
Bug 1528289 - part 2: Dispatch same events on the web contents when autoscroll is canceled with a click r=Gijs,edgar
Chrome behaves like this:
1. When user starts autoscroll with a middle click, `mousedown` and `mouseup`
are fired, but `auxclick` nor `paste` event is not fired.
2. When user ends autoscroll with a left click, only `mouseup` event is fired.
I.e, `mousedown` nor `click` event is not fired.
3. When user ends autoscroll with a middle click, only `mouseup` event is fired.
I.e., `mousedown`, `auxclick` nor `paste` events is not fired.
4. When user ends autoscroll with a right click, `mouseup` and `contextmenu`
events are fired, but `mousedown` and `auxclick` events are not fired.
This patch emulates these Chrome's behavior as far as possible. However,
unfortunately, we cannot do exactly same behavior without some big patches
because each widget (`nsWindow` or `nsChildView`) discards a mouse event
which rolled up a widget before dispatching it into the DOM. Therefore,
for now, this patch does not fix the following issues:
1. `mousedown` event is not fired in content when clicking outside the
autoscroller to close it except when pressing the secondary button or on any
buttons on Linux.
2. `mouseup` event is not fired in content when clicking outside the
autoscroller to close it except when pressing the primary button macOS.
3. `click` event and `auxclick` events are fired when clicking outside the
autoscroller with the secondary button.
So, the middle button `click`/`auxclick` events and `paste` event which is
reported to the bug won't be fired with this patch. I'll file follow up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D104652
2021-03-23 22:22:48 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mClickEventPrevented) &&
|
2011-06-22 04:32:43 +04:00
|
|
|
ReadParam(aMsg, aIter, &reason) &&
|
2020-08-27 20:19:03 +03:00
|
|
|
ReadParam(aMsg, aIter, &contextMenuTrigger);
|
2016-05-12 05:36:41 +03:00
|
|
|
aResult->mReason = static_cast<paramType::Reason>(reason);
|
2016-05-12 05:39:05 +03:00
|
|
|
aResult->mContextMenuTrigger =
|
2016-05-12 05:28:14 +03:00
|
|
|
static_cast<paramType::ContextMenuTrigger>(contextMenuTrigger);
|
2020-08-27 20:19:03 +03:00
|
|
|
rv = rv && ReadParam(aMsg, aIter, &hasExitFrom);
|
|
|
|
if (hasExitFrom) {
|
|
|
|
paramType::ExitFromType exitFrom = 0;
|
|
|
|
rv = rv && ReadParam(aMsg, aIter, &exitFrom);
|
|
|
|
aResult->mExitFrom = Some(static_cast<paramType::ExitFrom>(exitFrom));
|
|
|
|
}
|
|
|
|
rv = rv && ReadParam(aMsg, aIter, &aResult->mClickCount);
|
2011-06-22 04:32:43 +04:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-04-08 21:48:11 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::WidgetDragEvent> {
|
|
|
|
typedef mozilla::WidgetDragEvent paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetMouseEvent&>(aParam));
|
2016-03-31 13:06:05 +03:00
|
|
|
WriteParam(aMsg, aParam.mUserCancelled);
|
2015-04-08 21:48:11 +03:00
|
|
|
WriteParam(aMsg, aParam.mDefaultPreventedOnContent);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-04-08 21:48:11 +03:00
|
|
|
bool rv = ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
2016-03-31 13:06:05 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserCancelled) &&
|
2015-04-08 21:48:11 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDefaultPreventedOnContent);
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-11-21 09:44:22 +04:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::WidgetPointerEvent> {
|
|
|
|
typedef mozilla::WidgetPointerEvent paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetMouseEvent&>(aParam));
|
2016-08-03 11:18:04 +03:00
|
|
|
WriteParam(aMsg, aParam.mWidth);
|
2016-08-03 11:23:56 +03:00
|
|
|
WriteParam(aMsg, aParam.mHeight);
|
2016-08-03 11:34:53 +03:00
|
|
|
WriteParam(aMsg, aParam.mIsPrimary);
|
2013-11-21 09:44:22 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2013-11-21 09:44:22 +04:00
|
|
|
bool rv = ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
2016-08-03 11:18:04 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWidth) &&
|
2016-08-03 11:23:56 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mHeight) &&
|
2016-08-03 11:34:53 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsPrimary);
|
2013-11-21 09:44:22 +04:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-07-16 06:58:43 +04:00
|
|
|
template <>
|
2013-09-27 10:20:57 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetTouchEvent> {
|
2021-05-07 21:01:27 +03:00
|
|
|
using paramType = mozilla::WidgetTouchEvent;
|
2012-07-16 06:58:43 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2013-10-01 11:23:02 +04:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetInputEvent&>(aParam));
|
2021-05-07 21:01:27 +03:00
|
|
|
WriteParam(aMsg, aParam.mInputSource);
|
2021-05-31 16:39:18 +03:00
|
|
|
WriteParam(aMsg, aParam.mButton);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
2013-04-05 12:49:00 +04:00
|
|
|
// Sigh, Touch bites us again! We want to be able to do
|
2016-03-30 12:44:28 +03:00
|
|
|
// WriteParam(aMsg, aParam.mTouches);
|
|
|
|
const paramType::TouchArray& touches = aParam.mTouches;
|
2012-07-16 06:58:43 +04:00
|
|
|
WriteParam(aMsg, touches.Length());
|
|
|
|
for (uint32_t i = 0; i < touches.Length(); ++i) {
|
2013-07-10 13:53:09 +04:00
|
|
|
mozilla::dom::Touch* touch = touches[i];
|
2012-07-16 06:58:43 +04:00
|
|
|
WriteParam(aMsg, touch->mIdentifier);
|
|
|
|
WriteParam(aMsg, touch->mRefPoint);
|
|
|
|
WriteParam(aMsg, touch->mRadius);
|
|
|
|
WriteParam(aMsg, touch->mRotationAngle);
|
|
|
|
WriteParam(aMsg, touch->mForce);
|
2021-05-07 21:01:28 +03:00
|
|
|
WriteParam(aMsg, touch->tiltX);
|
|
|
|
WriteParam(aMsg, touch->tiltY);
|
|
|
|
WriteParam(aMsg, touch->twist);
|
2012-07-16 06:58:43 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-07-09 00:48:18 +04:00
|
|
|
paramType::TouchArray::size_type numTouches;
|
2013-10-01 11:23:02 +04:00
|
|
|
if (!ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) ||
|
2021-05-07 21:01:27 +03:00
|
|
|
!ReadParam(aMsg, aIter, &aResult->mInputSource) ||
|
2021-05-31 16:39:18 +03:00
|
|
|
!ReadParam(aMsg, aIter, &aResult->mButton) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mButtons) ||
|
2012-07-16 06:58:43 +04:00
|
|
|
!ReadParam(aMsg, aIter, &numTouches)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
for (uint32_t i = 0; i < numTouches; ++i) {
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t identifier;
|
2013-08-02 11:05:16 +04:00
|
|
|
mozilla::LayoutDeviceIntPoint refPoint;
|
2015-11-10 08:37:31 +03:00
|
|
|
mozilla::LayoutDeviceIntPoint radius;
|
2012-07-16 06:58:43 +04:00
|
|
|
float rotationAngle;
|
|
|
|
float force;
|
2021-05-07 21:01:28 +03:00
|
|
|
uint32_t tiltX;
|
|
|
|
uint32_t tiltY;
|
|
|
|
uint32_t twist;
|
2012-07-16 06:58:43 +04:00
|
|
|
if (!ReadParam(aMsg, aIter, &identifier) ||
|
|
|
|
!ReadParam(aMsg, aIter, &refPoint) ||
|
|
|
|
!ReadParam(aMsg, aIter, &radius) ||
|
|
|
|
!ReadParam(aMsg, aIter, &rotationAngle) ||
|
2021-05-07 21:01:28 +03:00
|
|
|
!ReadParam(aMsg, aIter, &force) || !ReadParam(aMsg, aIter, &tiltX) ||
|
|
|
|
!ReadParam(aMsg, aIter, &tiltY) || !ReadParam(aMsg, aIter, &twist)) {
|
2012-07-16 06:58:43 +04:00
|
|
|
return false;
|
|
|
|
}
|
2021-05-07 21:01:28 +03:00
|
|
|
auto* touch = new mozilla::dom::Touch(identifier, refPoint, radius,
|
|
|
|
rotationAngle, force);
|
|
|
|
touch->tiltX = tiltX;
|
|
|
|
touch->tiltY = tiltY;
|
|
|
|
touch->twist = twist;
|
|
|
|
aResult->mTouches.AppendElement(touch);
|
2012-07-16 06:58:43 +04:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-07-23 15:05:45 +04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-07-23 15:05:45 +04:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mUnshiftedCharCode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mShiftedCharCode);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-06-06 02:09:40 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ShortcutKeyCandidate> {
|
|
|
|
typedef mozilla::ShortcutKeyCandidate paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mCharCode);
|
|
|
|
WriteParam(aMsg, aParam.mIgnoreShift);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mCharCode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIgnoreShift);
|
|
|
|
}
|
|
|
|
};
|
2014-07-23 15:05:45 +04:00
|
|
|
|
2011-06-22 04:32:43 +04:00
|
|
|
template <>
|
2013-10-01 11:22:58 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetKeyboardEvent> {
|
|
|
|
typedef mozilla::WidgetKeyboardEvent paramType;
|
2011-06-22 04:32:43 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetInputEvent&>(aParam));
|
2016-05-12 13:18:36 +03:00
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::KeyNameIndexType>(aParam.mKeyNameIndex));
|
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::CodeNameIndexType>(aParam.mCodeNameIndex));
|
2013-12-10 20:14:53 +04:00
|
|
|
WriteParam(aMsg, aParam.mKeyValue);
|
2014-05-25 06:08:58 +04:00
|
|
|
WriteParam(aMsg, aParam.mCodeValue);
|
2016-05-12 11:13:49 +03:00
|
|
|
WriteParam(aMsg, aParam.mKeyCode);
|
2016-05-13 10:06:18 +03:00
|
|
|
WriteParam(aMsg, aParam.mCharCode);
|
2016-03-19 14:57:11 +03:00
|
|
|
WriteParam(aMsg, aParam.mPseudoCharCode);
|
2016-05-12 11:57:21 +03:00
|
|
|
WriteParam(aMsg, aParam.mAlternativeCharCodes);
|
2013-11-07 15:17:32 +04:00
|
|
|
WriteParam(aMsg, aParam.mIsRepeat);
|
2016-05-12 12:17:22 +03:00
|
|
|
WriteParam(aMsg, aParam.mLocation);
|
2013-09-06 17:11:15 +04:00
|
|
|
WriteParam(aMsg, aParam.mUniqueId);
|
2016-03-15 08:50:16 +03:00
|
|
|
WriteParam(aMsg, aParam.mIsSynthesizedByTIP);
|
Bug 1441821 - NativeKey shouldn't mark eKeyDown and eKeyPress as "skippable in remote process" if message is not caused by physical key press r=m_kato,smaug
Currently, TabChild discards eKeyDown and eKeyPress events which are marked as
"repeated" and were dispatched after the latest eKeyDown event comes into the
process. However, keyboard layout utils may generate native key events
as "repeated" even if each native key is important to input proper text.
So, TabChild shouldn't decide if coming keyboard event is skippable only with
mIsRepeat. For solving this issue, this patch adds
mMaybeSkippableInRemoteProcess to WidgetKeyboardEvent and makes
TabChild::SkipRepeatedKeyEvent() check
WidgetKeyboardEvent::CanSkipInRemoteProcess() instead.
On Windows, there are two ways to generate keyboard input messages. One is
using SendMessage() or PostMessage(). The other is SendInput() API. In both
ways, utils can make their input as repeated key messages.
The former case must be safe for this issue since such utils need to set 31st
bit of lParam to 1 explicitly.
On the other hand, in the latter case, the utils probably need to append
KEYEVENTF_KEYUP into KEYBDINPUT::dwFlags. Otherwise, only first call is
treated as non-repeated event.
So, when given message does not came from physical key operation, NativeKey
should set WidgetKeyboardEvent::mMaybeSkippableInRemoteProcess to false
even if WidgetKeyboardEvent::mIsRepeat is true.
MozReview-Commit-ID: 3rinrOjx8Tf
--HG--
extra : rebase_source : 26b6d869260176fc7ef535323b83001bb4b725c2
2018-06-06 17:35:16 +03:00
|
|
|
WriteParam(aMsg, aParam.mMaybeSkippableInRemoteProcess);
|
2017-05-19 11:24:20 +03:00
|
|
|
|
2013-07-10 07:42:59 +04:00
|
|
|
// An OS-specific native event might be attached in |mNativeKeyEvent|, but
|
|
|
|
// that cannot be copied across process boundaries.
|
2017-05-19 11:24:20 +03:00
|
|
|
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForSingleLineEditor);
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForMultiLineEditor);
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForRichTextEditor);
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForSingleLineEditorInitialized);
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForMultiLineEditorInitialized);
|
|
|
|
WriteParam(aMsg, aParam.mEditCommandsForRichTextEditorInitialized);
|
2011-06-22 04:32:43 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-05-12 13:18:36 +03:00
|
|
|
mozilla::KeyNameIndexType keyNameIndex = 0;
|
|
|
|
mozilla::CodeNameIndexType codeNameIndex = 0;
|
2013-10-01 11:23:02 +04:00
|
|
|
if (ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetInputEvent*>(aResult)) &&
|
2013-04-26 11:41:27 +04:00
|
|
|
ReadParam(aMsg, aIter, &keyNameIndex) &&
|
2014-05-25 06:08:58 +04:00
|
|
|
ReadParam(aMsg, aIter, &codeNameIndex) &&
|
2013-12-10 20:14:53 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mKeyValue) &&
|
2014-05-25 06:08:58 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCodeValue) &&
|
2016-05-12 11:13:49 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mKeyCode) &&
|
2016-05-13 10:06:18 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCharCode) &&
|
2016-03-19 14:57:11 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPseudoCharCode) &&
|
2016-05-12 11:57:21 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAlternativeCharCodes) &&
|
2013-11-07 15:17:32 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsRepeat) &&
|
2016-05-12 12:17:22 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocation) &&
|
2016-03-15 08:50:16 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mUniqueId) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsSynthesizedByTIP) &&
|
Bug 1441821 - NativeKey shouldn't mark eKeyDown and eKeyPress as "skippable in remote process" if message is not caused by physical key press r=m_kato,smaug
Currently, TabChild discards eKeyDown and eKeyPress events which are marked as
"repeated" and were dispatched after the latest eKeyDown event comes into the
process. However, keyboard layout utils may generate native key events
as "repeated" even if each native key is important to input proper text.
So, TabChild shouldn't decide if coming keyboard event is skippable only with
mIsRepeat. For solving this issue, this patch adds
mMaybeSkippableInRemoteProcess to WidgetKeyboardEvent and makes
TabChild::SkipRepeatedKeyEvent() check
WidgetKeyboardEvent::CanSkipInRemoteProcess() instead.
On Windows, there are two ways to generate keyboard input messages. One is
using SendMessage() or PostMessage(). The other is SendInput() API. In both
ways, utils can make their input as repeated key messages.
The former case must be safe for this issue since such utils need to set 31st
bit of lParam to 1 explicitly.
On the other hand, in the latter case, the utils probably need to append
KEYEVENTF_KEYUP into KEYBDINPUT::dwFlags. Otherwise, only first call is
treated as non-repeated event.
So, when given message does not came from physical key operation, NativeKey
should set WidgetKeyboardEvent::mMaybeSkippableInRemoteProcess to false
even if WidgetKeyboardEvent::mIsRepeat is true.
MozReview-Commit-ID: 3rinrOjx8Tf
--HG--
extra : rebase_source : 26b6d869260176fc7ef535323b83001bb4b725c2
2018-06-06 17:35:16 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mMaybeSkippableInRemoteProcess) &&
|
2017-05-19 11:24:20 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mEditCommandsForSingleLineEditor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mEditCommandsForMultiLineEditor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mEditCommandsForRichTextEditor) &&
|
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mEditCommandsForSingleLineEditorInitialized) &&
|
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mEditCommandsForMultiLineEditorInitialized) &&
|
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mEditCommandsForRichTextEditorInitialized)) {
|
2013-09-14 06:39:41 +04:00
|
|
|
aResult->mKeyNameIndex = static_cast<mozilla::KeyNameIndex>(keyNameIndex);
|
2014-05-25 06:08:58 +04:00
|
|
|
aResult->mCodeNameIndex =
|
|
|
|
static_cast<mozilla::CodeNameIndex>(codeNameIndex);
|
2013-10-28 18:05:51 +04:00
|
|
|
aResult->mNativeKeyEvent = nullptr;
|
2013-04-26 11:41:27 +04:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2011-06-22 04:32:43 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
template <>
|
2013-10-01 11:22:59 +04:00
|
|
|
struct ParamTraits<mozilla::TextRangeStyle> {
|
|
|
|
typedef mozilla::TextRangeStyle paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mDefinedStyles);
|
2020-02-17 10:53:46 +03:00
|
|
|
WriteParam(aMsg, static_cast<mozilla::TextRangeStyle::LineStyleType>(
|
|
|
|
aParam.mLineStyle));
|
2010-08-17 12:07:42 +04:00
|
|
|
WriteParam(aMsg, aParam.mIsBoldLine);
|
|
|
|
WriteParam(aMsg, aParam.mForegroundColor);
|
|
|
|
WriteParam(aMsg, aParam.mBackgroundColor);
|
|
|
|
WriteParam(aMsg, aParam.mUnderlineColor);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2020-02-17 10:53:46 +03:00
|
|
|
mozilla::TextRangeStyle::LineStyleType lineStyle;
|
|
|
|
if (!ReadParam(aMsg, aIter, &aResult->mDefinedStyles) ||
|
|
|
|
!ReadParam(aMsg, aIter, &lineStyle) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mIsBoldLine) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mForegroundColor) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mBackgroundColor) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mUnderlineColor)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
aResult->mLineStyle = mozilla::TextRangeStyle::ToLineStyle(lineStyle);
|
|
|
|
return true;
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
2013-10-01 11:22:59 +04:00
|
|
|
struct ParamTraits<mozilla::TextRange> {
|
|
|
|
typedef mozilla::TextRange paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mEndOffset);
|
2016-06-04 03:49:21 +03:00
|
|
|
WriteParam(aMsg, mozilla::ToRawTextRangeType(aParam.mRangeType));
|
2010-08-17 12:07:42 +04:00
|
|
|
WriteParam(aMsg, aParam.mRangeStyle);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-06-04 03:49:21 +03:00
|
|
|
mozilla::RawTextRangeType rawTextRangeType;
|
|
|
|
if (ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mEndOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &rawTextRangeType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRangeStyle)) {
|
|
|
|
aResult->mRangeType = mozilla::ToTextRangeType(rawTextRangeType);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-03-04 17:48:26 +04:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::TextRangeArray> {
|
|
|
|
typedef mozilla::TextRangeArray paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.Length());
|
|
|
|
for (uint32_t index = 0; index < aParam.Length(); index++) {
|
|
|
|
WriteParam(aMsg, aParam[index]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-07-09 00:48:18 +04:00
|
|
|
paramType::size_type length;
|
2014-03-04 17:48:26 +04:00
|
|
|
if (!ReadParam(aMsg, aIter, &length)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
for (uint32_t index = 0; index < length; index++) {
|
|
|
|
mozilla::TextRange textRange;
|
|
|
|
if (!ReadParam(aMsg, aIter, &textRange)) {
|
|
|
|
aResult->Clear();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
aResult->AppendElement(textRange);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
template <>
|
2013-10-01 11:23:00 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetCompositionEvent> {
|
|
|
|
typedef mozilla::WidgetCompositionEvent paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetGUIEvent&>(aParam));
|
2014-10-07 14:01:46 +04:00
|
|
|
WriteParam(aMsg, aParam.mData);
|
2015-12-11 09:15:57 +03:00
|
|
|
WriteParam(aMsg, aParam.mNativeIMEContext);
|
2014-10-07 14:01:47 +04:00
|
|
|
bool hasRanges = !!aParam.mRanges;
|
|
|
|
WriteParam(aMsg, hasRanges);
|
|
|
|
if (hasRanges) {
|
|
|
|
WriteParam(aMsg, *aParam.mRanges.get());
|
|
|
|
}
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-10-07 14:01:47 +04:00
|
|
|
bool hasRanges;
|
|
|
|
if (!ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) ||
|
|
|
|
!ReadParam(aMsg, aIter, &aResult->mData) ||
|
2015-12-11 09:15:57 +03:00
|
|
|
!ReadParam(aMsg, aIter, &aResult->mNativeIMEContext) ||
|
2014-10-07 14:01:47 +04:00
|
|
|
!ReadParam(aMsg, aIter, &hasRanges)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!hasRanges) {
|
|
|
|
aResult->mRanges = nullptr;
|
|
|
|
} else {
|
|
|
|
aResult->mRanges = new mozilla::TextRangeArray();
|
|
|
|
if (!ReadParam(aMsg, aIter, aResult->mRanges.get())) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-01-31 10:17:12 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::FontRange> {
|
|
|
|
typedef mozilla::FontRange paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mFontName);
|
|
|
|
WriteParam(aMsg, aParam.mFontSize);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-01-31 10:17:12 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFontName) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFontSize);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
template <>
|
2013-10-01 11:23:01 +04:00
|
|
|
struct ParamTraits<mozilla::WidgetSelectionEvent> {
|
|
|
|
typedef mozilla::WidgetSelectionEvent paramType;
|
2010-08-17 12:07:42 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::WidgetGUIEvent&>(aParam));
|
2010-08-17 12:07:42 +04:00
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mLength);
|
|
|
|
WriteParam(aMsg, aParam.mReversed);
|
|
|
|
WriteParam(aMsg, aParam.mExpandToClusterBoundary);
|
|
|
|
WriteParam(aMsg, aParam.mSucceeded);
|
2014-04-26 03:52:12 +04:00
|
|
|
WriteParam(aMsg, aParam.mUseNativeLineBreak);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2013-10-02 07:46:03 +04:00
|
|
|
return ReadParam(aMsg, aIter,
|
|
|
|
static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
|
2010-08-17 12:07:42 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLength) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReversed) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mExpandToClusterBoundary) &&
|
2014-04-26 03:52:12 +04:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSucceeded) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUseNativeLineBreak);
|
2010-08-17 12:07:42 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-09-24 07:28:15 +04:00
|
|
|
template <>
|
2017-04-11 15:24:55 +03:00
|
|
|
struct ParamTraits<mozilla::widget::IMENotificationRequests> {
|
|
|
|
typedef mozilla::widget::IMENotificationRequests paramType;
|
2010-09-24 07:28:15 +04:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mWantUpdates);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-01-29 13:32:35 +04:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mWantUpdates);
|
2010-09-24 07:28:15 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-12-11 09:15:57 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::NativeIMEContext> {
|
|
|
|
typedef mozilla::widget::NativeIMEContext paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mRawNativeIMEContext);
|
|
|
|
WriteParam(aMsg, aParam.mOriginProcessID);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-12-11 09:15:57 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mRawNativeIMEContext) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOriginProcessID);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-07-17 07:30:01 +03:00
|
|
|
template <>
|
2015-08-21 19:43:41 +03:00
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::SelectionChangeDataBase> {
|
|
|
|
typedef mozilla::widget::IMENotification::SelectionChangeDataBase paramType;
|
2015-07-17 07:30:01 +03:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2015-07-22 06:40:32 +03:00
|
|
|
MOZ_RELEASE_ASSERT(aParam.mString);
|
2015-07-17 07:30:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
2015-07-22 06:40:32 +03:00
|
|
|
WriteParam(aMsg, *aParam.mString);
|
2015-07-17 07:30:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mWritingMode);
|
|
|
|
WriteParam(aMsg, aParam.mReversed);
|
|
|
|
WriteParam(aMsg, aParam.mCausedByComposition);
|
|
|
|
WriteParam(aMsg, aParam.mCausedBySelectionEvent);
|
2015-10-27 01:21:37 +03:00
|
|
|
WriteParam(aMsg, aParam.mOccurredDuringComposition);
|
2015-07-17 07:30:01 +03:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-07-22 06:40:32 +03:00
|
|
|
aResult->mString = new nsString();
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
2015-07-22 06:40:32 +03:00
|
|
|
ReadParam(aMsg, aIter, aResult->mString) &&
|
2015-07-17 07:30:01 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWritingMode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mReversed) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedByComposition) &&
|
2015-10-27 01:21:37 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedBySelectionEvent) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOccurredDuringComposition);
|
2015-07-17 07:30:01 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::TextChangeDataBase> {
|
|
|
|
typedef mozilla::widget::IMENotification::TextChangeDataBase paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mStartOffset);
|
|
|
|
WriteParam(aMsg, aParam.mRemovedEndOffset);
|
|
|
|
WriteParam(aMsg, aParam.mAddedEndOffset);
|
2016-01-28 07:28:53 +03:00
|
|
|
WriteParam(aMsg, aParam.mCausedOnlyByComposition);
|
2016-01-28 07:28:53 +03:00
|
|
|
WriteParam(aMsg, aParam.mIncludingChangesDuringComposition);
|
2016-01-28 07:28:54 +03:00
|
|
|
WriteParam(aMsg, aParam.mIncludingChangesWithoutComposition);
|
2015-07-17 07:30:01 +03:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mStartOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRemovedEndOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAddedEndOffset) &&
|
2016-01-28 07:28:53 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCausedOnlyByComposition) &&
|
2016-01-28 07:28:54 +03:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mIncludingChangesDuringComposition) &&
|
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mIncludingChangesWithoutComposition);
|
2015-07-17 07:30:01 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification::MouseButtonEventData> {
|
|
|
|
typedef mozilla::widget::IMENotification::MouseButtonEventData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mEventMessage);
|
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mCursorPos);
|
|
|
|
WriteParam(aMsg, aParam.mCharRect);
|
|
|
|
WriteParam(aMsg, aParam.mButton);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
|
|
|
WriteParam(aMsg, aParam.mModifiers);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mEventMessage) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCursorPos) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCharRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButton) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mModifiers);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-09-11 17:46:17 +04:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::IMENotification> {
|
|
|
|
typedef mozilla::widget::IMENotification paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg,
|
|
|
|
static_cast<mozilla::widget::IMEMessageType>(aParam.mMessage));
|
|
|
|
switch (aParam.mMessage) {
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_SELECTION_CHANGE:
|
2015-07-17 07:30:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mSelectionChangeData);
|
2014-09-11 17:46:17 +04:00
|
|
|
return;
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_TEXT_CHANGE:
|
2015-07-17 07:30:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mTextChangeData);
|
2014-09-11 17:46:17 +04:00
|
|
|
return;
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_MOUSE_BUTTON_EVENT:
|
2015-07-17 07:30:01 +03:00
|
|
|
WriteParam(aMsg, aParam.mMouseButtonEventData);
|
2014-09-11 17:46:17 +04:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2014-09-11 17:46:17 +04:00
|
|
|
mozilla::widget::IMEMessageType IMEMessage = 0;
|
|
|
|
if (!ReadParam(aMsg, aIter, &IMEMessage)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
aResult->mMessage = static_cast<mozilla::widget::IMEMessage>(IMEMessage);
|
|
|
|
switch (aResult->mMessage) {
|
|
|
|
case mozilla::widget::NOTIFY_IME_OF_SELECTION_CHANGE:
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mSelectionChangeData);
|
2014-09-11 17:46:17 +04:00
|
|
|
case mozilla::widget::NOTIFY_IME_OF_TEXT_CHANGE:
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mTextChangeData);
|
2014-09-11 17:46:17 +04:00
|
|
|
case mozilla::widget::NOTIFY_IME_OF_MOUSE_BUTTON_EVENT:
|
2015-07-17 07:30:01 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mMouseButtonEventData);
|
2014-09-11 17:46:17 +04:00
|
|
|
default:
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-04-11 19:26:33 +03:00
|
|
|
template <>
|
2020-12-21 08:52:03 +03:00
|
|
|
struct ParamTraits<mozilla::widget::IMEEnabled>
|
|
|
|
: ContiguousEnumSerializer<mozilla::widget::IMEEnabled,
|
|
|
|
mozilla::widget::IMEEnabled::Disabled,
|
|
|
|
mozilla::widget::IMEEnabled::Unknown> {};
|
2018-04-11 19:26:33 +03:00
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::IMEState::Open>
|
|
|
|
: ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::widget::IMEState::Open,
|
|
|
|
mozilla::widget::IMEState::Open::OPEN_STATE_NOT_SUPPORTED,
|
|
|
|
mozilla::widget::IMEState::Open::CLOSED> {};
|
|
|
|
|
2018-06-19 23:31:24 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::IMEState> {
|
|
|
|
typedef mozilla::widget::IMEState paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mEnabled);
|
|
|
|
WriteParam(aMsg, aParam.mOpen);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mEnabled) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOpen);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::InputContext::Origin>
|
|
|
|
: ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::widget::InputContext::Origin,
|
|
|
|
mozilla::widget::InputContext::Origin::ORIGIN_MAIN,
|
|
|
|
mozilla::widget::InputContext::Origin::ORIGIN_CONTENT> {};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::InputContext> {
|
|
|
|
typedef mozilla::widget::InputContext paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mIMEState);
|
|
|
|
WriteParam(aMsg, aParam.mHTMLInputType);
|
|
|
|
WriteParam(aMsg, aParam.mHTMLInputInputmode);
|
|
|
|
WriteParam(aMsg, aParam.mActionHint);
|
2020-09-15 17:27:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mAutocapitalize);
|
2018-06-19 23:31:24 +03:00
|
|
|
WriteParam(aMsg, aParam.mOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mMayBeIMEUnaware);
|
|
|
|
WriteParam(aMsg, aParam.mHasHandledUserInput);
|
|
|
|
WriteParam(aMsg, aParam.mInPrivateBrowsing);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mIMEState) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHTMLInputType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHTMLInputInputmode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mActionHint) &&
|
2020-09-15 17:27:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mAutocapitalize) &&
|
2018-06-19 23:31:24 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mMayBeIMEUnaware) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHasHandledUserInput) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mInPrivateBrowsing);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-04-11 19:26:33 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::InputContextAction::Cause>
|
|
|
|
: ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::widget::InputContextAction::Cause,
|
|
|
|
mozilla::widget::InputContextAction::Cause::CAUSE_UNKNOWN,
|
|
|
|
mozilla::widget::InputContextAction::Cause::
|
|
|
|
CAUSE_UNKNOWN_DURING_KEYBOARD_INPUT> {};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::InputContextAction::FocusChange>
|
|
|
|
: ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::widget::InputContextAction::FocusChange,
|
|
|
|
mozilla::widget::InputContextAction::FocusChange::FOCUS_NOT_CHANGED,
|
|
|
|
mozilla::widget::InputContextAction::FocusChange::WIDGET_CREATED> {};
|
|
|
|
|
2018-06-19 23:31:24 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::InputContextAction> {
|
|
|
|
typedef mozilla::widget::InputContextAction paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mCause);
|
|
|
|
WriteParam(aMsg, aParam.mFocusChange);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mCause) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusChange);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-12-05 05:15:43 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::WritingMode> {
|
|
|
|
typedef mozilla::WritingMode paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2019-09-09 07:49:55 +03:00
|
|
|
WriteParam(aMsg, aParam.mWritingMode.bits);
|
2014-12-05 05:15:43 +03:00
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2019-09-09 07:49:55 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mWritingMode.bits);
|
2014-12-05 05:15:43 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:47:37 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ContentCache::Selection> {
|
|
|
|
typedef mozilla::ContentCache::Selection paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mAnchor);
|
|
|
|
WriteParam(aMsg, aParam.mFocus);
|
|
|
|
WriteParam(aMsg, aParam.mWritingMode);
|
|
|
|
WriteParam(aMsg, aParam.mAnchorCharRects[0]);
|
|
|
|
WriteParam(aMsg, aParam.mAnchorCharRects[1]);
|
|
|
|
WriteParam(aMsg, aParam.mFocusCharRects[0]);
|
|
|
|
WriteParam(aMsg, aParam.mFocusCharRects[1]);
|
|
|
|
WriteParam(aMsg, aParam.mRect);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mAnchor) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocus) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mWritingMode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAnchorCharRects[0]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAnchorCharRects[1]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusCharRects[0]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusCharRects[1]) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:47:50 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ContentCache::Caret> {
|
|
|
|
typedef mozilla::ContentCache::Caret paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mOffset);
|
|
|
|
WriteParam(aMsg, aParam.mRect);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-27 17:48:03 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ContentCache::TextRectArray> {
|
|
|
|
typedef mozilla::ContentCache::TextRectArray paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mStart);
|
|
|
|
WriteParam(aMsg, aParam.mRects);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mStart) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRects);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-06-05 12:28:19 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ContentCache> {
|
|
|
|
typedef mozilla::ContentCache paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2016-06-13 12:17:58 +03:00
|
|
|
WriteParam(aMsg, aParam.mCompositionStart);
|
2015-06-05 12:28:19 +03:00
|
|
|
WriteParam(aMsg, aParam.mText);
|
2020-11-27 17:47:37 +03:00
|
|
|
WriteParam(aMsg, aParam.mSelection);
|
2015-06-17 04:03:58 +03:00
|
|
|
WriteParam(aMsg, aParam.mFirstCharRect);
|
2020-11-27 17:47:50 +03:00
|
|
|
WriteParam(aMsg, aParam.mCaret);
|
2020-11-27 17:48:03 +03:00
|
|
|
WriteParam(aMsg, aParam.mTextRectArray);
|
|
|
|
WriteParam(aMsg, aParam.mLastCommitStringTextRectArray);
|
2015-06-05 12:28:19 +03:00
|
|
|
WriteParam(aMsg, aParam.mEditorRect);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-06-13 12:17:58 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mCompositionStart) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mText) &&
|
2020-11-27 17:47:37 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSelection) &&
|
2015-06-17 04:03:58 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFirstCharRect) &&
|
2020-11-27 17:47:50 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mCaret) &&
|
2020-11-27 17:48:03 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mTextRectArray) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLastCommitStringTextRectArray) &&
|
2015-06-05 12:28:19 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mEditorRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-02-02 11:05:56 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::widget::CandidateWindowPosition> {
|
|
|
|
typedef mozilla::widget::CandidateWindowPosition paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mPoint);
|
|
|
|
WriteParam(aMsg, aParam.mRect);
|
|
|
|
WriteParam(aMsg, aParam.mExcludeRect);
|
|
|
|
}
|
|
|
|
|
2016-04-21 07:09:15 +03:00
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2016-02-02 11:05:56 +03:00
|
|
|
return ReadParam(aMsg, aIter, &aResult->mPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRect) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mExcludeRect);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
// InputData.h
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::InputType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::InputType, mozilla::InputType::MULTITOUCH_INPUT,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::kHighestInputType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::InputData> {
|
|
|
|
typedef mozilla::InputData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mInputType);
|
|
|
|
WriteParam(aMsg, aParam.mTime);
|
|
|
|
WriteParam(aMsg, aParam.mTimeStamp);
|
|
|
|
WriteParam(aMsg, aParam.modifiers);
|
2017-06-06 03:45:31 +03:00
|
|
|
WriteParam(aMsg, aParam.mFocusSequenceNumber);
|
2019-02-26 10:15:43 +03:00
|
|
|
WriteParam(aMsg, aParam.mLayersId);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, &aResult->mInputType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTime) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
2017-06-06 03:45:31 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->modifiers) &&
|
2019-02-26 10:15:43 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusSequenceNumber) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLayersId);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-11-03 19:46:19 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::SingleTouchData::HistoricalTouchData> {
|
|
|
|
typedef mozilla::SingleTouchData::HistoricalTouchData paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
|
|
|
WriteParam(aMsg, aParam.mTimeStamp);
|
|
|
|
WriteParam(aMsg, aParam.mScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mRadius);
|
|
|
|
WriteParam(aMsg, aParam.mRotationAngle);
|
|
|
|
WriteParam(aMsg, aParam.mForce);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return (ReadParam(aMsg, aIter, &aResult->mTimeStamp) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRadius) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRotationAngle) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mForce));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::SingleTouchData> {
|
2021-05-07 21:01:28 +03:00
|
|
|
using paramType = mozilla::SingleTouchData;
|
2016-07-20 14:37:00 +03:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2020-11-03 19:46:19 +03:00
|
|
|
WriteParam(aMsg, aParam.mHistoricalData);
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mIdentifier);
|
|
|
|
WriteParam(aMsg, aParam.mScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalScreenPoint);
|
|
|
|
WriteParam(aMsg, aParam.mRadius);
|
|
|
|
WriteParam(aMsg, aParam.mRotationAngle);
|
|
|
|
WriteParam(aMsg, aParam.mForce);
|
2021-05-07 21:01:28 +03:00
|
|
|
WriteParam(aMsg, aParam.mTiltX);
|
|
|
|
WriteParam(aMsg, aParam.mTiltY);
|
|
|
|
WriteParam(aMsg, aParam.mTwist);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
2020-11-03 19:46:19 +03:00
|
|
|
return (ReadParam(aMsg, aIter, &aResult->mHistoricalData) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIdentifier) &&
|
2016-07-20 14:37:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalScreenPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRadius) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mRotationAngle) &&
|
2021-05-07 21:01:28 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mForce) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTiltX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTiltY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTwist));
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::MultiTouchInput::MultiTouchType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::MultiTouchInput::MultiTouchType,
|
|
|
|
mozilla::MultiTouchInput::MultiTouchType::MULTITOUCH_START,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::MultiTouchInput::sHighestMultiTouchType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::MultiTouchInput> {
|
2021-05-31 16:39:18 +03:00
|
|
|
using paramType = mozilla::MultiTouchInput;
|
2016-07-20 14:37:00 +03:00
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mTouches);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
2019-01-31 19:46:10 +03:00
|
|
|
WriteParam(aMsg, aParam.mScreenOffset);
|
2021-05-31 16:39:18 +03:00
|
|
|
WriteParam(aMsg, aParam.mButton);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mTouches) &&
|
2019-01-31 19:46:10 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ) &&
|
2021-05-31 16:39:18 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScreenOffset) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButton) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::MouseInput::MouseType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::MouseInput::MouseType,
|
|
|
|
mozilla::MouseInput::MouseType::MOUSE_NONE,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::MouseInput::sHighestMouseType> {};
|
2016-07-20 14:37:00 +03:00
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::MouseInput::ButtonType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::MouseInput::ButtonType,
|
2020-06-19 20:50:43 +03:00
|
|
|
mozilla::MouseInput::ButtonType::PRIMARY_BUTTON,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::MouseInput::sHighestButtonType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::MouseInput> {
|
|
|
|
typedef mozilla::MouseInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mButtonType);
|
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mInputSource);
|
|
|
|
WriteParam(aMsg, aParam.mButtons);
|
|
|
|
WriteParam(aMsg, aParam.mOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mLocalOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
2021-03-23 22:22:49 +03:00
|
|
|
WriteParam(aMsg, aParam.mPreventClickEvent);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtonType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mInputSource) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mButtons) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalOrigin) &&
|
2021-03-23 22:22:49 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPreventClickEvent);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::PanGestureInput::PanGestureType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::PanGestureInput::PanGestureType,
|
|
|
|
mozilla::PanGestureInput::PanGestureType::PANGESTURE_MAYSTART,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::PanGestureInput::sHighestPanGestureType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
2019-06-20 23:18:45 +03:00
|
|
|
struct ParamTraits<mozilla::PanGestureInput::PanDeltaType>
|
|
|
|
: public ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::PanGestureInput::PanDeltaType,
|
|
|
|
mozilla::PanGestureInput::PanDeltaType::PANDELTA_PAGE,
|
|
|
|
mozilla::PanGestureInput::sHighestPanDeltaType> {};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::PanGestureInput>
|
|
|
|
: BitfieldHelper<mozilla::PanGestureInput> {
|
2016-07-20 14:37:00 +03:00
|
|
|
typedef mozilla::PanGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mPanStartPoint);
|
|
|
|
WriteParam(aMsg, aParam.mPanDisplacement);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPanStartPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPanDisplacement);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierX);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierY);
|
2019-06-20 23:18:45 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaType);
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
WriteParam(aMsg, aParam.mFollowedByMomentum);
|
|
|
|
WriteParam(
|
|
|
|
aMsg,
|
|
|
|
aParam
|
|
|
|
.mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection);
|
2017-10-24 01:27:24 +03:00
|
|
|
WriteParam(aMsg, aParam.mOverscrollBehaviorAllowsSwipe);
|
2019-06-20 23:18:45 +03:00
|
|
|
WriteParam(aMsg, aParam.mSimulateMomentum);
|
2021-08-09 01:04:17 +03:00
|
|
|
WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPanStartPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPanDisplacement) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPanStartPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPanDisplacement) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierY) &&
|
2019-06-20 23:18:45 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaType) &&
|
|
|
|
ReadBoolForBitfield(aMsg, aIter, aResult,
|
|
|
|
¶mType::SetHandledByAPZ) &&
|
|
|
|
ReadBoolForBitfield(aMsg, aIter, aResult,
|
|
|
|
¶mType::SetFollowedByMomentum) &&
|
|
|
|
ReadBoolForBitfield(
|
|
|
|
aMsg, aIter, aResult,
|
|
|
|
¶mType::
|
|
|
|
SetRequiresContentResponseIfCannotScrollHorizontallyInStartDirection) &&
|
|
|
|
ReadBoolForBitfield(aMsg, aIter, aResult,
|
|
|
|
¶mType::SetOverscrollBehaviorAllowsSwipe) &&
|
|
|
|
ReadBoolForBitfield(aMsg, aIter, aResult,
|
2021-08-09 01:04:17 +03:00
|
|
|
¶mType::SetSimulateMomentum) &&
|
|
|
|
ReadBoolForBitfield(aMsg, aIter, aResult,
|
|
|
|
¶mType::SetIsNoLineOrPageDelta);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::PinchGestureInput::PinchGestureType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::PinchGestureInput::PinchGestureType,
|
|
|
|
mozilla::PinchGestureInput::PinchGestureType::PINCHGESTURE_START,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::PinchGestureInput::sHighestPinchGestureType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2020-06-06 03:32:19 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::PinchGestureInput::PinchGestureSource>
|
|
|
|
: public ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::PinchGestureInput::PinchGestureSource,
|
|
|
|
// Set the min to TOUCH, to ensure UNKNOWN is never sent over IPC
|
|
|
|
mozilla::PinchGestureInput::PinchGestureSource::TOUCH,
|
|
|
|
mozilla::PinchGestureInput::sHighestPinchGestureSource> {};
|
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::PinchGestureInput> {
|
|
|
|
typedef mozilla::PinchGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mType);
|
2020-06-06 03:32:19 +03:00
|
|
|
WriteParam(aMsg, aParam.mSource);
|
2019-01-31 19:46:10 +03:00
|
|
|
WriteParam(aMsg, aParam.mScreenOffset);
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mFocusPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalFocusPoint);
|
|
|
|
WriteParam(aMsg, aParam.mCurrentSpan);
|
|
|
|
WriteParam(aMsg, aParam.mPreviousSpan);
|
2020-08-11 12:08:06 +03:00
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
2020-05-03 02:03:20 +03:00
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
2020-06-06 03:32:19 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mSource) &&
|
2019-01-31 19:46:10 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mScreenOffset) &&
|
2016-07-20 14:37:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mFocusPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalFocusPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCurrentSpan) &&
|
2020-05-03 02:03:20 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mPreviousSpan) &&
|
2020-08-11 12:08:06 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
2020-05-03 02:03:20 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::TapGestureInput::TapGestureType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::TapGestureInput::TapGestureType,
|
|
|
|
mozilla::TapGestureInput::TapGestureType::TAPGESTURE_LONG,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::TapGestureInput::sHighestTapGestureType> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::TapGestureInput> {
|
|
|
|
typedef mozilla::TapGestureInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mPoint);
|
|
|
|
WriteParam(aMsg, aParam.mLocalPoint);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mPoint) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalPoint);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput::ScrollDeltaType>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::ScrollWheelInput::ScrollDeltaType,
|
|
|
|
mozilla::ScrollWheelInput::ScrollDeltaType::SCROLLDELTA_LINE,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::ScrollWheelInput::sHighestScrollDeltaType> {};
|
2016-07-20 14:37:00 +03:00
|
|
|
|
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput::ScrollMode>
|
2017-07-01 04:18:55 +03:00
|
|
|
: public ContiguousEnumSerializerInclusive<
|
2016-07-20 14:37:00 +03:00
|
|
|
mozilla::ScrollWheelInput::ScrollMode,
|
|
|
|
mozilla::ScrollWheelInput::ScrollMode::SCROLLMODE_INSTANT,
|
2017-07-01 04:18:55 +03:00
|
|
|
mozilla::ScrollWheelInput::sHighestScrollMode> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2018-03-16 14:23:53 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::WheelDeltaAdjustmentStrategy>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::WheelDeltaAdjustmentStrategy,
|
|
|
|
mozilla::WheelDeltaAdjustmentStrategy(0),
|
|
|
|
mozilla::WheelDeltaAdjustmentStrategy::eSentinel> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-12-06 19:56:36 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::layers::APZWheelAction>
|
|
|
|
: public ContiguousEnumSerializerInclusive<
|
|
|
|
mozilla::layers::APZWheelAction,
|
|
|
|
mozilla::layers::APZWheelAction::Scroll,
|
|
|
|
mozilla::layers::kHighestAPZWheelAction> {};
|
|
|
|
|
2016-07-20 14:37:00 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::ScrollWheelInput> {
|
|
|
|
typedef mozilla::ScrollWheelInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mDeltaType);
|
|
|
|
WriteParam(aMsg, aParam.mScrollMode);
|
|
|
|
WriteParam(aMsg, aParam.mOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
WriteParam(aMsg, aParam.mDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mDeltaY);
|
2021-05-14 18:17:33 +03:00
|
|
|
WriteParam(aMsg, aParam.mWheelTicksX);
|
|
|
|
WriteParam(aMsg, aParam.mWheelTicksY);
|
2016-07-20 14:37:00 +03:00
|
|
|
WriteParam(aMsg, aParam.mLocalOrigin);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaX);
|
|
|
|
WriteParam(aMsg, aParam.mLineOrPageDeltaY);
|
|
|
|
WriteParam(aMsg, aParam.mScrollSeriesNumber);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierX);
|
|
|
|
WriteParam(aMsg, aParam.mUserDeltaMultiplierY);
|
|
|
|
WriteParam(aMsg, aParam.mMayHaveMomentum);
|
|
|
|
WriteParam(aMsg, aParam.mIsMomentum);
|
|
|
|
WriteParam(aMsg, aParam.mAllowToOverrideSystemScrollSpeed);
|
2018-03-16 14:23:53 +03:00
|
|
|
WriteParam(aMsg, aParam.mWheelDeltaAdjustmentStrategy);
|
2019-12-06 19:56:36 +03:00
|
|
|
WriteParam(aMsg, aParam.mAPZAction);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollMode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mDeltaY) &&
|
2021-05-14 18:17:33 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWheelTicksX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mWheelTicksY) &&
|
2016-07-20 14:37:00 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mLocalOrigin) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mLineOrPageDeltaY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mScrollSeriesNumber) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierX) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mUserDeltaMultiplierY) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mMayHaveMomentum) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mIsMomentum) &&
|
2018-03-16 14:23:53 +03:00
|
|
|
ReadParam(aMsg, aIter,
|
|
|
|
&aResult->mAllowToOverrideSystemScrollSpeed) &&
|
2019-12-06 19:56:36 +03:00
|
|
|
ReadParam(aMsg, aIter, &aResult->mWheelDeltaAdjustmentStrategy) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mAPZAction);
|
2016-07-20 14:37:00 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-06-06 02:09:40 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::KeyboardInput::KeyboardEventType>
|
|
|
|
: public ContiguousEnumSerializer<
|
|
|
|
mozilla::KeyboardInput::KeyboardEventType,
|
|
|
|
mozilla::KeyboardInput::KeyboardEventType::KEY_DOWN,
|
|
|
|
mozilla::KeyboardInput::KeyboardEventType::KEY_SENTINEL> {};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2017-06-06 02:09:40 +03:00
|
|
|
template <>
|
|
|
|
struct ParamTraits<mozilla::KeyboardInput> {
|
|
|
|
typedef mozilla::KeyboardInput paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam) {
|
2017-07-05 12:59:44 +03:00
|
|
|
WriteParam(aMsg, static_cast<const mozilla::InputData&>(aParam));
|
2017-06-06 02:09:40 +03:00
|
|
|
WriteParam(aMsg, aParam.mType);
|
|
|
|
WriteParam(aMsg, aParam.mKeyCode);
|
|
|
|
WriteParam(aMsg, aParam.mCharCode);
|
|
|
|
WriteParam(aMsg, aParam.mShortcutCandidates);
|
|
|
|
WriteParam(aMsg, aParam.mHandledByAPZ);
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
|
|
|
paramType* aResult) {
|
|
|
|
return ReadParam(aMsg, aIter, static_cast<mozilla::InputData*>(aResult)) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mType) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mKeyCode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mCharCode) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mShortcutCandidates) &&
|
|
|
|
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-08-17 12:07:42 +04:00
|
|
|
} // namespace IPC
|
|
|
|
|
|
|
|
#endif // nsGUIEventIPC_h__
|