Fix up the browser_tab_label_during_restore.js test to wait for the right number of tab title changes, since the timing of the tab title updating has now changed.
Differential Revision: https://phabricator.services.mozilla.com/D72562
Fix up the browser_tab_label_during_restore.js test to wait for the right number of tab title changes, since the timing of the tab title updating has now changed.
Differential Revision: https://phabricator.services.mozilla.com/D72562
The test is a permafail without any of those changes on all my windows machine so I've been unable to diagnostic what could happen.
The test was also to be nominated for disabling to be too high failure rates.
https://bugzilla.mozilla.org/show_bug.cgi?id=1411477#c99
According to :kats, the test was never rewritten to use the new APZ. Disabling on the platform where there's high intermittent failure (about 70%)
Differential Revision: https://phabricator.services.mozilla.com/D74391
The test is a permafail without any of those changes on all my windows machine so I've been unable to diagnostic what could happen.
According to :kats, the test was never rewritten to use the new APZ. Disabling on the platform where there's high intermittent failure (about 70%)
Differential Revision: https://phabricator.services.mozilla.com/D74391
This value is determined in Parent process and passed down to nsDocShell. Delete
the messages to pass the setting down and set it on the BrowsingContext in the
Parent process.
Refactor the code that determines to opt-out of using global history. Code
inspection determines that windowless browsing contexts want to opt-out as well
as any frame with `disableglobalhistory` attribute set on it.
Differential Revision: https://phabricator.services.mozilla.com/D72279
LazyFC changes the way we initialize browsers in a subtle way which is
important for print preview and PiP.
When creating a print preview browser / PiP, we rely on getting the right
process via _sameProcessAsFrameLoader. This is set very early on the
lifetime of the browser element, after it's upgraded but before its
connectedCallback() calls.
What happens with LazyFC is that we append the browser to the document,
then set its sameProcessAsFrameLoader, then initialize the browser from
connectedCallback(). That calls resetFields() _after_ setting the
_sameProcessAsFrameLoader, which clears it out, not good.
Without LazyFC we initialize it via frame construction, as soon as the
browser is attached to the document, so all ends up working out.
Explicitly avoid clearing this field out if not initialized yet, instead
of the hasOwnProperty check which was for the very same thing, just
about XBL initialization.
Differential Revision: https://phabricator.services.mozilla.com/D74282
The place where it's done right now is just unsound. It modifies
attributes during frame construction and it causes assertions to fire
with lazy frame-construction enabled.
Differential Revision: https://phabricator.services.mozilla.com/D74029
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.
This was done automatically with a new eslint rule that will be introduced in
the next commit. One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS. The rule will be disabled for that instance.
Differential Revision: https://phabricator.services.mozilla.com/D28073
That avoids having two sources of truth. This might be better, still
unsure how I feel about it compared to the current setup.
Differential Revision: https://phabricator.services.mozilla.com/D73427
Bug 1633938 re-introduced this field to handle full-zoom on RDM without
having to affect the actual content zoom, see related hacks that went
away in this push:
9e6925ea79
But I added it to the browser element constructor, instead of to
resetFields(), which means that it's not properly reset when the
browsing context changes and thus it can get out of sync.
Move it to resetFields(), so that we properly detect that zoom has
changed. An alternative to this is to only use this._fullZoom when in
RDM instead.
This is where a similar field only used for remote browser used to live
before my Fission zoom changes:
https://searchfox.org/mozilla-central/rev/9642a113737b556750228965bb9cbd3aaa655e22/toolkit/content/widgets/browser-custom-element.js#346
Differential Revision: https://phabricator.services.mozilla.com/D73426
Add importableLogins autocomplete items that show for a site when there's chromium-based logins, no saved logins, and appropriate experiment state. Default behavior is unchanged with default "" pref value, and new behavior can be turned on with "import" pref value.
Differential Revision: https://phabricator.services.mozilla.com/D72096
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.
It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.
The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.
The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.
I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.
I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.
Differential Revision: https://phabricator.services.mozilla.com/D71969
Implemecurnt a flag `suspendMediaWhenInactive` on the docShell that indicates media in that shell should be suspended when the shell is inactive. Currently, only GeckoView is using this flag.
---
The reason of implementing this flag is because in bug1577890 we remove the old way to suspend/resume the media, and I thought setting docshell to inactive is enough to suspend the media because we already have a mechanism which would suspend/resume media when document becomes inactive/active [1].
However, the active state of document is actually different from what I thought it was. Setting docshell to inactive won't change the document's active state, because that indicates if the document is the current active document for the docshell [2] (docshell can have multiple documents), instead of indicating if the docshell is active or not.
Therefore, we have to add another flag to indicate if the docshell wants to suspend its media when it's inactive, in order to use current mechanism to suspend/resume media.
[1] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/html/HTMLMediaElement.cpp#6453
[2] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/base/Document.h#2627-2633
Differential Revision: https://phabricator.services.mozilla.com/D69669
When I first added this method last year, I added it in JS, handled from within
SessionStore.jsm, as that was the easiest place to do it. Now that
DocumentLoadListener exists, it makes more sense to handle this logic directly
from within that code.
Many parts of the process switch are still handled by frontend JS, such as
selecting remote types, and performing toplevel process switches.
Differential Revision: https://phabricator.services.mozilla.com/D68594