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:
@@ -52,6 +52,7 @@
|
|||||||
#include "mozilla/ipc/UtilityProcessManager.h"
|
#include "mozilla/ipc/UtilityProcessManager.h"
|
||||||
#include "mozilla/ipc/UtilityProcessHost.h"
|
#include "mozilla/ipc/UtilityProcessHost.h"
|
||||||
#include "mozilla/net/UrlClassifierFeatureFactory.h"
|
#include "mozilla/net/UrlClassifierFeatureFactory.h"
|
||||||
|
#include "mozilla/WheelHandlingHelper.h"
|
||||||
#include "IOActivityMonitor.h"
|
#include "IOActivityMonitor.h"
|
||||||
#include "nsNativeTheme.h"
|
#include "nsNativeTheme.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
@@ -1696,6 +1697,15 @@ void ChromeUtils::ResetLastExternalProtocolIframeAllowed(
|
|||||||
PopupBlocker::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 */
|
/* static */
|
||||||
void ChromeUtils::RegisterWindowActor(const GlobalObject& aGlobal,
|
void ChromeUtils::RegisterWindowActor(const GlobalObject& aGlobal,
|
||||||
const nsACString& aName,
|
const nsACString& aName,
|
||||||
|
|||||||
@@ -251,6 +251,8 @@ class ChromeUtils {
|
|||||||
|
|
||||||
static void ResetLastExternalProtocolIframeAllowed(GlobalObject& aGlobal);
|
static void ResetLastExternalProtocolIframeAllowed(GlobalObject& aGlobal);
|
||||||
|
|
||||||
|
static void EndWheelTransaction(GlobalObject& aGlobal);
|
||||||
|
|
||||||
static void RegisterWindowActor(const GlobalObject& aGlobal,
|
static void RegisterWindowActor(const GlobalObject& aGlobal,
|
||||||
const nsACString& aName,
|
const nsACString& aName,
|
||||||
const WindowActorOptions& aOptions,
|
const WindowActorOptions& aOptions,
|
||||||
|
|||||||
@@ -613,6 +613,13 @@ partial namespace ChromeUtils {
|
|||||||
[ChromeOnly]
|
[ChromeOnly]
|
||||||
undefined resetLastExternalProtocolIframeAllowed();
|
undefined resetLastExternalProtocolIframeAllowed();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For webdriver consistency purposes, we need to be able to end a wheel
|
||||||
|
* transaction from the browser chrome.
|
||||||
|
*/
|
||||||
|
[ChromeOnly]
|
||||||
|
undefined endWheelTransaction();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a new toplevel window global actor. This method may only be
|
* Register a new toplevel window global actor. This method may only be
|
||||||
* called in the parent process. |name| must be globally unique.
|
* called in the parent process. |name| must be globally unique.
|
||||||
|
|||||||
Reference in New Issue
Block a user