forked from mirrors/gecko-dev
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
2 changed files with 8 additions and 2 deletions
|
|
@ -383,7 +383,9 @@ class WidgetDragEvent : public WidgetMouseEvent {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WidgetDragEvent()
|
WidgetDragEvent()
|
||||||
: mUserCancelled(false), mDefaultPreventedOnContent(false) {}
|
: mUserCancelled(false),
|
||||||
|
mDefaultPreventedOnContent(false),
|
||||||
|
mInHTMLEditorEventListener(false) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual WidgetDragEvent* AsDragEvent() override { return this; }
|
virtual WidgetDragEvent* AsDragEvent() override { return this; }
|
||||||
|
|
@ -425,6 +427,8 @@ class WidgetDragEvent : public WidgetMouseEvent {
|
||||||
// XXX mUserCancelled isn't copied, is this intentionally?
|
// XXX mUserCancelled isn't copied, is this intentionally?
|
||||||
mUserCancelled = false;
|
mUserCancelled = false;
|
||||||
mDefaultPreventedOnContent = aEvent.mDefaultPreventedOnContent;
|
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, static_cast<const mozilla::WidgetMouseEvent&>(aParam));
|
||||||
WriteParam(aWriter, aParam.mUserCancelled);
|
WriteParam(aWriter, aParam.mUserCancelled);
|
||||||
WriteParam(aWriter, aParam.mDefaultPreventedOnContent);
|
WriteParam(aWriter, aParam.mDefaultPreventedOnContent);
|
||||||
|
WriteParam(aWriter, aParam.mInHTMLEditorEventListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||||
bool rv =
|
bool rv =
|
||||||
ReadParam(aReader, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
ReadParam(aReader, static_cast<mozilla::WidgetMouseEvent*>(aResult)) &&
|
||||||
ReadParam(aReader, &aResult->mUserCancelled) &&
|
ReadParam(aReader, &aResult->mUserCancelled) &&
|
||||||
ReadParam(aReader, &aResult->mDefaultPreventedOnContent);
|
ReadParam(aReader, &aResult->mDefaultPreventedOnContent) &&
|
||||||
|
ReadParam(aReader, &aResult->mInHTMLEditorEventListener);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue