float(numeric_limits<int>::max()) can round up and so this inequality was
false even when f was (float)0x80000000 (without rounding) and could not be
represented by an int.
--HG--
extra : rebase_source : 758b66fcab9ec540cf444e573f7f3a7bf9c06ba2
This needed some fine tuning to produce the crash, and so is a very specific
test. It is still of value because this specific situation is not otherwise
tested, and it provides input to fuzzers for potential similar situations.
--HG--
extra : rebase_source : d87ec7d1e483a0a3045f07d7686b2be1b80a2e7f
We will use this in the next patch in this series to fetch the base style.
(I tried simply passing this as a parameter to GetBaseStyle but it proved to be
more complicated since all the overrides of GetBaseStyle would need to be
updated to take a parameter that would be irrelevant to most of them.)
MozReview-Commit-ID: Fdr4rFUlE9V
--HG--
extra : rebase_source : 26978951302b4764938959a065402f05220b6093
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.
MozReview-Commit-ID: JQKaEuCKV2F
--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
We will use this in a subsequent patch in this series to determine if we need to
fetch a style context at the beginning of ComposeAttribute (when we create the
nsISMILAttr) or not.
MozReview-Commit-ID: CFBNmmFNNef
--HG--
extra : rebase_source : 4729b2e1194649f461c353fa74d99b5b7829a077
In a subsequent patch we will extract a StyleAnimationValue from an
nsStyleContext. Rather than serializing it and then re-parsing it into
a StyleAnimationValue, this patch adds a method to directly accept
a StyleAnimationValue since that is what nsSMILCSSValueType stores internally
anyway.
MozReview-Commit-ID: KBaLYAzAlWZ
--HG--
extra : rebase_source : b42f25236fba52939e07c63f5195d10678ea12bd
Most of the time, the return value of this method should be checked,
because behavior should depend on whether or not an exception is
thrown. However, if it is called immediately after a throw it doesn't
need to be checked because it will always return true. bz said there
is no public API that lets you assume there is an exception because it
would be "too easy to misuse".
MozReview-Commit-ID: CqyicBbcNjW
--HG--
extra : rebase_source : a5b74ba88a927a90d491ceb8f0b750a67f62b0f4
In addition to the returned MediaResult, a special number-of-tracks value
(not just 0) indicates an unrecoverable error.
For Rust-vs-Stagefright comparison purposes, an error is considered the same
as 0 (because Stagefright never returns errors, but Rust may, so complaining
about that would be too noisy, and useless to us.)
MozReview-Commit-ID: IwadWSOIWr4
--HG--
extra : rebase_source : 29f53ee6a02a0431adb0b615a122a4e7b480108c
The returned MediaResult is used as error or warning in MP4Demuxer::Init().
MozReview-Commit-ID: Bnv4xG8bCJ4
--HG--
extra : rebase_source : c1952ed61396834b0cd7da58c9b64481a5c46ab1
If 'media.playback.warnings-as-errors' is true, demuxing and decoding warnings
(i.e., non-fatal errors) will be treated as errors, causing playback to fail.
Currently set to false by default.
This could be later changed to catch and diagnose more issues.
MozReview-Commit-ID: BTaZ6TbIbNG
--HG--
extra : rebase_source : bacc24a46f588dd344e6d46178ae2d2c58882fcb
Similarly to the MediaFormatReader, TrackBuffersManager can forward warnings
from the demuxer initialization to the associated HTMLMediaElement.
Note that errors (sent to OnDemuxerInitFailed) are currently *not* forwarded
to the HTMLMediaElement by design. In the future, we may want to add this
feature so that mediasource errors can also be reported to webcompat.
MozReview-Commit-ID: GjluZbpmC9q
--HG--
extra : rebase_source : 57c02f86c56f054f209094d9697209300acc1288
The MediaFormatReader now takes the MediaResult from the Demuxer::Init promise
resolution, and if there are no other errors but the MediaResult is not NS_OK
it will forward that warning to the decoder owner (i.e., the associated
HTMLMediaElement).
MozReview-Commit-ID: 5rTmzqqPLI0
--HG--
extra : rebase_source : 5f81db185a01c012bf0418af2a42986db14a7e6f
If MP4Demuxer::Init detects some recoverable error (e.g., invalid tracks when
others may still be usable), it will eventually Resolve the promise with the
first warning.
Later on, errors/warnings from the MP4Metadata parser will also be handled, to
provide even better diagnostics.
MozReview-Commit-ID: E9Rly9dhXW3
--HG--
extra : rebase_source : cae214d0c80297bd61156dc1a305a186da0974fe
In case of successful initialization, there could still be some warning about
a recoverable error. To carry more information about this potential warning,
the resolve-value type of the promise is changed from nsresult to MediaResult.
Existing code doesn't need to be changed:
- In Resolve() calls, the stored MediaResult can implicitly be constructed from
an nsresult -- always NS_OK at the moment anyway.
- In following Then(), the promise's MediaResult can implicitly be converted to
an nsresult.
Future patches will modify some of the Resolve's and Then's, to forward warning
details to some Decoder Doctor object...
MozReview-Commit-ID: J0bXDFxXQHQ
--HG--
extra : rebase_source : cb10cdfa80e34783a459e5946b746b9f1920bd87
In the new architecture of Quantum DOM, all timer callback need a
specified event target. So, we add the new document arg to Start
function to get the event target from it. And update all callers.
MozReview-Commit-ID: a482mukqGc
--HG--
extra : rebase_source : 36f9d47a4afd7c7113adf3f274656b694b8d0943
In the new architecture of Quantum DOM, all runnables need a name label.
So, we add the new string-label arg to Start function, and update all
callers.
MozReview-Commit-ID: G9LXFjtFcQv
--HG--
extra : rebase_source : a19b605013be56d01780c831d2a48ada8825b1c7
Since the ::cue div created by JS, it doesn't have the NODE_IS_NATIVE_ANONYMOUS flag.
We set the NODE_IS_NATIVE_ANONYMOUS when binding to domtree from the ::cue up to the RootOfAnonymousSubtree
so that GetClosestNonNativeAnonymousAncestor will return video element as style parent.
MozReview-Commit-ID: 3EiYOqnbY15
--HG--
extra : rebase_source : eedcd5948852c3405a719b9f3c3396ee009f7273
This seems like an existing bug. If the content specifies
attributeType="yer:opacity", we should not try to animate it as a CSS property.
This patch adds a namespace check before we try to animate as a CSS property.
MozReview-Commit-ID: 1LpBa23ddqX
--HG--
extra : rebase_source : c5a4edb4c48bfd6116e58d4ef3eb91384ee86bd5
In bug 1315874 we will create a method to check if we're likely to need to
resolve base styles or not, and for that we need to extract the check for
whether or not we're animating a CSS property.
MozReview-Commit-ID: 9Ybsi91fro8
--HG--
extra : rebase_source : e2f72a7d807bfbe026fbd1a603cd993c3d502584
nsSMILCompositor::mCachedBaseValue is an nsAutoPtr<nsSMILValue> that we allocate
on the heap. It looks like we did that back in bug 533291 presumably because it
makes transferring these cached values between nsSMILCompositor objects cheaper.
One drawback of this, however, is that mCachedBaseValue has two null states:
the mCachedBaseValue pointer can be null, and the pointed-to nsSMILValue can be
a null value (i.e. IsNull() returns true).
Now that we have move ctors and operators defined for nsSMILValue we can
transfer these objects between compositors cheaply without requiring the object
to be allocated as separate heap object. This patch makes mCachedBaseValue just
a regular nsSMILValue class member (i.e. drops the nsAutoPtr).
There's a subtle difference in behavior with regards to the first sample.
Previously we would compare the (initially) null mCachedBaseValue pointer with
the passed-in nsSMILValue and set mForceCompositing to true. With this patch,
however, we will only set mForceCompositing to true if the passed-in
mCachedBaseValue is not null.
I believe this is correct, however, since if we don't call GetBaseValue in
ComposeAttribute we should not be setting mForceCompositing to true (something
else should ensure that gets set to true), and if we do call GetBaseValue the
result should not be a null nsSMILValue (except in some OOM cases where we don't
really care if we miss a sample). This patch adds an assertion to check that
GetBaseValue does, in fact, return a non-null value. (I checked the code and
this appears to be the case. Even in error cases we typically return an empty
nsSMILValue of a non-null type. For example, the early return in
nsSMILCSSProperty::GetBaseValue() does this.)
MozReview-Commit-ID: BRJFa4xMdxz
--HG--
extra : rebase_source : f3e3ca1e01e73610523bde7583e2a002d2473184
We will add to these includes later in this patch series so we sort them now so
it's clear where to add to.
MozReview-Commit-ID: CgqlS3f62nu
--HG--
extra : rebase_source : 009e8de1961cfd3d0f9cd72061e2e8f254f03cad
Some interface tests into mochitest is failure on android beta and release.
test_serviceworker_interfaces.js has nonReleaseAndroid flag, so we should use it into test_interfaces.js and test_worker_interfaces.js
MozReview-Commit-ID: A1aHrTXwGil
--HG--
extra : rebase_source : 0990ec8a50b664ac711ee4977a104286f40ae07e
Before this change, if you did formatBlock on "a<span
contenteditable=false>b</span>c", it would become "acb", because the "a"
and "c" would be moved to the front of the node, and the "b" would be
left alone at the end because the editing code doesn't want to move it.
Now we will move the "b" as well, even though it's not editable, so that
the node remains "abc". The rule is that a non-editable element cannot
have its attributes or children changed, but it can have its parent
changed, so there's nothing wrong with moving it here.
On the way, I fixed an exception in insert*List if there was an
uneditable inline node around. I don't intend to fix all the todo's in
the test, but now it should have better coverage, at least.
MozReview-Commit-ID: 3okcGq4an3f
This patch only sets URI_IS_LOCAL_RESOURCE if the resource is a blob or
font table entry, to avoid having media streams treated as local
objects.
MozReview-Commit-ID: GOVr8FPByQy
There are scenarios where we have a TabParent in the UI process hooked up to
a PuppetWidget with a BasicLayerManager. Webextensions fall into this category.
In this scenario, the parent-side layer manager is not hooked up to
the compositor (that is, there is no entry in the CompositorBridge layer tree
state map for the layers id). However, the content-side still ends up creating
a ClientLayerManager or a WebRenderLayerManager, which expects the layers id to
be registered in the compositor. This results in brokenness (in the case of the
ClientLayerManager/PLayerTransaction) or crashes (in the case of WebRenderLayerManager/
PWebRenderBridge). Instead, this patch changes this scenario to have the content
process use a BasicLayerManager which seems safer.
MozReview-Commit-ID: 3f80aZrRrmD
--HG--
extra : rebase_source : 10ec78dd7daf1c1c889929f0d79e0b75675b4b05
Instead we can use the otherwise-unused function to check if initialization worked.
Technically, because of the way RenderFrame construction works, whether or not
initialization succeeds is exactly dependent on whether or not the frameloader is
non-null, so we could even just use that to check success. But this feels slightly
more readable/cleaner.
MozReview-Commit-ID: CGiIAA1h6V7
--HG--
extra : rebase_source : 2d4504f7d5fde3c394edca14fe01840c1738d197
We will obsolete StyleAnimationValue in the future, and can treat
AnimationValue as a wrapper of RawServoAnimationValue to hide the FFIs
at that moment. For now, we still need both types, so it's better to make sure
they are mutually exclusive in AnimationValue. Therefore, let's add some
assertions.
Besides, I think those FFIs might do many things and it seems those methods
are not critical, so let's move them into the cpp file, so we can remove
some dependencies to avoid re-compiling so many files if someone needs
revise ServoBindings.h.
MozReview-Commit-ID: FJ1uTvEQ7NT
--HG--
extra : rebase_source : 8ef99c659f2721c8425364051db19b66536bccc6
This changeset updates the handling of the variables based on
chunk.GetDuration() within the OpusTrackEncoder. This changeset alters places
where overflow could have taken place previously. It also adds asserts with
the dual purpose of defense and documentation for future developers.
MozReview-Commit-ID: 28vmAfE84ik
--HG--
extra : rebase_source : ebbd5f0d55c793324aec6b095dbe5403a7bf7b4c
extra : source : 21705a96856dc54a3330de9a55f19eef31badeec
For very long chunks, the opus encoder could run into issues with processing.
This changeset seeks to address that by using CheckedInt to prevent a potential
int overflow when encountering extremely long durations.
MozReview-Commit-ID: 7uLZAARLf5w
--HG--
extra : rebase_source : 9519ce2a9e171c2e56fa445699770ab84596cdad
extra : source : fdbc277dbcc49c3a6785bfefe4ba7d80e03817d2
This ensures that the IPC connection from the content process to the main
process is shut down as soon as possible. Once all the IPC connections are
closed, the main process removes its async shutdown blocker, and Firefox
can shutdown.
MozReview-Commit-ID: 8rqa384ayd9
--HG--
extra : rebase_source : b9cbbb9f4c22016284a8d49cddaea0d96666acf9
This ensures that when we've started shutdown we don't try to start up new
GMPs. Doing so would create more connections from the content process to the
main process, and the main process can't shutdown until all such connections
are shut down.
MozReview-Commit-ID: KE8nCoLXjdd
--HG--
extra : rebase_source : 674f3c4ddcb5bb93dd775a861b425d25510871e9
This will allow us to broadcast a notification to the GMPServices running in
the content processes when they need to shutdown.
MozReview-Commit-ID: FviFDgNMnUV
--HG--
extra : rebase_source : f4ad3c6df0e14c88db1199fbe6281d67f98590ae
SelectorCache::NotifyExpired() will be invoked by nsExpirationTracker::TimerCallback() from an unlabel runnable.
We adopt the change in nsExpirationTracker to provide a DocGroup EventTarget for the invocation of this callback.
--HG--
extra : rebase_source : 42626d5493efff4bc38fba418a4ac3a8b9ff6b6a
Supports creating a windowless browser on Linux without an X server. Most of the
changes are just adding branches to avoid calls in to GTK which calls
into X. Some of the bigger additions were adding a separate headless widget
which implements just enough to render a page. A headless look and
feel were also added since there are many calls into GTK in the platform
specific one.
Also implements :link, :visited, and :any-link more efficiently, and stops
matching :-moz-read-only in everything that is not read-write, which is kind of
dumb, and probably creates some artifacts.
MozReview-Commit-ID: 6BQqi7nAWdT
--HG--
extra : rebase_source : 39dc6b481b3a92942dc3732990d8b9040d8e6d84
This patch makes the size of inner windows will be automatically rounded for
either window.open() with window features or setting window size through
innerWidth/Height and outerWidth/Height when fingerprinting resistance is
enabled. If the given value is greater the maximum available rounded size, then
it will be set to the maximum value. Otherwise, the size will be set to the
nearest upper 200x100.
This patch also adds one helper function in nsContentUtils for calculating the
rounded window dimensions.
MozReview-Commit-ID: J2r3951vuNN
--HG--
extra : rebase_source : a44b19bdf2ce7e90fc831ddc2b85a86d594cb0c3
Necko computes this information in order to set the User-Agent header in
the parent process. This header is set on all outgoing requests, and
therefore in the content process we can easily copy the value of this
header from the document channel object instead of the inefficient sync
IPC that currently happens in order to access the JavaScript
implementation living in the parent process.
Since the media timeline is zero-based, 0 is a good value to indicate
no data is played at all.
MozReview-Commit-ID: BiKzSGtbyjn
--HG--
extra : rebase_source : 7abbed32038d2e1d6b49e25319152060802e5dac
extra : intermediate-source : a786a2069cbd9e46901d6d474b00965f1e75893d
extra : source : e4acffc8b3c8e8003e17e62793d50c627cef340e
This avoids loading 7 jsms until they are actually needed, reducing
content process memory usage.
MozReview-Commit-ID: 8ukNr7PL80A
--HG--
extra : rebase_source : a926a19645ffcacadec93ecc79927d356d603114
This changeset changes tests using ForgetAboutSite.removeDataFromDomain
to yield on it, since now it is a Task
MozReview-Commit-ID: 72OEYoO1avd
--HG--
extra : rebase_source : 9ea8cc06493c3e965d260dc9377461ff29fe572a
I have verified that this test fails without the fix from the previous patch.
MozReview-Commit-ID: Hx8D72nTb32
--HG--
extra : rebase_source : 48b53f86fbcf92db6a5d340d2348fe23003aab0f
This patch adds a test that when reverse throws an exception we don't report
anything to animation mutation observers. I have verified that this added test
fails without the early return added to Animation::Reverse() earlier in this
patch series.
MozReview-Commit-ID: 64yX4G7iaIt
--HG--
extra : rebase_source : 3f29335303c969a8e2ad5ac2c16aba276036b434
This function is only used in test_animation_observers_sync.html. Putting it in
another file makes test_animation_observers_sync.html harder to follow so until
we actually share it with other files we should be it in the one file.
MozReview-Commit-ID: DJXWH4wFWxZ
--HG--
extra : rebase_source : cf5c93f0bee5b03862ad9162c55e1df97b875a6d
As part of this patch series I'd like to add an animation observer test.
However, the current arrangement of test files is quite confusing. We have:
test_animation_observers.html - Tests that run async only
test_observers_for_sync_api.html - Tests that can be run synchronously
It's not at all obvious that these are related or that one is related to the
other. In this patch we rename the files so that their relationship is more
obvious. In a subsequent patch we'll add comments to further clarify the
distinction.
MozReview-Commit-ID: CSYL8wruWdK
--HG--
rename : dom/animation/test/chrome/test_animation_observers.html => dom/animation/test/chrome/test_animation_observers_async.html
rename : dom/animation/test/chrome/test_observers_for_sync_api.html => dom/animation/test/chrome/test_animation_observers_sync.html
extra : rebase_source : a8bfde42b9996f172f090e95970e355106757d8a
Spec (being written): https://github.com/WebAudio/web-audio-api/issues/1139
Bug 1343550 - Prevent touching promises when shutting down an AudioContext, when the global is going away soon. r=baku
MozReview-Commit-ID: F6en9KEbNNf
--HG--
extra : rebase_source : 04076caa38bba980cdff776b5997f33e24516d9e
extra : intermediate-source : 4f2cd3f715a218dc3bca55e89720b6aa1040d35c
extra : source : 69cd9c72bd4ed419e3f7f7b5ab64ee0fa8bd89a2