From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../android/modules/geckoview/GeckoViewNavigation.sys.mjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'mobile/android/modules/geckoview/GeckoViewNavigation.sys.mjs') diff --git a/mobile/android/modules/geckoview/GeckoViewNavigation.sys.mjs b/mobile/android/modules/geckoview/GeckoViewNavigation.sys.mjs index 287a605dff..bc098f0413 100644 --- a/mobile/android/modules/geckoview/GeckoViewNavigation.sys.mjs +++ b/mobile/android/modules/geckoview/GeckoViewNavigation.sys.mjs @@ -155,7 +155,7 @@ export class GeckoViewNavigation extends GeckoViewModule { } // Bundle event handler. - async onEvent(aEvent, aData, aCallback) { + async onEvent(aEvent, aData) { debug`onEvent: event=${aEvent}, data=${aData}`; switch (aEvent) { @@ -291,7 +291,7 @@ export class GeckoViewNavigation extends GeckoViewModule { return new Promise(resolve => { const handler = { - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { if ( aTopic === "geckoview-window-created" && aSubject.name === aSessionId @@ -371,7 +371,7 @@ export class GeckoViewNavigation extends GeckoViewModule { // Wait indefinitely for app to respond with a browser or null Services.tm.spinEventLoopUntil( - "GeckoViewNavigation.jsm:handleNewSession", + "GeckoViewNavigation.sys.mjs:handleNewSession", () => this.window.closed || browser !== undefined ); return browser || null; @@ -383,8 +383,7 @@ export class GeckoViewNavigation extends GeckoViewModule { aOpenWindowInfo, aWhere, aFlags, - aTriggeringPrincipal, - aCsp + aTriggeringPrincipal ) { debug`createContentWindow: uri=${aUri && aUri.spec} where=${aWhere} flags=${aFlags}`; @@ -585,7 +584,7 @@ export class GeckoViewNavigation extends GeckoViewModule { } // WebProgress event handler. - onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocationURI) { debug`onLocationChange`; let fixedURI = aLocationURI; @@ -648,6 +647,8 @@ export class GeckoViewNavigation extends GeckoViewModule { canGoForward: this.browser.canGoForward, isTopLevel: aWebProgress.isTopLevel, permissions, + hasUserGesture: + this.window.document.hasValidTransientUserGestureActivation, }; lazy.TranslationsParent.onLocationChange(this.browser); this.eventDispatcher.sendRequest(message); -- cgit v1.2.3