зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
772c8edfef
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {utils: Cu, interfaces: Ci} = Components;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["AccessFu"]; // jshint ignore:line
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "Services",
|
||||
"resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
const TEXT_NODE = 3;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Cu = Components.utils;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["GestureSettings", "GestureTracker"]; // jshint ignore:line
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {utils: Cu, interfaces: Ci} = Components;
|
||||
|
||||
const INCLUDE_DESC = 0x01;
|
||||
const INCLUDE_NAME = 0x02;
|
||||
const INCLUDE_VALUE = 0x04;
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["PointerRelay", "PointerAdapter"]; // jshint ignore:line
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {utils: Cu, interfaces: Ci} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "Logger", // jshint ignore:line
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {classes: Cc, utils: Cu, interfaces: Ci} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "Services", // jshint ignore:line
|
||||
"resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "Logger",
|
||||
"resource://gre/modules/accessibility/Utils.jsm");
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
CURRENT_CONTENT_DIR, loadScripts, loadFrameScripts, snippetToURL,
|
||||
Cc, Cu, arrayFromChildren, forceGC */
|
||||
|
||||
const { interfaces: Ci, utils: Cu, classes: Cc } = Components;
|
||||
|
||||
/**
|
||||
* Current browser test directory path used to load subscripts.
|
||||
*/
|
||||
|
|
|
@ -698,7 +698,6 @@ function relationTypeToString(aRelationType) {
|
|||
}
|
||||
|
||||
function getLoadContext() {
|
||||
const Ci = Components.interfaces;
|
||||
return window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsILoadContext);
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
/* exported loadJSON, eventMap */
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Geometry.jsm");
|
||||
|
||||
var win = getMainChromeWindow(window);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
var Cu = Components.utils;
|
||||
const PREF_UTTERANCE_ORDER = "accessibility.accessfu.utterance";
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
var Cc = Components.classes;
|
||||
var Cr = Components.results;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
|
|
@ -0,0 +1,233 @@
|
|||
.. _tabbrowser_async_tab_switcher:
|
||||
|
||||
==================
|
||||
Async tab switcher
|
||||
==================
|
||||
|
||||
At a very high level, the async tab switcher is responsible for telling tabs with out-of-process (or “remote”) ``<xul:browser>``’s to render and upload their contents to the compositor, and then update the UI to show that content as a tab switch. Similarly, the async tab switcher is responsible for telling tabs that have been switched away from to stop rendering their content, and for the compositor to release those contents.
|
||||
|
||||
Briefly introducing Layers and the Compositor
|
||||
=============================================
|
||||
|
||||
For out-of-process tabs, the presentation portion of Gecko computes the final contents of a tab inside the tabs content process, and then uploads that information to the compositor. This uploaded information is usually referred to as *layers*.
|
||||
|
||||
The compositor is what eventually presents these layers to the user as pixels. The compositor can retain several sets of layers without necessarily showing them to the user, but this consumes memory. Layers that are no longer needed are released.
|
||||
|
||||
From here forward, "contents of a tab" will be referred to as that tab's *layers*.
|
||||
|
||||
.. _async-tab-switcher.useful-properties:
|
||||
|
||||
renderLayers, hasLayers, docShellIsActive
|
||||
=========================================
|
||||
|
||||
``<xul:browser>``'s have a number of useful properties exposed on them that the async tab switcher uses:
|
||||
|
||||
``renderLayers``
|
||||
For remote ``<xul:browser>``'s, setting this to ``true`` from ``false`` means to ask the content process to render the layers for that ``<xul:browser>`` and upload them to the compositor. Setting this from ``false`` to ``true`` means to ask the content process to stop rendering the layers and for the compositor to release the layers. Setting this property to ``true`` when it is already ``true`` or ``false`` when it is already ``false`` is a no-op. When this property returns ``true``, this means that layers have been requested for this tab, but there is no guarantee that the layers have been received by the compositor yet. Similarly, when this property returns ``false``, this means that this browser has been asked to stop rendering layers, but there is no guarantee that the layers have been released by the compositor yet.
|
||||
|
||||
For non-remote ``<xul:browser>``'s, ``renderLayers`` is an alias for ``docShellIsActive``.
|
||||
|
||||
``hasLayers``
|
||||
For remote ``<xul:browser>``'s, this read-only property returns ``true`` if the compositor has layers for this tab, and ``false`` otherwise.
|
||||
|
||||
For non-remote ``<xul:browser>``'s, ``hasLayers`` returns the value for ``docShellIsActive``.
|
||||
|
||||
``docShellIsActive``
|
||||
For remote ``<xul:browser>``'s, setting ``docShellIsActive`` to ``true`` also sets ``renderLayers`` to true, and then sends a message to the content process to set its top-level docShell active state to ``true``. Similarly, setting ``docShellIsActive`` to ``false`` also sets ``renderLayers`` to false, and then sends a message ot the content process to set its top-level docShell active state to ``false``.
|
||||
|
||||
For non-remote ``<xul:browser>``'s, ``docShellIsActive`` forwards to the ``isActive`` property on the ``<xul:browser>``'s top-level docShell.
|
||||
|
||||
Setting a docShell to be active causes the tab's visibilitychange event to fire to indicate that the tab has become visible. Media that was waiting to be played until the tab is selected will also begin to play.
|
||||
|
||||
An active docShell is also required in order to generate a print preview of the loaded document.
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
There are a number of requirements that the tab switcher must satisfy. In no particular order, they are:
|
||||
|
||||
1. The switcher must be prepared to switch between any mixture of remote and non-remote tabs. Non-remote tabs include tabs pointed at about:addons, about:config, and others
|
||||
|
||||
2. We want to avoid switching the toolbar state (for example, the URL bar input, security indicators, toolbar button states) until we are ready to show the layers of the tab that we're switching to
|
||||
|
||||
3. Only one tab should appear to be selected in the tab strip at any given time
|
||||
|
||||
4. We want to avoid switching keyboard focus to a selected tab until the layers for the tab are ready - but only if the user doesn’t change focus between the start and end of the async tab switch
|
||||
|
||||
5. If the layers for a tab are not available after a certain amount of time, we should “complete” the tab switch by displaying the “tab switch spinner” - an animated spinner against a white background. This way, we at least show the user some activity, despite the fact that we don’t have the layers of the tab to show them
|
||||
|
||||
6. The printing UI uses tabs to show print preview, which requires that the print-previewed tab is in the background and yet also have its docShell be "active" - a state that's usually reserved for the selected tab. See :ref:`async-tab-switcher.useful-properties`
|
||||
|
||||
7. ``<xul:tab>``'s and ``<xul:browser>``'s might be created or destroyed at any time during an async tab switch
|
||||
|
||||
8. It should be possible to render layers for a tab, despite it not having been set as active (this is used for :ref:`async-tab-switcher.warming`)
|
||||
|
||||
Lifecycle
|
||||
=========
|
||||
|
||||
Per window, an async tab switcher instance is only supposed to exist if one or more tabs still need to have their layers loaded or unloaded. This means that an async tab switcher instance might exist even though a tab switch appears to the user to have completed. This also means that an async tab switcher might continue to exist and handle a new tab switch if the user initiates that tab switch before some background tabs have had their layers unloaded.
|
||||
|
||||
There’s only one async tab switcher at a time per window, and it’s owned by the ``<xul:tabbrowser>``.
|
||||
|
||||
A ``<xul:tabbrowser>`` starts without an async tab switcher, and only once a tab switch (or warming) is initiated by the user is the switcher instantiated.
|
||||
|
||||
Once the switcher determines that the tab that the user has requested is being shown, and all background tabs have been properly unloaded or destroyed, the async tab switcher cleans up and destroys itself.
|
||||
|
||||
.. _async-tab-switcher.states:
|
||||
|
||||
Tab states
|
||||
==========
|
||||
|
||||
While the async tab switcher exists, it maps each ``<xul:tab>`` in the window to one of the following internal states:
|
||||
|
||||
``STATE_UNLOADED``
|
||||
Layers for this ``<xul:tab>`` are not being uploaded to the compositor, and we haven't requested that the tab start doing so. This tab is fully in the background.
|
||||
|
||||
When a tab is in ``STATE_UNLOADED``, this means that the associated ``<xul:browser>`` either does not exist, or will have its ``renderLayers`` and ``hasLayers`` properties both return ``false``.
|
||||
|
||||
If a tab is in this state, it must have either initialized there, or transitioned from ``STATE_UNLOADING``.
|
||||
|
||||
When logging states, this state is indicated by the ``-`` character.
|
||||
|
||||
``STATE_LOADING``
|
||||
Layers for this ``<xul:tab>`` have not yet been reported as "received" by the compositor, but we've asked the tab to start rendering. This usually means that we want to switch to the tab, or at least to warm it up.
|
||||
|
||||
When a tab is in ``STATE_LOADING``, this means that the associated ``<xul:browser>`` will have its ``renderLayers`` property return ``true`` and its ``hasLayers`` property return ``false``.
|
||||
|
||||
If a tab is in this state, it must have either initialized there, or transitioned from ``STATE_UNLOADED``.
|
||||
|
||||
When logging states, this state is indicated by the ``+?`` characters.
|
||||
|
||||
``STATE_LOADED``
|
||||
Layers for this ``<xul:tab>`` are available on the compositor and can be displayed. This means that the tab is either being shown to the user, or could be very quickly shown to the user.
|
||||
|
||||
If a tab is in this state, it must have either initialized there, or transitioned from ``STATE_LOADING``.
|
||||
|
||||
When a tab is in ``STATE_LOADED``, this means that the associated ``<xul:browser>`` will have its ``renderLayers`` and ``hasLayers`` properties both return ``true``.
|
||||
|
||||
When logging states, this state is indicated by the ``+`` character.
|
||||
|
||||
``STATE_UNLOADING``
|
||||
Layers for this ``<xul:tab>`` were at one time available on the compositor, but we've asked the tab to unload them to preserve memory. This usually means that we've switched away from this tab, or have stopped warming it up.
|
||||
|
||||
When a tab is in ``STATE_UNLOADING``, this means that the associated ``<xul:browser>`` will have its ``renderLayers`` property return ``false`` and its ``hasLayers`` property return ``true``.
|
||||
|
||||
If a tab is in this state, it must have either initialized there, or transitioned from ``STATE_LOADED``.
|
||||
|
||||
When logging states, this state is indicated by the ``-?`` characters.
|
||||
|
||||
Having a tab render its layers is done by settings its state to ``STATE_LOADING``. Once the layers have been received, the switcher will automatically set the state to ``STATE_LOADED``. Similarly, telling a tab to stop rendering is done by settings its state to ``STATE_UNLOADING``. The switcher will automatically set the state to ``STATE_UNLOADED`` once the layers have fully unloaded.
|
||||
|
||||
Stepping through a simple tab switch
|
||||
====================================
|
||||
|
||||
In our simple scenario, suppose the user has a single browser window with two tabs: a tab at index **0** and a tab at index **1**. Both tabs are completed loaded, and **1** is currently selected and displaying its content.
|
||||
|
||||
The user chooses to switch to tab **1**. An async tab switcher is instantiated, and it immediately attaches a number of event handlers to the window. Among them are handlers for the ``MozLayerTreeReady`` and ``MozLayerTreeCleared`` events.
|
||||
|
||||
The switcher then creates an internal mapping from ``<xul:tab>>``'s to states. That mapping is:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
// This is using the logging syntax laid out in the `Tab states` section.
|
||||
0:(+) 1:(-)
|
||||
|
||||
Be sure to refer to :ref:`async-tab-switcher.states` for an explanation of the terminology and :ref:`async-tab-switcher.logging` syntax for states.
|
||||
|
||||
This last example translates to:
|
||||
|
||||
The tab at index **0**, is in ``STATE_LOADED`` and the tab at index **1** is in ``STATE_UNLOADED``.
|
||||
|
||||
Now that initialization done, the switcher is asked to request **1**. It does this by putting **1** into ``STATE_LOADING`` and requesting that **1**'s layers be rendered. The new state mapping is:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
0:(+) 1:(+?)
|
||||
|
||||
At this point, the user is still looking at tab **0**, and none of the UI is showing any visible indication of tab change.
|
||||
|
||||
Now the switcher is waiting, so it goes back to the event loop. During this time, if any code were to ask the tabbrowser which tab is selected, it'd return **1**, since it's *logically* selected despite not being *visually* selected.
|
||||
|
||||
Eventually, the layers for **1** are uploaded to the compositor, and the ``<xul:browser>`` for **1** fires its ``MozLayerTreeReady`` event. This is when the switcher changes its internal state again:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
0:(+) 1:(+)
|
||||
|
||||
So now layers for both **0** and **1** are uploading and available on the compositor. At this point, the switcher updates the visual state of the browser, and flips the ``<xul:deck>`` to display **1**, and the user experiences the tab switch.
|
||||
|
||||
The switcher isn't done, however. After a predefined amount of time (dictated by ``UNLOAD_DELAY``), tabs that aren't currently selected but in ``STATE_LOADED`` are put into ``STATE_UNLOADING``. Now the internal state looks like this:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
0:(-?) 1:(+)
|
||||
|
||||
Having requested that **0** go into ``STATE_UNLOADING``, the switcher returns back to the event loop. The user, meanwhile, continues to use ``1``.
|
||||
|
||||
Eventually, the layers for **0** are cleared from the compositor, and the ``<xul:browser>`` for **0** fires its ``MozLayerTreeCleared`` event. This is when the switcher changes its internal state once more:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
0:(-) 1:(+)
|
||||
|
||||
The tab at **0** is now in ``STATE_UNLOADED``. Since the last requested tab **1** is in ``STATE_LOADED`` and all other background tabs are in ``STATE_UNLOADED``, the switcher decides its work is done. It deregisters its event handlers, and then destroys itself.
|
||||
|
||||
.. _async-tab-switcher.unloading-background:
|
||||
|
||||
Unloading background tabs
|
||||
=========================
|
||||
|
||||
While an async tab switcher exists, it will periodically scan the window for tabs that are in ``STATE_LOADED`` but are also in the background. These tabs will then be put into ``STATE_UNLOADING``. Only once all background tabs have settled into the ``STATE_UNLOADED`` state are the background tabs considered completely cleared.
|
||||
|
||||
The background scanning interval is ``UNLOAD_DELAY``, in milliseconds.
|
||||
|
||||
Perceived performance optimizations
|
||||
===================================
|
||||
|
||||
We use a few tricks and optimizations to help improve the perceived performance of tab switches.
|
||||
|
||||
1. Sometimes users switch between the same tabs quickly. We want to optimize for this case by not releasing the layers for tabs until some time has gone by. That way, quick switching just resolves in a re-composite in the compositor, as opposed to a full re-paint and re-upload of the layers from a remote tab’s content process.
|
||||
|
||||
2. When a tab hasn’t ever been seen before, and is still in the process of loading (right now, dubiously checked by looking for the “busy” attribute on the ``<xul:tab>``) we show a blank content area until its layers are finally ready. The idea here is to shift perceived lag from the async tab switcher to the network by showing the blank space instead of the tab switch spinner.
|
||||
|
||||
3. “Warming” is a nascent optimization that will allow us to pre-emptively render and cache the layers for tabs that we think the user is likely to switch to soon. After a timeout (``browser.tabs.remote.warmup.unloadDelayMs``), “warmed” tabs that aren’t switched to have their layers unloaded and cleared from the cache.
|
||||
|
||||
4. On platforms that support ``occlusionstatechange`` events (as of this writing, only macOS) and ``sizemodechange`` events (Windows, macOS and Linux), we stop rendering the layers for the currently selected tab when the window is minimized or fully occluded by another window.
|
||||
|
||||
.. _async-tab-switcher.warming:
|
||||
|
||||
Warming
|
||||
=======
|
||||
|
||||
Tab warming allows the browser to proactively render and upload layers to the compositor for tabs that the user is likely to switch to. The simplest example is when a user's mouse cursor is hovering over a tab. When this occurs, the async tab switcher is told to put that tab into a warming list, and to set its state to ``STATE_LOADING``, even though the user hasn't yet clicked on it.
|
||||
|
||||
Warming a tab queues up a timer to unload background tabs (if no such timer already exists), which will clear out the warmed tab if the user doesn't eventually click on it. The unload will occur even if the user continues to hover the tab.
|
||||
|
||||
If the user does happen to click on the warmed tab, the tab can be in either one of two states:
|
||||
|
||||
``STATE_LOADING``
|
||||
In this case, the user requested the tab switch before the layers were rendered and received by the compositor. We'll at least have shaved off the time between warming and selection to display the tab's contents to the user.
|
||||
|
||||
``STATE_LOADED``
|
||||
In this case, the user requested the tab switch after the layers had been rendered and received by the compositor. We can switch to the tab immediately.
|
||||
|
||||
Warming is controlled by the following preferences:
|
||||
|
||||
``browser.tabs.remote.warmup.enabled``
|
||||
Whether or not the warming optimization is enabled.
|
||||
|
||||
``browser.tabs.remote.warmup.maxTabs``
|
||||
The maximum number of tabs that can be warming simultaneously. If the number of warmed tabs exceeds this amount, all background tabs are unloaded (see :ref:`async-tab-switcher.unloading-background`).
|
||||
|
||||
``browser.tabs.remote.warmup.unloadDelayMs``
|
||||
The amount of time to wait between the first tab being warmed, and unloading all background tabs (see :ref:`async-tab-switcher.unloading-background`).
|
||||
|
||||
.. _async-tab-switcher.logging:
|
||||
|
||||
Logging
|
||||
=======
|
||||
|
||||
The async tab switcher has some logging capabilities that make it easier to debug and reason about its behaviour. Setting the hidden ``browser.tabs.remote.logSwitchTiming`` pref to true will put logging into the Browser Console.
|
||||
|
||||
Alternatively, setting the ``useDumpForLogging`` property to true within the source code of the tab switcher will dump those logs to stdout.
|
|
@ -0,0 +1,14 @@
|
|||
.. _tabbrowser:
|
||||
|
||||
===================
|
||||
tabbrowser
|
||||
===================
|
||||
|
||||
One ``<xul:tabbrowser>`` exists per browser window, and is responsible for displaying and managing the contents of a windows tabs. As the browser has evolved, the responsibilities of ``<xul:tabbrowser>`` have also grown.
|
||||
|
||||
At this point, ``<xul:tabbrowser>`` is arguably one of the largest and most complex pieces of code used by the browser's user interface.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
async-tab-switcher
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var Cu = Components.utils;
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/PageThumbs.jsm");
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
|
||||
/* import-globals-from ../../../toolkit/content/resetProfile.js */
|
||||
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
const appStartup = Services.startup;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/ResetProfile.jsm");
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
|
||||
/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
|
||||
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
|
||||
var {Sanitizer} = ChromeUtils.import("resource:///modules/Sanitizer.jsm", {});
|
||||
|
||||
Preferences.addAll([
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ function promiseTabLoadEvent(tab, url) {
|
|||
*/
|
||||
function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrowser, aStopFromProgressListener = true) {
|
||||
function content_script(contentStopFromProgressListener) {
|
||||
let { interfaces: Ci, utils: Cu } = Components;
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
let wp = docShell.QueryInterface(Ci.nsIWebProgress);
|
||||
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
<iframe type="content" id="frame1"/>
|
||||
<iframe type="content" id="frame2" onload="doTest()"/>
|
||||
<script type="application/javascript"><![CDATA[
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Note that this test is modified based on browser_favicon_userContextId.js.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_SITE = "http://example.net";
|
||||
const TEST_THIRD_PARTY_SITE = "http://mochi.test:8888";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
var Ci = Components.interfaces;
|
||||
|
||||
const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
|
||||
Ci.nsIWebProgressListener.STATE_IS_NETWORK;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
|
||||
|
||||
var Cr = Components.results;
|
||||
var Cm = Components.manager;
|
||||
|
||||
// Set to true when docShell alerts for unknown protocol error
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
const PREF_DISABLE_OPEN_NEW_WINDOW = "browser.link.open_newwindow.disabled_in_fullscreen";
|
||||
const PREF_BLOCK_TOPLEVEL_DATA = "security.data_uri.block_toplevel_data_uri_navigations";
|
||||
const isOSX = (Services.appinfo.OS === "Darwin");
|
||||
|
|
|
@ -40,8 +40,6 @@ function test() {
|
|||
// the request. For everything else, we can do the work in the
|
||||
// parent, since it's easier.
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, null, function* gen() {
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
let listener = {
|
||||
onStateChange: function onLocationChange(webProgress, req, flags, status) {
|
||||
let docStart = Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
|
||||
|
|
|
@ -44,7 +44,6 @@ function waitForTransferComplete() {
|
|||
*/
|
||||
function rightClickVideo(browser) {
|
||||
let frame_script = () => {
|
||||
const Ci = Components.interfaces;
|
||||
let utils = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* See also Bugs 1175327, 1043801, 1178985
|
||||
*/
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
const PREF = "privacy.trackingprotection.enabled";
|
||||
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
|
||||
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* See also Bugs 1175327, 1043801, 1178985.
|
||||
*/
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
const PREF = "privacy.trackingprotection.enabled";
|
||||
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
|
||||
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* See also Bug 1175858.
|
||||
*/
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
const PREF = "privacy.trackingprotection.enabled";
|
||||
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
|
||||
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* Test telemetry for Tracking Protection
|
||||
*/
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
const PREF = "privacy.trackingprotection.enabled";
|
||||
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
|
||||
const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
(function() {
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
docShell.addWeakReflowObserver({
|
||||
reflow() {
|
||||
// Gather information about the current code path.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {classes: Cc, interfaces: Ci, manager: Cm} = Components;
|
||||
const Cm = Components.manager;
|
||||
|
||||
function waitForEvent(elem, event) {
|
||||
return new Promise(resolve => {
|
||||
|
|
|
@ -49,7 +49,7 @@ add_task(async function() {
|
|||
// Load a custom frame script to avoid using ContentTask which loads Task.jsm
|
||||
mm.loadFrameScript("data:text/javascript,(" + function() {
|
||||
/* eslint-env mozilla/frame-script */
|
||||
const {classes: Cc, interfaces: Ci, manager: Cm, utils: Cu} = Components;
|
||||
const Cm = Components.manager;
|
||||
Cm.QueryInterface(Ci.nsIServiceManager);
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
let collectStacks = AppConstants.NIGHTLY_BUILD || AppConstants.DEBUG;
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
var Cm = Components.manager;
|
||||
|
||||
const kBlocklistServiceUUID = "{66354bc9-7ed1-4692-ae1d-8da97d6b205e}";
|
||||
|
|
|
@ -2,9 +2,6 @@ var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content
|
|||
var gTestBrowser = null;
|
||||
var gConsoleErrors = 0;
|
||||
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
add_task(async function() {
|
||||
registerCleanupFunction(function() {
|
||||
clearAllPluginPermissions();
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
/* Shorthand constructors to construct an nsI(Local)File and zip reader: */
|
||||
const LocalFile = new Components.Constructor("@mozilla.org/file/local;1", Ci.nsIFile, "initWithPath");
|
||||
const ZipReader = new Components.Constructor("@mozilla.org/libjar/zip-reader;1", "nsIZipReader", "open");
|
||||
|
|
|
@ -6,8 +6,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
"Panel",
|
||||
];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
|
||||
this.Panel = function(panelElt, iframeURL) {
|
||||
|
|
|
@ -29,7 +29,6 @@ ChromeUtils.defineModuleGetter(this, "HttpServer",
|
|||
*/
|
||||
function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrowser, aStopFromProgressListener = true) {
|
||||
function content_script(contentStopFromProgressListener) {
|
||||
let { interfaces: Ci, utils: Cu } = Components;
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
let wp = docShell.QueryInterface(Ci.nsIWebProgress);
|
||||
|
||||
|
|
|
@ -211,8 +211,6 @@ function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI
|
|||
function openLinkIn(url, where, params) {
|
||||
if (!where || !url)
|
||||
return;
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
var aFromChrome = params.fromChrome;
|
||||
var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
|
||||
|
@ -774,8 +772,6 @@ function openPreferences(paneID, extraArgs) {
|
|||
let newLoad = true;
|
||||
let browser = null;
|
||||
if (!win) {
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
let windowArguments = Cc["@mozilla.org/array;1"]
|
||||
.createInstance(Ci.nsIMutableArray);
|
||||
let supportsStringPrefURL = Cc["@mozilla.org/supports-string;1"]
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource:///modules/webrtcUI.jsm");
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ with Files("**"):
|
|||
BUG_COMPONENT = ("Firefox", "General")
|
||||
|
||||
SPHINX_TREES['sslerrorreport'] = 'content/docs/sslerrorreport'
|
||||
SPHINX_TREES['tabbrowser'] = 'content/docs/tabbrowser'
|
||||
|
||||
with Files('content/docs/sslerrorreport/**'):
|
||||
SCHEDULES.exclusive = ['docs']
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
!define URLInfoAbout "https://www.mozilla.org"
|
||||
!define HelpLink "https://support.mozilla.org"
|
||||
|
||||
!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-devedition-latest"
|
||||
!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-devedition-latest"
|
||||
!define URLStubDownload32 "https://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-devedition-latest"
|
||||
!define URLStubDownload64 "https://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-devedition-latest"
|
||||
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=aurora&installer_lang=${AB_CD}"
|
||||
!define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
|
||||
!define Channel "aurora"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
!define URLInfoAbout "https://www.mozilla.org"
|
||||
!define HelpLink "https://support.mozilla.org"
|
||||
|
||||
!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-nightly-latest"
|
||||
!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-nightly-latest"
|
||||
!define URLStubDownload32 "https://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-nightly-latest"
|
||||
!define URLStubDownload64 "https://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-nightly-latest"
|
||||
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=nightly&installer_lang=${AB_CD}"
|
||||
!define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
|
||||
!define Channel "nightly"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
; Beta since they share the same branding when building with other branches that
|
||||
; set the update channel to beta.
|
||||
!define OFFICIAL
|
||||
!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload32 "https://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload64 "https://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
|
||||
!define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
|
||||
!define Channel "release"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
!define URLInfoAbout "https://www.mozilla.org"
|
||||
!define HelpLink "https://support.mozilla.org"
|
||||
|
||||
!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload32 "https://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLStubDownload64 "https://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
|
||||
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
|
||||
!define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
|
||||
!define Channel "unofficial"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const contract = "@mozilla.org/network/protocol/about;1?what=newtab";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
let { classes: Cc, interfaces: Ci } = Components;
|
||||
|
||||
const BASE_ORIGIN = "http://example.com";
|
||||
const URI = BASE_ORIGIN +
|
||||
"/browser/browser/components/contextualidentity/test/browser/empty_file.html";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm");
|
||||
|
||||
function openTabInUserContext(userContextId) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Bug 1283325 - A test case to test the EME is originAttributes aware or not.
|
||||
*/
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_HOST = "example.com";
|
||||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/*
|
||||
* Bug 1270678 - A test case to test does the favicon obey originAttributes.
|
||||
*/
|
||||
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
let {HttpServer} = ChromeUtils.import("resource://testing-common/httpd.js", {});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Bug 1278037 - A Test case for checking whether forgetting APIs are working for the media key.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_HOST = "example.com";
|
||||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Bug 1278037 - A Test case for checking whether forgetting APIs are working for cookies.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_HOST = "example.com";
|
||||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Bug 1278037 - A Test case for checking whether forgetting APIs are working for the quota manager.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_HOST = "example.com";
|
||||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Bug 1238183 - Test cases for forgetAboutSite with userContextId.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/ForgetAboutSite.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
let Cu = Components.utils;
|
||||
let {HttpServer} = ChromeUtils.import("resource://testing-common/httpd.js", {});
|
||||
|
||||
const NUM_USER_CONTEXTS = 3;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Bug 1334587 - A Test case for checking whether forgetting APIs are working for cookies.
|
||||
*/
|
||||
|
||||
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
const TEST_HOST = "example.com";
|
||||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
let { classes: Cc, interfaces: Ci } = Components;
|
||||
|
||||
let swm = Cc["@mozilla.org/serviceworkers/manager;1"].
|
||||
getService(Ci.nsIServiceWorkerManager);
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizableUI"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["CustomizeMode"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
||||
const kPaletteId = "customization-palette";
|
||||
const kDragDataTypePrefix = "text/toolbarwrapper-id/";
|
||||
|
|
|
@ -46,8 +46,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
"PanelView",
|
||||
];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["ScrollbarSampler"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
var Cc = Components.classes;
|
||||
var Cr = Components.results;
|
||||
var Cu = Components.utils;
|
||||
|
||||
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
|
||||
"distribution-customization-complete";
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
|
||||
// Globals
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
"DownloadsSubview",
|
||||
];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "AppConstants",
|
||||
|
|
|
@ -16,11 +16,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
|
||||
// Globals
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "Downloads",
|
||||
|
|
|
@ -13,8 +13,6 @@ this.EXPORTED_SYMBOLS = [
|
|||
"DownloadsViewUI",
|
||||
];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "Downloads",
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "Downloads",
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "DownloadsViewUI",
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gXulStore",
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["BasePopup", "PanelPopup", "ViewPopup"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "CustomizableUI",
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionPreferencesManager",
|
||||
"resource://gre/modules/ExtensionPreferencesManager.jsm");
|
||||
ChromeUtils.defineModuleGetter(this, "ExtensionSettingsStore",
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
function frameScript() {
|
||||
function getSelectedText() {
|
||||
let frame = this.content.frames[0].frames[1];
|
||||
let {interfaces: Ci, utils: Cu} = Components;
|
||||
let docShell = frame.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
/* exported createHttpServer, promiseConsoleOutput */
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -7,10 +7,6 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
ChromeUtils.import("resource://gre/modules/debug.js");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
|
||||
function LOG(str) {
|
||||
dump("*** " + str + "\n");
|
||||
}
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
|
|
@ -8,10 +8,6 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
|
||||
function LOG(str) {
|
||||
// dump("*** " + str + "\n");
|
||||
}
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
var wccrID = "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1";
|
||||
/* abort the test if web feed handlers are not available */
|
||||
if (!Cc[wccrID])
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
var Cu = Components.utils;
|
||||
var Cr = Components.results;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
var Cu = Components.utils;
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
function run_test() {
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["AutoMigrate"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||
|
||||
const kAutoMigrateEnabledPref = "browser.migrate.automigrate.enabled";
|
||||
const kUndoUIEnabledPref = "browser.migrate.automigrate.ui.enabled";
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||
|
||||
const S100NS_FROM1601TO1970 = 0x19DB1DED53E8000;
|
||||
const S100NS_PER_MS = 10;
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["ESEDBReader"]; /* exported ESEDBReader */
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/ctypes.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
* from the source profile.
|
||||
*/
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource:///modules/MigrationUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
const kLoginsKey = "Software\\Microsoft\\Internet Explorer\\IntelliForms\\Storage2";
|
||||
const kMainKey = "Software\\Microsoft\\Internet Explorer\\Main";
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["MSMigrationUtils"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["MigrationUtils", "MigratorPrototype"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||
const TOPIC_WILL_IMPORT_BOOKMARKS = "initial-migration-will-import-default-bookmarks";
|
||||
const TOPIC_DID_IMPORT_BOOKMARKS = "initial-migration-did-import-default-bookmarks";
|
||||
const TOPIC_PLACES_DEFAULTS_FINISHED = "places-browser-init-complete";
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче