Bug 1821733 - Add chrome-only method for ending a wheel event group. r=smaug

Add a chrome-only method for ending a wheel event group. This can then
be used by the webdriver to ensure that the wheel event group does not
live longer than the action chain.

Differential Revision: https://phabricator.services.mozilla.com/D177923
This commit is contained in:
Dan Robertson
2023-05-22 19:50:10 +00:00
parent e25d8453a7
commit 0124920014
3 changed files with 19 additions and 0 deletions

View File

@@ -52,6 +52,7 @@
#include "mozilla/ipc/UtilityProcessManager.h"
#include "mozilla/ipc/UtilityProcessHost.h"
#include "mozilla/net/UrlClassifierFeatureFactory.h"
#include "mozilla/WheelHandlingHelper.h"
#include "IOActivityMonitor.h"
#include "nsNativeTheme.h"
#include "nsThreadUtils.h"
@@ -1696,6 +1697,15 @@ void ChromeUtils::ResetLastExternalProtocolIframeAllowed(
PopupBlocker::ResetLastExternalProtocolIframeAllowed();
}
/* static */
void ChromeUtils::EndWheelTransaction(GlobalObject& aGlobal) {
// This allows us to end the current wheel transaction from the browser
// chrome. We do not need to perform any checks before calling
// EndTransaction(), as it should do nothing in the case that there is
// no current wheel transaction.
WheelTransaction::EndTransaction();
}
/* static */
void ChromeUtils::RegisterWindowActor(const GlobalObject& aGlobal,
const nsACString& aName,