Bug 1772634 - part 2: Make BrowserParent::RecvSynthesizeNativeTouchPoint relax in the responsive design mode r=smaug

It's used by the DevTools to emulate touch events from mouse events in the
responsive design mode.  Therefore, we should make it accept IPC messages
even if it's not in the automation mode, but it's in the responsive design mode.

Differential Revision: https://phabricator.services.mozilla.com/D148365
This commit is contained in:
Masayuki Nakano
2022-06-06 14:30:42 +00:00
parent 98b4f88856
commit 243a3b9e44
3 changed files with 17 additions and 1 deletions

View File

@@ -1921,6 +1921,9 @@ void nsIWidget::OnLongTapTimerCallback(nsITimer* aTimer, void* aClosure) {
nsresult nsIWidget::ClearNativeTouchSequence(nsIObserver* aObserver) {
AutoObserverNotifier notifier(aObserver, "cleartouch");
// XXX This is odd. This is called by the constructor of nsIWidget. However,
// at that point, nsIWidget::mLongTapTimer must be nullptr. Therefore,
// this must do nothing at initializing the instance.
if (!mLongTapTimer) {
return NS_OK;
}