Change the returned documentURL to be that of the requested document.
Ensure the return frameId is only returned if available, since it's optional.
Move some common steps into NetworkObserver for later reuse by other Network
events.
Differential Revision: https://phabricator.services.mozilla.com/D74578
With this patch both events will be emitted when sub frames are
loaded or destroyed.
Because more work is necessary before we can enable general frame
support in Remote Protocol all the code has been put behind the
preference "remote.frames.enabled'. Only if it's true (which is
not the default) the events are emitted.
Differential Revision: https://phabricator.services.mozilla.com/D74635
Domains would have created their own instance of the context observer,
which results in duplicated event listeners and observer notifications
to be registered.
This is still not ideal for the observer notifications, which should be
registered only once, but still an improvement for now. Bug 1635568 will
finally fix that.
Differential Revision: https://phabricator.services.mozilla.com/D74632
This behavior is in line with what Chrome does and correctly
describes the CDP version Firefox is (attempting to be)
implementing.
DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D75112
Implements the Chrome Devtools Protocol (CDP) command
Network.emulateNetworkConditions partially. At the moment,
only "offline" is emulated, all other arguments are ignored.
Differential Revision: https://phabricator.services.mozilla.com/D73211
With full color management enabled in bug 455077, generated
screenshots will not be saved as sRGB when the display has
a different ICC profile. As long as bug 1615395 hasn't been
fixed, force screenshots to be saved as sRGB.
Differential Revision: https://phabricator.services.mozilla.com/D74007
With full color management enabled in bug 455077, generated
screenshots will not be saved as sRGB when the display has
a different ICC profile. As long as bug 1615395 hasn't been
fixed, force screenshots to be saved as sRGB.
Differential Revision: https://phabricator.services.mozilla.com/D74007
The "this" state is not persistent across spawn-calls, using "this" in
"function" also does not make a whole lot of sense.
In order to persist the Promise across spawn-calls, the value is stored
in "content" instead.
Since one cannot reliably return an Event from SpecialPowers.spawn (due
to serialization issues), we are awaiting them instead of returning.
Differential Revision: https://phabricator.services.mozilla.com/D73913
This fixes exceptions hit in destructors when the browsing context
is null. We encounter this when navigating to file: urls, for example,
in which case the target doesn't have a browsing context id.
Differential Revision: https://phabricator.services.mozilla.com/D73459
The WindowObserver class is only used by the TabObserver, and as such
can easily be integrated transparently. This also removes the extra
events as being emitted for opening and closing XUL windows.
Differential Revision: https://phabricator.services.mozilla.com/D73044
The changes align our code to other instances of nsIWindowMediatorListener
usage in-tree, which always rely on the "load" event. Also "interactive"
isn't a ready state a XULWindow can ever be in, it's only used for content
windows.
Differential Revision: https://phabricator.services.mozilla.com/D73043
To better keep track of available observer classes
it's better to have them all in the same folder.
While moving files around the patch also renames
the TabObserver module to TargetObserver, which
would allow us to add target observers for workers
in the future.
Differential Revision: https://phabricator.services.mozilla.com/D73042
This facilitates monitoring the navigation response.
The remaining work for moving navigation-related code into
the parent process should be done in Bug 1612538.
Differential Revision: https://phabricator.services.mozilla.com/D71654
There are needs to delay the execution of code on the main thread
until the next tick of the event loop has happened.
Differential Revision: https://phabricator.services.mozilla.com/D71291