After landing bug 1673068, `LoadURIDelegate.jsm` isn't used until error page
is shown. This should move to lazy and convert to ES system module.
Differential Revision: https://phabricator.services.mozilla.com/D175661
Implemented the inverted-colors media feature from Media Queries Level 5
for all platforms.
Spec: https://drafts.csswg.org/mediaqueries-5/#inverted
Platform specific implementations:
- Windows: Checks system color filter setting, and if it is inverted
(note: Windows does not live update due to having to read a reg key)
- Mac: Checks dedicated inverted accessibility system setting
- Android: Checks dedicated inverted system setting
- Linux: No GTK API exposes anything like it so always none
Locked behind new pref `layout.css.inverted-colors.enabled`,
always off by default for now.
Also added new WPT tests (none previously).
Other browsers:
- WebKit: shipped since Safari 9.1 (Jan 2017)
- Blink: no signal
Test page: https://goose.icu/inverted-colors
Differential Revision: https://phabricator.services.mozilla.com/D173201
Also, GeckoViewStorageController might not use correct principal since
bug 1801338 doesn't consider GeckoView.
So this fix loads correct ESM and use lazy loading.
Differential Revision: https://phabricator.services.mozilla.com/D174557
This bug changes the preference for window.print (dom.enable_window_print)
in GeckoView and Android to on by default. It also adjusts WPT expectations.
Differential Revision: https://phabricator.services.mozilla.com/D174535
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.
In Fenix, we could use this new delegate like this:
```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
}
}
- runtime.webExtensionController.promptDelegate = promptDelegate
+ val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+ override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+ webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+ }
+ }
+
+ runtime.webExtensionController.setPromptDelegate(promptDelegate)
runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+ runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
}
/**
@@ -422,7 +429,6 @@ class GeckoEngine(
runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
{
val disabledExtension = GeckoWebExtension(it!!, runtime)
- webExtensionDelegate?.onDisabled(disabledExtension)
onSuccess(disabledExtension)
GeckoResult<Void>()
},
```
Differential Revision: https://phabricator.services.mozilla.com/D173835
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.
In Fenix, we could use this new delegate like this:
```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
}
}
- runtime.webExtensionController.promptDelegate = promptDelegate
+ val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+ override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+ webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+ }
+ }
+
+ runtime.webExtensionController.setPromptDelegate(promptDelegate)
runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+ runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
}
/**
@@ -422,7 +429,6 @@ class GeckoEngine(
runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
{
val disabledExtension = GeckoWebExtension(it!!, runtime)
- webExtensionDelegate?.onDisabled(disabledExtension)
onSuccess(disabledExtension)
GeckoResult<Void>()
},
```
Differential Revision: https://phabricator.services.mozilla.com/D173835
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.
In Fenix, we could use this new delegate like this:
```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
}
}
- runtime.webExtensionController.promptDelegate = promptDelegate
+ val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+ override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+ webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+ }
+ }
+
+ runtime.webExtensionController.setPromptDelegate(promptDelegate)
runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+ runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
}
/**
@@ -422,7 +429,6 @@ class GeckoEngine(
runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
{
val disabledExtension = GeckoWebExtension(it!!, runtime)
- webExtensionDelegate?.onDisabled(disabledExtension)
onSuccess(disabledExtension)
GeckoResult<Void>()
},
```
Differential Revision: https://phabricator.services.mozilla.com/D173835
This is a race condition of full screen event and activated event of media
controller.
Media controller will dispatch activated event when full screen button is
clicked on controller. But since this depends on full screen event, if
GeckoView's media session receives this event before controller fires activated
event, `MediaSession.Delegate.onFullscreen` won't be called because
MediaSession.isActive() is false at this time.
So I would like to retry `GeckoView:MediaSession:Fullscreen` call when
entering full screen and controller isn't active yet.
Differential Revision: https://phabricator.services.mozilla.com/D173831
By means of setting the browser's initial activeness to false, a newly created background tab will
no longer have an active browsing context which reduces its cpu consumption while it is not selected.
The setTimeout callback is going to be throttled when the tab is created in the background by the
help of this fix.
Differential Revision: https://phabricator.services.mozilla.com/D173320