We only set a transform observer when transforming through an XSLT PI (nsXMLContentSink::LoadXSLStyleSheet), not when the transform is initiated through the JS API. The only time we can assert that the readystate is READYSTATE_INTERACTIVE is when transforming to a fragment. Because transformToDocument doesn't set an observer, we can't check for a non-null observer but need a state that both XSLT PI transforms and transformToDocument set (which we can do when they create a document).
Differential Revision: https://phabricator.services.mozilla.com/D56860
--HG--
extra : moz-landing-system : lando
Bug 1600063 changed the chunk-dropping logic from dropping when we had *started*
playing a chunk, to when we had *finished* playing a chunk -- i.e., started
playing the next chunk.
But when a chunk is the very last chunk in the media resource, we cannot start
playing the next chunk, because there is no next chunk. Making this check
inclusive seems reasonable.
Differential Revision: https://phabricator.services.mozilla.com/D57374
--HG--
extra : moz-landing-system : lando
This patch is used to change the blessed state for media element under `click-to-play` blocking autoplay policy, which only allows play invocation called from user input handler, eg. `onclick`.
When media aborts current load, we should regard it as a new media. One example is on Youtube they always reuse same media element but replace its url for different video. Therefore, we should reset media's blessed state so that the media with new url can be blocked again.
Differential Revision: https://phabricator.services.mozilla.com/D57192
--HG--
extra : moz-landing-system : lando
Add a document.addCertException function to about:certerror pages, and use it on the desktop certerror page.
Also, as the CallerIsTrusted* functions expect URLs like about:certerror, but GeckoView error pages are data URLs, and so need to be handled differently for these special error-page methods to be exposed on their documents.
Example usage of document.addCertException:
document.addCertException(
true|false /* true == temporary, false == permanent */
).then(
() => {
location.reload();
},
err => {
console.error(err);
}
);
Differential Revision: https://phabricator.services.mozilla.com/D56974
--HG--
extra : moz-landing-system : lando
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.
However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.
It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.
Differential Revision: https://phabricator.services.mozilla.com/D55268
--HG--
extra : moz-landing-system : lando
This removes another dead caller of nsContentUtils::SetScrollbarVisibility.
Plus, before these patches, nsContentUtils::SetScrollbarVisibility didn't
invalidate layout in any way, so it's not like it'd work, even if the chrome
code would set the preference (which it doesn't).
Differential Revision: https://phabricator.services.mozilla.com/D57185
--HG--
extra : moz-landing-system : lando
Calls around `nsContentUtils::ComparePoints` will be cleaned-up in a
separate commit.
Differential Revision: https://phabricator.services.mozilla.com/D54458
--HG--
extra : moz-landing-system : lando
Once `RawRangeBoundary::Offset()` is removed, callers are forced to pass
a filter to `Offset()`. Making it less likely for new callers to
undeliberately retrieve invalid values.
`RawRangeBoundary::Offset()` is removed in separate commit, once all
callers adapted.
Differential Revision: https://phabricator.services.mozilla.com/D54456
--HG--
extra : moz-landing-system : lando
Renamed browser_navigation_process_swap.js to avoid confusion with this new test.
Differential Revision: https://phabricator.services.mozilla.com/D56790
--HG--
rename : dom/serviceworkers/test/browser_navigation_process_swap.js => dom/serviceworkers/test/browser_remote_type_process_swap.js
extra : moz-landing-system : lando
Merely checking for having a displayport isn't enough, because the paint to
tell APZ about the new scroll frame could still be pending.
Differential Revision: https://phabricator.services.mozilla.com/D56662
--HG--
extra : moz-landing-system : lando
It's possible that a registration will be replaced by another one
before its ServiceWorkerRegistration has finished initializing. In
that case, we shouldn't add the old registration as an instance of
the new one.
Differential Revision: https://phabricator.services.mozilla.com/D57132
--HG--
extra : moz-landing-system : lando
We can just take void* and then cast it explicitly, which avoids the undefined-behavior issue here.
Differential Revision: https://phabricator.services.mozilla.com/D57168
--HG--
extra : moz-landing-system : lando
Calls around `nsContentUtils::ComparePoints` will be cleaned-up in a
separate commit.
Differential Revision: https://phabricator.services.mozilla.com/D54458
--HG--
extra : moz-landing-system : lando
Once `RawRangeBoundary::Offset()` is removed, callers are forced to pass
a filter to `Offset()`. Making it less likely for new callers to
undeliberately retrieve invalid values.
`RawRangeBoundary::Offset()` is removed in separate commit, once all
callers adapted.
Differential Revision: https://phabricator.services.mozilla.com/D54456
--HG--
extra : moz-landing-system : lando
foo ? true : false
or:
foo ? false : true
Have always a nicer way to be written.
Differential Revision: https://phabricator.services.mozilla.com/D56842
--HG--
extra : moz-landing-system : lando
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.
Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.
Differential Revision: https://phabricator.services.mozilla.com/D53744
--HG--
extra : moz-landing-system : lando
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
CheckMayLoadAndReport takes a window ID. This allows us to report
errors from it to the web console as needed. Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.
Differential Revision: https://phabricator.services.mozilla.com/D56388
--HG--
extra : moz-landing-system : lando
Fission puts subdocuments (potentially) in separate processes, so we can't
just EnumerateSubDocuments and poke the TimeoutManagers for each one.
Differential Revision: https://phabricator.services.mozilla.com/D56547
--HG--
extra : moz-landing-system : lando
This commit implements a simple data replication scheme, where
each content process receives a copy of the relevant session
storage data when navigating, and sending all its session storage
data to the parent process before shutting down.
Differential Revision: https://phabricator.services.mozilla.com/D55662
--HG--
extra : moz-landing-system : lando
It calls `Document::FlushPendingNotification()` so that we should mark it
as `MOZ_CAN_RUN_SCRIPT`.
And the method calls it of `mDocument` and `mDocument` is never modified
after it's initialized. Therefore, we can move the initializer to the
constructor and make `RefPtr<Document>` to `RefPtr<Document> const`. Thus,
we can avoid unnecessary auto `RefPtr`.
Differential Revision: https://phabricator.services.mozilla.com/D55803
--HG--
extra : moz-landing-system : lando
`MediaControlKeysEvent` should represent possible control key events, so adding a non-existing `eNone` in this class is not good.
Differential Revision: https://phabricator.services.mozilla.com/D57022
--HG--
extra : moz-landing-system : lando
There are multiple seeking states in `MDSM`, it would be good to see the full name of the seeking state on the debug log to know what seeking state we're using.
Differential Revision: https://phabricator.services.mozilla.com/D56823
--HG--
extra : moz-landing-system : lando
Rather than applying the volume change to the DecodedStream, which won't be
played until the buffer catches up, instead apply the volume to the segments
as they are consumed by the MediaTrackGraph.
Differential Revision: https://phabricator.services.mozilla.com/D56276
--HG--
extra : moz-landing-system : lando
Any number of outer windows may be attached to a BrowsingContext over its
lifetime. While the BrowsingContext is alive, it's easy to keep track of which
of these is active, and therefore which of its inner windows is active. After
it has been discarded, though, it discards its docShell reference, so all we
can tell about an inner window is whether it is active for its own outer
window, but not whether it should be considered active for its
BrowsingContext.
This patch updates the BrowsingContext detach logic to store a flag on the
current inner window recording that it was active when its BrowsingContext was
detached, and then later checks that flag to determine if it is the current
window for a detached BrowsingContext.
Differential Revision: https://phabricator.services.mozilla.com/D49032
--HG--
extra : moz-landing-system : lando
They do the same so no reason to have it duplicated. EnsureDOMStyleSheets
doesn't have any other caller so just inline it there.
Differential Revision: https://phabricator.services.mozilla.com/D56986
--HG--
extra : moz-landing-system : lando
The OnContentBlockingEvent is no longer needed once we make the
OnContentBlockingEvent parent only.
Differential Revision: https://phabricator.services.mozilla.com/D55788
--HG--
extra : moz-landing-system : lando
This patch adds an IPC message which allows content process to notify
the OnContentBlockingEvent in the parent process. This is needed because
there are some situations that the content blocking happens in content
processes, so we need to tell the parent process to notify it. Such as,
AntiTrackingCommon::AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor().
Differential Revision: https://phabricator.services.mozilla.com/D55648
--HG--
extra : moz-landing-system : lando
This patch moves the propatation of the onContentBlockingEvent in the
content processes. After this, the
nsGlobalWindowOuter::NotifyContentBlockingEvent will only update the
ContentBlockingLog.
Differential Revision: https://phabricator.services.mozilla.com/D55646
--HG--
extra : moz-landing-system : lando
This patch makes the WindowGlobalParent to be able to send the
OnContentBlockingEvent in the parent process.
Differential Revision: https://phabricator.services.mozilla.com/D55645
--HG--
extra : moz-landing-system : lando
This adds a ContentBlockingLog into the WindowGlobalParent. This
ContentBlockingLog is bascially a copy of the log in the content
process. This log in parent is needed for the OnContentBlockingEvent in
parent process since we need an overview of the content blocking events
for OnContentBlockingEvent. And the ContentBlockingLog exits in the
content process in this stage, so we need to maintain a copy of it to
get the overview of the blocking events in parent.
Differential Revision: https://phabricator.services.mozilla.com/D54929
--HG--
extra : moz-landing-system : lando
CheckMayLoadAndReport takes a window ID. This allows us to report
errors from it to the web console as needed. Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.
Differential Revision: https://phabricator.services.mozilla.com/D56388
--HG--
extra : moz-landing-system : lando
Added @rbarker as a reviewer to check if this will work well within GeckoView for FxR / Android.
Added @bzbarsky for test_interfaces.html. -- I'd like to re-land the secure origin requirement for WebVR as part of this patch, as it doesn't help to have UI that can't guarantee the identity of the origin. (This was backed out due to test failures originally, and since been fixed)
Differential Revision: https://phabricator.services.mozilla.com/D45951
--HG--
rename : browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js => browser/components/privatebrowsing/test/browser/browser_privatebrowsing_rememberprompt.js
extra : moz-landing-system : lando
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.
Rebased across https://hg.mozilla.org/mozilla-central/rev/3f0b4e206853
by Karl Tomlinson <karlt+@karlt.net>.
Differential Revision: https://phabricator.services.mozilla.com/D41247
--HG--
extra : moz-landing-system : lando
This turned out to not be the root cause for that broken site, but I wrote the
code so... I enabled it on Nightly only to see if there's fallout, I don't think
we need to ship this in the near term, your call.
Depends on D56555
Differential Revision: https://phabricator.services.mozilla.com/D56556
--HG--
extra : moz-landing-system : lando
Otherwise code like StyleChildrenIterator won't find it, plus it is the right
thing to do anyway.
You don't really want this to inherit from the root element, even though given
this content is under our control (only in chrome documents) it is less of an
issue.
Differential Revision: https://phabricator.services.mozilla.com/D56637
--HG--
extra : moz-landing-system : lando
Spec change brief:
A request-body-header name is a header name that is a byte-case-insensitive match for one of:
- Content-Encoding
- Content-Language
- Content-Location
- Content-Type
If one of the following is true
1. actualResponse ’s status is 301 or 302 and request ’s method is POST
1. actualResponse ’s status is 303 and request ’s method is not GET or HEAD
then set then:
1. Set request ’s method to GET and request ’s body to null.
1. For each headerName of request-body-header name , delete headerName from request ’s header list .
Differential Revision: https://phabricator.services.mozilla.com/D55887
--HG--
extra : moz-landing-system : lando
The idea of this patch is to try to not use oberver mechanism as possible. To
achieve that, it introduces deleteByOriginAttributes() to cleaners. Different
from other methods, it would only be executed if it's implemented from a
cleaner.
It doesn't remove oberver mechanism entirely since some cleaners are still using
that for other deleteByXXX() functions. So, it only applies removing stuff to
PushService, QuotaManagerService, ServiceWorkerManager, nsPermissionManager,
nsApplicationCacheService, and nsCookieService.
Since the original issue is related to QuotaManagerService, it adds xpcshell
test under the dom/quota/test/unit/ to ensure the behavior won't be changed
accidentally in the future.
Differential Revision: https://phabricator.services.mozilla.com/D33758
--HG--
extra : moz-landing-system : lando
Note that `TextControlState::BindToFrame()` may also run script if it's
called without script blocker. However, it shouldn't occur. Therefore,
we don't need to mark it `MOZ_CAN_RUN_SCRIPT`, but we should check
script blocker existence with `MOZ_ASSERT`.
Differential Revision: https://phabricator.services.mozilla.com/D55776
--HG--
extra : moz-landing-system : lando
If `PreareEditor()` returns `NS_OK`, but if the instance is deleted at returning
from it, `GetTextEditor()` will access `mTextEditor`. Therefore, this patch
makes `PrepareEditor()` return error if the instance is destroyed at its end.
Differential Revision: https://phabricator.services.mozilla.com/D55775
--HG--
extra : moz-landing-system : lando
Similar to the previous patch, it may notify selection listeners of native
anonymous tree in `<input>` and `<textarea>` element.
Differential Revision: https://phabricator.services.mozilla.com/D55774
--HG--
extra : moz-landing-system : lando
They are really complicated and can run script while the instance is being
destroyed. Therefore, they should have their own `AutoTextControlHandlingState`
as "kungFuDeathGrip".
Differential Revision: https://phabricator.services.mozilla.com/D55773
--HG--
extra : moz-landing-system : lando
The destructor of `AutoTextControlHandlingState`is marked as
`MOZ_CAN_RUN_SCRIPT`, but it's not checked at build time. And this does not
need to be created when the method does not run script. Therefore, we should
mark its constructor as `MOZ_CAN_RUN_SCRIPT` instead since it's stack only
class so that its constructor and destructor are always called from same
method.
Differential Revision: https://phabricator.services.mozilla.com/D55772
--HG--
extra : moz-landing-system : lando
Added @rbarker as a reviewer to check if this will work well within GeckoView for FxR / Android.
Added @bzbarsky for test_interfaces.html. -- I'd like to re-land the secure origin requirement for WebVR as part of this patch, as it doesn't help to have UI that can't guarantee the identity of the origin. (This was backed out due to test failures originally, and since been fixed)
Differential Revision: https://phabricator.services.mozilla.com/D45951
--HG--
rename : browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js => browser/components/privatebrowsing/test/browser/browser_privatebrowsing_rememberprompt.js
extra : moz-landing-system : lando
Added @rbarker as a reviewer to check if this will work well within GeckoView for FxR / Android.
Added @bzbarsky for test_interfaces.html. -- I'd like to re-land the secure origin requirement for WebVR as part of this patch, as it doesn't help to have UI that can't guarantee the identity of the origin. (This was backed out due to test failures originally, and since been fixed)
Differential Revision: https://phabricator.services.mozilla.com/D45951
--HG--
rename : browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt.js => browser/components/privatebrowsing/test/browser/browser_privatebrowsing_rememberprompt.js
extra : moz-landing-system : lando
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.
Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.
Differential Revision: https://phabricator.services.mozilla.com/D53744
--HG--
extra : moz-landing-system : lando
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
--HG--
extra : moz-landing-system : lando
and don't call process() on inactive AudioWorkletProcessor when inputs are null.
AudioNodeTrack::mIsActive, which determines when ProcessBlocksOnPorts() is
called, differs slightly from "actively processing" in the spec.
"An AudioScheduledSourceNode is actively processing if and only if it is
playing for at least part of the current rendering quantum" but
AudioNodeTrack::mIsActive is set even before the source node has started
playing.
Null input blocks provide a better indication of inputs that are not actively
processing.
Differential Revision: https://phabricator.services.mozilla.com/D54663
--HG--
extra : moz-landing-system : lando
This reference is necessary when sending session storage data for
all browsing context to the parent process. Note that it entails
making SessionStorageManager a cycle collection participant, since
adding this reference creates a cycle.
Differential Revision: https://phabricator.services.mozilla.com/D55659
--HG--
extra : moz-landing-system : lando
With Fission enabled we do not necessarily have access to the
nsDocShell that holds the top-level browsing context, so the
BrowsingContext is a better place to store information that needs
to be accessible to nested browsing contexts.
Differential Revision: https://phabricator.services.mozilla.com/D55276
--HG--
extra : moz-landing-system : lando
Most of these fixes involve fixing test XUL to not use <dialog> as a top level element or replacing calls to document.documentElement that expect it to return the dialog, now that the dialog is not the top level element anymore.
Differential Revision: https://phabricator.services.mozilla.com/D53722
--HG--
extra : moz-landing-system : lando
Because we won't change platform dynamically, so we should be able to keep same the event source all the time and use `Open()` and `Close()` to control if we need to monitor media keys event or not.
Differential Revision: https://phabricator.services.mozilla.com/D56499
--HG--
extra : moz-landing-system : lando
Add `Open()` to support inherited sources to implement their own initialization and also don't hold the reference of the source if it fails to initialize.
Differential Revision: https://phabricator.services.mozilla.com/D56449
--HG--
extra : moz-landing-system : lando
Add an ability for inherited sources to implement their own deconstruction operations.
Differential Revision: https://phabricator.services.mozilla.com/D56447
--HG--
extra : moz-landing-system : lando
This turned out to not be the root cause for that broken site, but I wrote the
code so... I enabled it on Nightly only to see if there's fallout, I don't think
we need to ship this in the near term, your call.
Differential Revision: https://phabricator.services.mozilla.com/D56556
--HG--
extra : moz-landing-system : lando
This is the basic functionality needed to work with buffers.
What it doesn't have:
- ability to re-map the buffer for writing
- async writing map
- most of the validation
Differential Revision: https://phabricator.services.mozilla.com/D55656
--HG--
extra : moz-landing-system : lando
Currently, `nsGlobalWindowOuter` converts between devices pixels and CSS pixels
with `nsPresContext` for calling `nsIBaseWindow` methods. However, the scale
information in `nsPresContext` may not be the latest of the corresponding
widget. Therefore, this makes the methods of `nsGlobalWindowOuter` which
work with `nsIBaseWindow` convert pixels with `nsIBaseWindow`'s information.
Differential Revision: https://phabricator.services.mozilla.com/D54151
--HG--
extra : moz-landing-system : lando
If `nsGlobalWindowOuter::ResizeTo()` etc is called before receiving
`BrowserChild::RecvUIResolutionChanged()`, the `aX`, `aY`, `aCx` and `aCy`
values are computed with old scale.
This patch makes `BrowserChild::SendSetDimensions()` set scale in the
remote process and `BrowserParent::RecvSetDimensions()` recompute each
value with current scale.
Differential Revision: https://phabricator.services.mozilla.com/D54150
--HG--
extra : moz-landing-system : lando
The intial reason of creating MediaController as a basic class and extend this class to TabMediaController is that we would like to have a class MediaSessionController in the future, which is used to handle media session operations.
However, I found that being a media session controller or not is actually a dynamic change, so if we implement that as a different controller, we have to create and destroy controllers and switch between them a lots of times.
Ex. the tab can be controlled by TabController in the beginning, but after we create a media session, we have to use MediaSessionController. However, if we cancel the action handlers of the media session, then we have to switch back to TabController again...
Therefore, we should merge them into one class, and handle the media session part by different methods.
Differential Revision: https://phabricator.services.mozilla.com/D56315
--HG--
extra : moz-landing-system : lando
This is the basic functionality needed to work with buffers.
What it doesn't have:
- ability to re-map the buffer for writing
- async writing map
- most of the validation
Differential Revision: https://phabricator.services.mozilla.com/D55656
--HG--
extra : moz-landing-system : lando
We enable the pref in the harness so that local testing with --enable-fission will get the same results as treeherder.
Differential Revision: https://phabricator.services.mozilla.com/D56313
--HG--
extra : moz-landing-system : lando
The test was disabled 8 months ago. Re-enabling to see if this intermittent
still exists.
Differential Revision: https://phabricator.services.mozilla.com/D55989
--HG--
extra : moz-landing-system : lando
It looks like there could be a race condition where GetTerminationPromise()
is called at the same time on two threads on an empty MozPromiseHolder, and one
of the MozPromises created by MozPromiseHolder::Ensure if leaked (and its
chained callbacks never called).
Additionally, I don't think the ParentStatusProtected() > Running check is
necessary because for ServiceWorkers, the global can't call close(), so the
parent status is at least "Canceling", making the CloseWorkerOnMainThread call
unnecessary (which just calls WorkerPrivate::Cancel). The parent process also
will always send a termination operation as the last operation, so we can just
rely on that to make sure the worker is fully terminated.
Differential Revision: https://phabricator.services.mozilla.com/D56277
--HG--
extra : moz-landing-system : lando
This reference is necessary when sending session storage data for
all browsing context to the parent process. Note that it entails
making SessionStorageManager a cycle collection participant, since
adding this reference creates a cycle.
Depends on D55276
Differential Revision: https://phabricator.services.mozilla.com/D55659
--HG--
extra : moz-landing-system : lando
With Fission enabled we do not necessarily have access to the
nsDocShell that holds the top-level browsing context, so the
BrowsingContext is a better place to store information that needs
to be accessible to nested browsing contexts.
Differential Revision: https://phabricator.services.mozilla.com/D55276
--HG--
extra : moz-landing-system : lando
Also renamed TransactionBase::SetActive/mHasBeenActive to
TransactionBase::Init/mInitialized to avoid confusion with the 'Active' state
defined in the IndexedDB spec.
Differential Revision: https://phabricator.services.mozilla.com/D55682
--HG--
extra : moz-landing-system : lando