We would allow media without audio track to autoplay after it had loaded the metadata.
If media hasn't loaded metadata yet, we would treat it as audible media and then block it.
Differential Revision: https://phabricator.services.mozilla.com/D3670
--HG--
extra : moz-landing-system : lando
The spec mandates that ServiceWorkerContainer only be visible in a secure context,
yet currently it is (almost) always visible, but rejects calls to register() in
non-secure contexts. This commit moves the context check to a [Func] function, thus
implementing the behavior exactly as specified.
This commit uses the same mechanism used by [SecureContext] bindings instead of the
current ad hoc implementation.
Differential Revision: https://phabricator.services.mozilla.com/D2950
--HG--
extra : moz-landing-system : lando
The test as it is currently written checks whether navigator.serviceWorker
exists with system privileges. By using eval(), this commit makes it
perform the check with the content's privileges.
Differential Revision: https://phabricator.services.mozilla.com/D3596
--HG--
extra : moz-landing-system : lando
This preference must be enabled since the test creates an insecure context, in
which navigator.serviceWorker is undefined.
Differential Revision: https://phabricator.services.mozilla.com/D3594
--HG--
extra : moz-landing-system : lando
This matches other implementations and the spec for fallback content like:
<canvas><div>abc
(calling div.innerText).
We're treating the <div> as 'rendered' because it's not in a display: none
subtree, but that's not ok, since it is in fact not rendered.
This was added in bug 1226293, and Boris suggested this change, but roc opposed
because it'd be hard to spec properly in comment 15. Looks like the HTML spec
ended up merging roc's innerText spec, and now it's spec'd in terms of 'being
rendered'.
I think IsOrHasAncestorWithDisplayNone just doesn't work in any reasonable way
for stuff out of the flat tree. Thus I think this change is the right thing.
The canvas test fails because of bug 1485076.
Differential Revision: https://phabricator.services.mozilla.com/D3887
--HG--
extra : moz-landing-system : lando
We implement the layout part of offset-path. Now we don't have
offset-distance, so use the default value, 0%, for it.
Note: rename mCombinedTransform as mIndividualTransform, which only
stores the combined individual transforms. We apply the individual
transforms, motion path transform, and specified transform in
ReadTransforms. (We have to follow the order, so we don't combine the
specified transform in FinishStyle.)
Depends on D2967
Differential Revision: https://phabricator.services.mozilla.com/D2968
--HG--
extra : moz-landing-system : lando
Implement one variant of BuildPath to accept nsTArray<StylePathCommand>,
which is used by <offset-path> (and clip-path in the future).
Depends on D3922
Differential Revision: https://phabricator.services.mozilla.com/D2967
--HG--
extra : moz-landing-system : lando
This only includes functions that seem to be using it to reference a window.
There are other instances where it's used as a generic chrome URI, and those
are left unchanged.
Differential Revision: https://phabricator.services.mozilla.com/D3806
--HG--
extra : moz-landing-system : lando
We implement the layout part of offset-path. Now we don't have
offset-distance, so use the default value, 0%, for it.
Note: rename mCombinedTransform as mIndividualTransform, which only
stores the combined individual transforms. We apply the individual
transforms, motion path transform, and specified transform in
ReadTransforms. (We have to follow the order, so we don't combine the
specified transform in FinishStyle.)
Differential Revision: https://phabricator.services.mozilla.com/D2968
Implement one variant of BuildPath to accept nsTArray<StylePathCommand>,
which is used by <offset-path> (and clip-path in the future).
Differential Revision: https://phabricator.services.mozilla.com/D2967
Bug 1483882 removed the line that used to remove the SHADOW_TREE bit during
unbind. I missed this caller which still assumed that `IsInShadowTree() ->
GetContainingShadow()`.
That means that before that patch it was going through
nsIDocument::RemoveStyleSheet, which looks pretty wrong to me.
Fix it so that we don't remove the stylesheet (we weren't doing it before
anyway), but we don't crash.
Differential Revision: https://phabricator.services.mozilla.com/D3831
--HG--
extra : moz-landing-system : lando
This patch add comments to IndexedDBHelper.jsm to clarify how txn.result is set.
The comments should clear up any confusion caused by previous commit message
(fix for bug 1409641).
--HG--
extra : rebase_source : 57a6f3eb569224a9e432803ef67d80f57219f7ab
We end up with three <svg:use> elements to update (lol), because the target (#c)
changes, since we create another element with that ID in the document via
outerHTML.
Differential Revision: https://phabricator.services.mozilla.com/D2650
--HG--
extra : moz-landing-system : lando
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.
Differential Revision: https://phabricator.services.mozilla.com/D3728
--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
This patch adds simple stubs to convert between the nsISimpleEnumerator
iteration protocol and the JS iteration protocol.
Each iterable object is required to have an @@iterator method which returns an
object implementing the iterator protocol. The later objects, by convention,
also have such a method which returns the object itself.
This patch adds both a @@iterator() and entries() methods to
nsISimpleEnumerator. The former returns an iterator which returns plain
nsISupports objects. The latter accepts an IID and queries each element to
that IID before returning it. If any element fails to query, the error is
propagated to the caller.
Differential Revision: https://phabricator.services.mozilla.com/D3727
--HG--
extra : rebase_source : 340eb43a1c5e6d7ae69fa8ee486d66d31d079b14
extra : histedit_source : f3efc6c265851a563968ee410e4626e0540f55c0
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.
This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.
Differential Revision: https://phabricator.services.mozilla.com/D3725
--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
This makes it easier to add promise handlers from C++ in a manner similar to
JavaScript.
Differential Revision: https://phabricator.services.mozilla.com/D3692
--HG--
extra : rebase_source : efa6735da4b22677b684ae790aede6aac6bb1bad
1. Adding a new method void closePayment(in AString requestId) in
nsIPaymentUIService.idl
2. Implementing the closePayment method in paymentUIService.js.
3. Calling closePayment of paymentUIService.js in
PaymentRequestService::LaunchUIAction()
1. Returning NS_ERROR_FAILURE in PaymentRequestService::RespondPayment() when
the specified PaymentRequest does not exist in PaymentRequestService.
2. Renaming "cleanup" to "close" in DOM::WebPayment codes to fit the actual
behavior.
Add StartOpenBSDSandbox method calling pledge() syscall,
and use it where we're sandboxing processes.
The pledge subsets are coming from two new prefs:
- security.sandbox.pledge.content for the content process
- security.sandbox.pledge.main for the main process
--HG--
extra : rebase_source : 60da70e2d335755fda6126a6b7de7aad41eebb7e
These stopped having any effect when we switched to ChromeUtils.generateQI,
which does not support automatic nsIClassInfo forwarding.
Differential Revision: https://phabricator.services.mozilla.com/D3707
--HG--
extra : rebase_source : 62a3690304ad7baa760c41eba777aa17b9af33f0
A mDisplay vs mImage mixup. We also set both values in CreateTrackInfoWithMIMETypeAndContainerTypeExtraParameters to prevent similar issues in the future.
Differential Revision: https://phabricator.services.mozilla.com/D3788
--HG--
extra : moz-landing-system : lando
While trying to repro bug 1484293 I noticed that this assertion failed:
https://searchfox.org/mozilla-central/rev/ef8b3886cb173d5534b954b6fb7eb2d94a9473d0/dom/base/ShadowRoot.cpp#160
(during unlink, while unbinding the kids)
We rely on GetComposedDoc returning the right thing during unbind to cleanup
some stuff (see bug 1473637 for example), so it should probably be correct all
the time, regardless of whether something is unlinked or not.
Also this makes GetComposedDoc() much faster, which is nice too, since we call
it somewhat often.
I removed NodeHasRelevantHoverRules, since it's unused (was used by the old
style system).
I moved the SetIsConnected(false) call for the shadow root to before unbinding
the kids for consistency with what Element does with the uncomposed doc flag,
now that the children's connectedness doesn't depend on the shadow root's.
Differential Revision: https://phabricator.services.mozilla.com/D3715
--HG--
extra : moz-landing-system : lando
While trying to repro bug 1484293 I noticed that this assertion failed:
https://searchfox.org/mozilla-central/rev/ef8b3886cb173d5534b954b6fb7eb2d94a9473d0/dom/base/ShadowRoot.cpp#160
(during unlink, while unbinding the kids)
We rely on GetComposedDoc returning the right thing during unbind to cleanup
some stuff (see bug 1473637 for example), so it should probably be correct all
the time, regardless of whether something is unlinked or not.
Also this makes GetComposedDoc() much faster, which is nice too, since we call
it somewhat often.
I removed NodeHasRelevantHoverRules, since it's unused (was used by the old
style system).
I moved the SetIsConnected(false) call for the shadow root to before unbinding
the kids for consistency with what Element does with the uncomposed doc flag,
now that the children's connectedness doesn't depend on the shadow root's.
Differential Revision: https://phabricator.services.mozilla.com/D3715
--HG--
extra : moz-landing-system : lando
* Remove use counters since they're useless right now and I'm re-implementing
them in bug 1425700 (I'll cleanup UseCounterFor and friends later).
* Rename some stuff to be clearer (TakeDeclarationBlock instead of
GetDeclarationBlock).
* Don't allocate a new URLExtraData for each mapped attribute, cache them in
the parser instead.
CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D4006
* Remove use counters since they're useless right now and I'm re-implementing
them in bug 1425700 (I'll cleanup UseCounterFor and friends later).
* Rename some stuff to be clearer (TakeDeclarationBlock instead of
GetDeclarationBlock).
* Don't allocate a new URLExtraData for each mapped attribute, cache them in
the parser instead.
Differential Revision: https://phabricator.services.mozilla.com/D4006
The mIsTrackingResource flag on nsIHttpChannel was split into two separate
flags depending on whether or not the resource is third-party. The correct
flag will be set by the channel classifier. Similarly, a new function was
introduced, GetIsThirdPartyTrackingResource(), for those consumers (like TP)
who only care about third-party trackers.
The existing function, GetIsTracking(), will continue to look at both
first-party and third-party trackers (the behavior since first party
tracking was added to annotations in bug 1476324).
The OverrideTrackingResource() function now allows nsHTMLDocument to
override both mIsFirstPartyTrackingResource and
mIsThirdPartyTrackingResource, but since this function is a little dangerous
and only has a single user, I added an assert to make future callers think
twice about using it to opt out of tracking annotations.
Currently, only the default storage restrictions need to look at first-party
trackers so every other consumer has been moved to
mIsThirdPartyTrackingResource or GetIsThirdPartyTrackingResource().
This effectively reverts the third-party checks added in bug 1476715 and
replaces them with the more complicated check that was added in bug 1108017.
It follows the approach that Ehsan initially suggested in bug 1476715. It
also reverts the changes in the expected values of the tracking annotation
test since these were, in hindsight, a warning about this regression.
Depends on D3722
Differential Revision: https://phabricator.services.mozilla.com/D3723
--HG--
extra : moz-landing-system : lando
This moves the code that detects very low memory scenarios and grabs memory
reports from the main thread event-loop to the available memory tracker.
Besides removing the overhead of the check from the event-loop code this
increases the likeliness of the reports being gathered by sampling at a
higher frequency but only when we already detected a low-memory scenario. Last
but not least this add checks for low commit-space detection alongside low
virtual-memory detection.
Differential Revision: https://phabricator.services.mozilla.com/D3669
--HG--
extra : moz-landing-system : lando
Summary:
Implemented the non-event handler attributes of the Visual Viewport API
according to the spec: https://wicg.github.io/visual-viewport
The 'onresize' and 'onscroll' attributes will be implemented in the bug
1478776.
MozReview-Commit-ID: G4bkIZ9VtZ2
--HG--
extra : rebase_source : f73681fa9a6b3642e4ea176b994bd168572d7f6c
We report the number of frames dropped by the compositor because they were too late through:
ImageComposite -> ImageHost -> CompositableTransactionParent -> ImageBridgeParent -> IPDL -> ImageBridgeChild -> ImageContainerListener -> ImageContainer -> VideoSink
Differential Revision: https://phabricator.services.mozilla.com/D2177
* Drop the decoder when it finishes regardless of who called it.
* Match criteria for having mDecoder process EOF from OnStopRequest to
the criteria used for eager decoding in StreamReaderFunc.
* Process EOF when decoding lazily.
* Get rid of the useless mResponseCharset field.
MozReview-Commit-ID: 7oJwyKQYP8K
Differential Revision: https://phabricator.services.mozilla.com/D3591
--HG--
extra : moz-landing-system : lando
flushComputedStyle is as follows:
var cs = getComputedStyle(elem);
cs.marginLeft;
That _probably_ flushes style in most engines, but it's possible some engine in
the future will optimize things in a way that it can flush marginLeft without
flushing, say, backgroundColor. Before moving these tests to wpt, it would be
better to explicitly flush the property (or at least one of the properties) we
are transitioning.
This patch also updates the "Setting zero combined duration" test from
test_animation-cancel.html since, in making this change, I realized the test was
wrong.
Specifically, it was testing that when we set a combined duration of zero that
a transition is canceled. However, nothing in the spec requires this. The spec
only requires a non-zero combined duration to _start_ a transition and only
cancels an existing transition if the combined duration becomes _zero_ if the
"the end value of the running transition is not equal to the value of the
property in the after-change style".
This test passed, however, because it changed the transition property to
margin-top, hence it was actually testing the same condition as the previous
test.
--HG--
extra : rebase_source : ab1890c3125cb0a136869cd665efd2aa358304f0
This patch splits the first test into four separate tests since it really seems
to be testing four different things.
Likewise, the later patch for replacing the effect is split into two parts:
- One to test the playState behavior
- One to test the value reported by transitionProperty
The test, "After setting a transition's effect to null, transitionend is still
dispatched", is dropped since it is covered by the last test in
test_event-dispatch.html.
--HG--
extra : rebase_source : dae7ade8a7217e7916930278050b1c9fae847553
This patch merely tidies up some whitespace and uses of quotes / template
strings. There are no substantive changes.
--HG--
extra : rebase_source : 09383565b47c2a6173e1839756058e2b20dfff16
This mostly just tidies up these tests to give them sensible titles.
The only test with major substantive changes is the first test. This test tests
three things:
1) That getAnimations() returns one transition per transitioning property
2) That getAnimations() returns transitions in the order they were generated
3) That CSS transitions have their start time set based on when they were
generated.
(2) is covered later in this file by the test: 'getAnimations sorts
transitions by when they were generated'
(3) is really a test for startTime, if anything, not getAnimations().
I'm not sure how necessary it is, but I've added it to
test_animation-starttime.html for now.
As a result, this patch updates this first test to only cover (1).
--HG--
extra : rebase_source : 992861421e83e8fc391f865888428de22ed16914
This is mostly whitespace tidy-ups. The only substantive change is the fix to
the test description which previously seemed to be missing some words.
--HG--
extra : rebase_source : 9eb84f5a845ece8fe60d5322de6d5f8a6580c370
Apart from obvious tidy-ups the substantive changes to tests in this file are as
follows:
* Skipping forward through animation
-> This is really testing two things:
(a) That you can seek a transition using the start time.
(b) That seeking a transition using the start time triggers
dispatching events.
This patch splits the above into two separate tests.
* Skipping backwards through animation,
-> All these tests are really just exercising event dispatch which is
already covered by test_event-dispatch.html.
As a result this patch drops these tests.
* Setting startTime to null
-> Covered by 'Setting an unresolved start time sets the hold time'
in wpt/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html
* Animation.startTime after pausing
-> Covered by 'Pausing clears the start time'
in wpt/web-animations/timing-model/animations/pausing-an-animation.html
--HG--
extra : rebase_source : ed598e907085d1cb06ef2142d6471eec4a34300d
The test: 'A new ready promise is created each time play() is called the
animation property', is covered in:
web-animations/interfaces/Animation/ready.html
by the 'A new ready promise is created when play()/pause() is called' test.
As a result, this patch removes that test.
--HG--
extra : rebase_source : 61059b90fec505784b9df67c9b8a2962ca45204b
This seems to be adequately covered by:
web-animations/timing-model/animations/pausing-an-animation.html
(specifically the last test: 'The animation's current time remains fixed
after pausing')
web-animations/timing-model/animation-effects/simple-iteration-progress.html
(which checks that the iteration progress is correctly calculated from the
current time)
--HG--
extra : rebase_source : 58fc61afb9ae638568f17950723bdba0c758c6a5
For the first test, we really want to check that it is possible to restart
transitions (since they are otherwise disassociated once they finish) hence this
patch updates the test to the actual output in style rather than timing.
The second test is covered in
web-animations/timing-model/animations/reversing-an-animation.html
by the 'Playing a finished and reversed animation seeks to end' test so this
patch removes it from this file.
--HG--
extra : rebase_source : 415b8c9ca314085e64ffc715bf72046db264cf52
This patch basically completely rewrites this file to make it simpler and remove
unnecessary tests.
In particular:
* It sets the duration and delay to 100s to match what we use in most tests
* All the helper methods at the start are inlined into the relevant tests
because doing so makes the tests much easier to read and debug.
* The first two tests are combined and extended
- Testing the initial current time is zero is not generally useful but it is
when we're testing setting it
- What the second test really wants to test is that the style updates (i.e.
you really can seek a transition, not just that the currentTime value
updates)
- The trick where we set the start time just to get out of the pending state
seems unnecessary, we may as well just wait on ready. In fact, we don't
_need_ to do that, but this test is about checking you can seek a transition
in motion.
* In the fourth test, 'Skipping backwards through transition', we don't check
the event is dispatched since that is covered in test_event-dispatch.html
in the 'Active -> Before' test.
* The final test, 'Animation.currentTime after pausing', is covered by
web-animations/timing-model/animations/pausing-an-animation.html
--HG--
extra : rebase_source : 113af8f3e4b4f2ffe90cb9bb87be3c2e72a82289
We're a bit inconsistent about this, but generally we try to keep this files as
minimal as possible.
There is still a lot of other cruft in the starttime and currenttime test files
but we will remove that when we tidy up those files in later patches in this
series.
--HG--
extra : rebase_source : 93ef290315b4650650de960551ff07572ff7656e
As part of this change, the "Restart transition after cancelling transition
immediately" test in test_event-dispatch.html needed significant changes.
The reason is that this test was calling:
watcher.wait_for([ 'transitioncancel',
'transitionrun',
'transitionstart' ]);
However, it was not waiting for the result of that call and hence was not
actually checking if the events were being dispatched. And, they are not.
There are two problems. Firstly, this test cancels the transition by setting
display:none. However, transitions don't run on display:none elements so
attempting to restart the transition will not generate transition events.
This might be a bug, but it is not a recent regression in any case (I tested
back to Firefox 54).
However, this test does not require using display:none to cancel. There are
_many_ tests that check that display:none generates a transitioncancel event.
This test only needs to make the transition idle. As a result, this patch makes
that test call transition.cancel() instead.
However, even with that change this test will not pass because it sets
a transition-delay of 100s (presumably so that it does not need to check for
a transitionstart event). As a result this test should not wait on _both_
transitionrun and transitionstart but just transitionrun.
--HG--
extra : rebase_source : a0af0928fd5668b23c92bd8ca142d4b8e99f5429
This patch also drops the checkStateOnSettingCurrentTimeToZero function since it
is no longer used.
--HG--
extra : rebase_source : bd4fdb9368d55b120c839330dbd90a0a89464370
This is slow to do when the element isn't visible, and we know it
won't have a XBL binding anyway, since it's a Custom Element.
Differential Revision: https://phabricator.services.mozilla.com/D3539
--HG--
extra : moz-landing-system : lando
Bug 1481139 - p1: handle invalid file descriptors.
Bug 1481139 - p2: add dummy fds for GMP process.
Two file descriptors were added in bug 1438678 and 1471025 for content/child
process but not GMP process, and it breaks the IPC channel on Android.
Add dummy values to make it work for now before bug 1440207 clean up the mess.
Differential Revision: https://phabricator.services.mozilla.com/D3541
--HG--
extra : moz-landing-system : lando
This patch, basically, turns the check. To avoid checking the same direcotries
multiple time, it creates a member hashtable |mValidOrigins| in QuotaManager and
use it in EnsureOriginDirectory(). Since it needs to use the member hashtable,
this patch also moves EnsureOriginDirectory() to become a QuotaManager member
function.
--HG--
extra : rebase_source : 170f749b07ca955e1dc41a627d339709381ffcad