mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1850213 - Initialize mInHTMLEditorEventListener. r=masayuki
`mInHTMLEditorEventListener` isn't initialized during IPC, so this variable is randomly between multi-process. Also, I try to write a test for it, but drag and drop tests don't seem to support multi-process. Differential Revision: https://phabricator.services.mozilla.com/D196694
This commit is contained in:
parent
e0866e30d7
commit
1f335743e7
@ -383,7 +383,9 @@ class WidgetDragEvent : public WidgetMouseEvent {
|
||||
|
||||
protected:
|
||||
WidgetDragEvent()
|
||||
: mUserCancelled(false), mDefaultPreventedOnContent(false) {}
|
||||
: mUserCancelled(false),
|
||||
mDefaultPreventedOnContent(false),
|
||||
mInHTMLEditorEventListener(false) {}
|
||||
|
||||
public:
|
||||
virtual WidgetDragEvent* AsDragEvent() override { return this; }
|
||||
@ -425,6 +427,8 @@ class WidgetDragEvent : public WidgetMouseEvent {
|
||||
// XXX mUserCancelled isn't copied, is this intentionally?
|
||||
mUserCancelled = false;
|
||||
mDefaultPreventedOnContent = aEvent.mDefaultPreventedOnContent;
|
||||
// XXX mInHTMLEditorEventListener isn't copied, is this intentionally?
|
||||
mInHTMLEditorEventListener = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -270,13 +270,15 @@ struct ParamTraits<mozilla::WidgetDragEvent> {
|
||||
WriteParam(aWriter, static_cast<const mozilla::WidgetMouseEvent&>(aParam));
|
||||
WriteParam(aWriter, aParam.mUserCancelled);
|
||||
WriteParam(aWriter, aParam.mDefaultPreventedOnContent);
|
||||
WriteParam(aWriter, aParam.mInHTMLEditorEventListener);
|
||||
}
|
||||
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
bool rv =
|
||||
ReadParam(aReader, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
||||
ReadParam(aReader, &aResult->mUserCancelled) &&
|
||||
ReadParam(aReader, &aResult->mDefaultPreventedOnContent);
|
||||
ReadParam(aReader, &aResult->mDefaultPreventedOnContent) &&
|
||||
ReadParam(aReader, &aResult->mInHTMLEditorEventListener);
|
||||
return rv;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user