Remove support for a default prompt delegate in GeckoView. Instead, all
prompts without a known window will go to the active GeckoView if
available.
MozReview-Commit-ID: C62V6jtgDCl
Add a "defaultCallback" option to the doorhanger API that specifies a
callback to call when the doorhanger is dismissed without a button being
clicked. Use that to deny a permission in ContentPermissionPrompt.js
when the doorhanger is dismissed without explicit action.
MozReview-Commit-ID: 9kOAWirI4Ux
When a site opens link in a new tab that redirects to an external app,
we should close the new (empty) tab and return to the previous page.
MozReview-Commit-ID: KXWA2d26RBh
--HG--
extra : rebase_source : 601dd7a26b070102c7785f68bf2f3fec3f6f003b
Amongst others, this includes some prompts, as well as various progress messages sent to the Java UI.
We also fix getTabWithURL to be able to find tabs regardless of whether the given URL to search is written in Punycode or with Unicode characters.
MozReview-Commit-ID: K7xhgz2IK2h
--HG--
extra : rebase_source : cf8a56ef84be77a6c01d7c926b7eae43a20ca453
Use the universal DoorHanger API from Prompt.jsm to show the login
doorhanger from any window. Also, refactor parts of LoginManagerPrompter
to use Services.jsm if possible.
MozReview-Commit-ID: 3cnzeT0RNgR
--HG--
extra : rebase_source : 70a926fec8d15c70a75f6afe771e973fd62fe9c9
Change the subscripts (e.g. FormAssistant.js) that we load in BrowserCLH
into proper .jsm modules. This avoids the `defineLazyScriptGetter`
incompatibility mentioned in the bug, and when we turn on shared JSM
global, any memory advantage we get from using subscripts should not
matter anymore.
MozReview-Commit-ID: krSwANdtb5
--HG--
rename : mobile/android/chrome/content/ActionBarHandler.js => mobile/android/modules/ActionBarHandler.jsm
rename : mobile/android/chrome/content/FormAssistant.js => mobile/android/modules/FormAssistant.jsm
rename : mobile/android/chrome/content/InputWidgetHelper.js => mobile/android/modules/InputWidgetHelper.jsm
rename : mobile/android/chrome/content/SelectHelper.js => mobile/android/modules/SelectHelper.jsm
rename : mobile/android/chrome/content/WebrtcUI.js => mobile/android/modules/WebrtcUI.jsm
extra : rebase_source : fa361c9eeea38485ba6a8f6c49321c32304d4006
Add a `window` parameter to all Prompt.jsm usages, so the prompt will
appear in the correct window. This includes HelperAppDialog.js, which
was preventing the download chooser dialog from appearing in a custom
tab window.
The patch also moves `getActiveDispatcher` from GeckoViewPermission to
GeckoViewUtils, and makes several improvements to `getChromeWindow` and
`getDispatcherForWindow`. Prompt.jsm now uses the active
WindowDispatcher in the fallback scenario where we don't have a window.
MozReview-Commit-ID: KpAFMCZzQZp
Use ActionBarHandler in BrowserCLH.js instead of browser.js, so it can
handle text selection for all windows. Also update ActionBarHandler to
reflect the new usage and to support multiple windows.
MozReview-Commit-ID: G8sKu2XyAAG
Use event callbacks instead of separate events to deliver
FormAssistPopup replies back to FormAssistant. This lets us better
handle having multiple FormAssistPopup instances across Fennec, custom
tabs, and PWAs.
FormAssistant._currentInputElement is removed because it does not allow
us to have multiple concurrent popups. Instead, we track the current
element through the event callback closure.
FormAssistant._currentInputValue is also removed for similar reasons,
and I don't think it was really necessary.
MozReview-Commit-ID: DdeMBGCxDou
To support FormAssistPopup in custom tabs, we need to move the
FormAssitant object out of browser.js and into its own separate file.
BrowserCLH.h in turn loads FormAssistant.js when necessary.
MozReview-Commit-ID: 7CFQ9R16P4J
Move the form fill event listeners out of browser.js and into
BrowserCLH.js, and update them to support chrome windows, so we can
handle form fill events for Fennec, custom tabs, and PWAs.
MozReview-Commit-ID: Fb5gWmGvxfE
Use the BrowserCLH for PromptService startup, to consolidate startup
handling code and also to delay loading PromptService.
MozReview-Commit-ID: 25UgVH7wrrs
Move `addLazyGetter` and `addLazyEventListener` utility functions from
GeckoViewStartup.js into GeckoViewUtils.jsm, so they can be used for
both Fennec and standalone GeckoView.
Also switch to "chrome-document-loaded" for loading
DownloadNotifications because that's later in the startup sequence.
MozReview-Commit-ID: 1caMtufkHGR
This adds two properties to the Tab object:
- isArticle indicates whether the document in the tab is likely able to be
rendered in reader mode.
- isInReaderMode indicates if the document in the tab is being rendered in
reader mode.
It also adds a toggleReaderMode() which toggles a tab into and out of reader mode.
There is also a new case in which tabs.onUpdated will fire. When the isArticle
status of a tab changes, an onUpdated event will fire with data {isArticle: boolean}.
MozReview-Commit-ID: AaAQ0V5qm2Z
--HG--
extra : rebase_source : f9cbed6dff56781ecd86281cb46f23f0ec8aecf6
Add a GeckoViewStartup component to consolidate tasks performed during
GeckoView startup, such as adding lazy observers and event listeners.
This enables us to not load individual GeckoView modules such as
GeckoViewPermission and GeckoViewPrompt until they are actually needed.
MozReview-Commit-ID: IsaUGwBHKbs
--HG--
extra : rebase_source : 0bda1af1e97b9bafea3aa72195f3ea937cf8a273
Move AsyncPrefs initialization to inside browser.js to only load it for
Fennec. Also, delay initialization until later in startup.
MozReview-Commit-ID: 7gLaXA5UJud
--HG--
extra : rebase_source : c71edca4a13f3de785e06f2e0a249ff80fd8c1d4
Add a GeckoViewStartup component to consolidate tasks performed during
GeckoView startup, such as adding lazy observers and event listeners.
This enables us to not load individual GeckoView modules such as
GeckoViewPermission and GeckoViewPrompt until they are actually needed.
MozReview-Commit-ID: IsaUGwBHKbs
--HG--
extra : rebase_source : c22e71eda6ad11230046de64dc54c882be2ed555
Move AsyncPrefs initialization to inside browser.js to only load it for
Fennec. Also, delay initialization until later in startup.
MozReview-Commit-ID: 7gLaXA5UJud
--HG--
extra : rebase_source : c721bbc6c9340f65161c415405dfba16e527b962