The Async Tab Switcher seems to fire the TabSelect event in parallel with focus
changes, making the behavior non-predictable, because we need a stable situation
where both events happened.
Differential Revision: https://phabricator.services.mozilla.com/D61353
--HG--
extra : moz-landing-system : lando
With DocumentChannel, the 'URI' of the channel that we proxy for RemoteWebProgress doesn't have the resolved URI, and reports the about: version instead.
All about: URIs are local these days, so we can just check for that scheme directly, and simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D54251
--HG--
extra : moz-landing-system : lando
With DocumentChannel, the 'URI' of the channel that we proxy for RemoteWebProgress doesn't have the resolved URI, and reports the about: version instead.
All about: URIs are local these days, so we can just check for that scheme directly, and simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D54251
--HG--
extra : moz-landing-system : lando
With DocumentChannel, the 'URI' of the channel that we proxy for RemoteWebProgress doesn't have the resolved URI, and reports the about: version instead.
All about: URIs are local these days, so we can just check for that scheme directly, and simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D54251
--HG--
extra : moz-landing-system : lando
With DocumentChannel, the 'URI' of the channel that we proxy for RemoteWebProgress doesn't have the resolved URI, and reports the about: version instead.
All about: URIs are local these days, so we can just check for that scheme directly, and simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D54251
--HG--
extra : moz-landing-system : lando
This just pulls chunks of TelemetryStopwatch and similar code,
which often eats up several lines, into some helper functions.
This should just help reduce the cognitive load of reading this
code.
Depends on D47349
Differential Revision: https://phabricator.services.mozilla.com/D47350
--HG--
extra : moz-landing-system : lando
This way we ensure that the reentrancy guard always stays in effect.
It should just be a little easier to reason about everything if it's
all channeled through the same place.
Differential Revision: https://phabricator.services.mozilla.com/D47349
--HG--
extra : moz-landing-system : lando
It's useless if the tab is already visible (i.e., has renderLayers=true), per
the previous patches, and that's the only point at which it gets called.
Differential Revision: https://phabricator.services.mozilla.com/D47131
--HG--
extra : moz-landing-system : lando
I haven't been able to work out a reason why we should show the
spinner before this.loadTimer is cleared. All this does is allow
for random reordering of events to sometimes show a spinner early.
This should ideally just make the spinner logic more rubust to
event ordering changes, without sacrificing visibility into tab
switch timings.
Differential Revision: https://phabricator.services.mozilla.com/D44878
--HG--
extra : moz-landing-system : lando
This just adds a bit of information to the AsyncTabSwitcher's
logging and cleans up the display to make it quicker to find
what changed, especially with large numbers of tabs. The bit of
new information that I'm particularly interested in is what
event triggered a particular update - so now every time we call
postActions, we include the name of the event.
Differential Revision: https://phabricator.services.mozilla.com/D44710
--HG--
extra : moz-landing-system : lando
With the current code, if any event handler throws, `_processing` remains
true, and every subsequent event goes into an infinite loop dispatching 0ms
timeouts to run on the next tick.
Differential Revision: https://phabricator.services.mozilla.com/D39931
--HG--
extra : moz-landing-system : lando
nsITabParent is exposed to frontend code and is generally used as a representation of a remote tab. We could just rename the interface to nsIBrowserParent and worry about it later, but I think it's better to rename the interface to nsIRemoteTab so that we can later work on splitting the interface away from the PBrowser protocol.
Note: Some frontend code refers to a TabParentId. This commit renames this to RemoteTabId. We need to figure out the purpose of TabId with fission.
Differential Revision: https://phabricator.services.mozilla.com/D28132
--HG--
rename : dom/interfaces/base/nsITabParent.idl => dom/interfaces/base/nsIRemoteTab.idl
extra : rebase_source : 9d8a1790a7bb10195ad063644d1a93d63b2afb72
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
Now that we have moved some about: pages to the privileged content process,
opening these URLs from a non-privileged content process will trigger SessionStore
to restore the tab state due to a process flip. We will set favicons for these
URLs earlier to avoid flickering and improve perceived performance.
This patch also prevents the spinner whenever a page with a local about: URI
(about:blank and about: pages that resolve to jar:// or file:// URIs) is
loaded from a process that the URI cannot load in (e.g. loading about:newtab
in the web content process), as well as during tab duplication or session
restoration for such local about: URIs.
Before this patch, there were additional frames when opening a new window, causing
browser/base/content/test/performance/browser_windowopen.js to fail. This patch
will reduce the number of frames when opening a new window.
MozReview-Commit-ID: yjj2964KSz
--HG--
extra : source : cecc2d52e72e7c6e61137a9147735cb07a079d51
extra : intermediate-source : 21a6f1a83c73ce4fff654d4b2118e98375f0a528
extra : histedit_source : e8b8132856b7ee27b530798c2721b76118de655e
Now that we have moved some about: pages to the privileged content process,
opening these URLs from a non-privileged content process will trigger SessionStore
to restore the tab state due to a process flip. We will set favicons for these
URLs earlier to avoid flickering and improve perceived performance.
This patch also prevents the spinner whenever a page with a local about: URI
(about:blank and about: pages that resolve to jar:// or file:// URIs) is
loaded from a process that the URI cannot load in (e.g. loading about:newtab
in the web content process), as well as during tab duplication or session
restoration for such local about: URIs.
Before this patch, there were additional frames when opening a new window, causing
browser/base/content/test/performance/browser_windowopen.js to fail. This patch
will reduce the number of frames when opening a new window.
MozReview-Commit-ID: yjj2964KSz
--HG--
extra : rebase_source : a5588b5b6496c983350f591602d0959f906235d5
extra : intermediate-source : 176f3ee14e67f493bafefbd599fbf0fe194a25a6
extra : source : cecc2d52e72e7c6e61137a9147735cb07a079d51
Now that we have moved some about: pages to the privileged content process,
opening these URLs from a non-privileged content process will trigger SessionStore
to restore the tab state due to a process flip. We will set favicons for these
URLs earlier to avoid flickering and improve perceived performance.
This patch also prevents the spinner whenever a page with a local about: URI
(about:blank and about: pages that resolve to jar:// or file:// URIs) is
loaded from a process that the URI cannot load in (e.g. loading about:newtab
in the web content process), as well as during tab duplication or session
restoration for such local about: URIs.
Before this patch, there were additional frames when opening a new window, causing
browser/base/content/test/performance/browser_windowopen.js to fail. This patch
will reduce the number of frames when opening a new window.
MozReview-Commit-ID: yjj2964KSz
--HG--
extra : rebase_source : b5087686ad3e1c3eb16d0be9a8031b01d14cb6ab
extra : source : cecc2d52e72e7c6e61137a9147735cb07a079d51
Our current prioritization mechanism doesn't account for tab
warming, or for the fact that the current tab should be
deprioritized. This corrects that.
Differential Revision: https://phabricator.services.mozilla.com/D7205
--HG--
extra : moz-landing-system : lando
Automatic changes by ESLint, except for manual corrections for .xml files.
Differential Revision: https://phabricator.services.mozilla.com/D4439
--HG--
extra : moz-landing-system : lando
Two cases were hiding permanently failing tests. I've commented those out and
filed bug 1487431.
Differential Revision: https://phabricator.services.mozilla.com/D4680
--HG--
extra : rebase_source : 232fa6173de8844a9c47d59926ec8e39d0640ecd
The "select" event handler workaround was originally added in bug 1379270 to make it
possible to focus and select the URL bar a little bit later. This ugly hack was to
workaround an issue with WebExtensions that override about:newtab with the
chrome_url_overrides property (the issue would be that the URL bar would not be
properly focused and selected if about:newtab was overridden).
Back in the day, this was necessary because the overriding URL was fully displayed
in the URL bar (moz-webextension://...). These days, when about:newtab is overridden,
the URL bar is still empty - we just end up showing the information about the
WebExtension overriding about:newtab to the left of the URL bar.
So I think we can remove the old workaround.
Differential Revision: https://phabricator.services.mozilla.com/D3447
--HG--
extra : moz-landing-system : lando
This allows the JS to work in HTML documents, where whitespace is preserved. In XUL
documents, whitespace is ignored when parsing so text nodes are generally not returned.
The following changes were made, with manual cleanups as necessary (i.e. when firstChild actually
refers to a text node, or when firstChild is used in a loop to empty out an element):
firstChild->firstElementChild
lastChild->lastElementChild
nextSibling->nextElementSibling
previousSibling->previousElementSibling
childNodes->children
MozReview-Commit-ID: 95NQ8syBhYw
--HG--
extra : rebase_source : 186d805f7a2a56694dda9032aceac2dfe5424753
While working to reproduce the stale content bug with tab warming
I realized that my work here had inadvertently clobbered tab
warming by immediately calling the tab unload code. This wasn't
necessary, and I didn't need to put the cached tab deactivation
code in the unload method, it just seemed initially convenient.
This should make more sense overall.
MozReview-Commit-ID: 9v9dYZTa1Dv
--HG--
extra : rebase_source : fe1d6f4f87df11d5ed495e309a4a0f144bfc2143
This is fairly straightforward, other than the fact that the
nomenclature gets a bit awkward with the aForce parameter on
the ForcePaint methods. I'm not sure which direction to go with
this - "aForce" seems a fairly intuitive name for what we want,
and I'm kind of inclined to say the existing ForcePaint mechanic
should be renamed to something like PaintWithInterrupt, or
PaintWithPriority.
MozReview-Commit-ID: Bj9DROug1pC
--HG--
extra : rebase_source : a3d91fec940d83325d36bafb13fe892e9c9530e8
We maintain a simple LRU cache of tab layers by setting their
docShellIsActive = false with preserveLayers(true). Once they
are pushed out of the cache by more recently used tabs, their
layers are discarded.
Luckily most of the complexity of this could be contained in
the AsyncTabSwitcher - the one change that had to sit outside of
that was moving the aTab.closing = true earlier in the removeTab
call, so that we could use that information to eagerly evict tabs
from the cache. This was to address a leak in a few tests on try.
MozReview-Commit-ID: 2E3uU8LEYkD
--HG--
extra : rebase_source : d2865fd1ee10db17d9f41cca059a5cee697f259d
We maintain a simple LRU cache of tab layers by setting their
docShellIsActive = false with preserveLayers(true). Once they
are pushed out of the cache by more recently used tabs, their
layers are discarded.
Luckily most of the complexity of this could be contained in
the AsyncTabSwitcher - the one change that had to sit outside of
that was moving the aTab.closing = true earlier in the removeTab
call, so that we could use that information to eagerly evict tabs
from the cache. This was to address a leak in a few tests on try.
MozReview-Commit-ID: 2E3uU8LEYkD
--HG--
extra : rebase_source : b7e7bb3fcf1ed59e79a7c9fb9d3e6ce735ab54e9
We maintain a simple LRU cache of tab layers by setting their
docShellIsActive = false with preserveLayers(true). Once they
are pushed out of the cache by more recently used tabs, their
layers are discarded.
Luckily most of the complexity of this could be contained in
the AsyncTabSwitcher - the one change that had to sit outside of
that was moving the aTab.closing = true earlier in the removeTab
call, so that we could use that information to eagerly evict tabs
from the cache. This was to address a leak in a few tests on try.
MozReview-Commit-ID: 2E3uU8LEYkD
--HG--
extra : rebase_source : b7e7bb3fcf1ed59e79a7c9fb9d3e6ce735ab54e9