Граф коммитов

3114 Коммитов

Автор SHA1 Сообщение Дата
Jeff Muizelaar 4bb17dde09 Bug 1450015. Enable blob invalidation by default. r=gankro 2018-04-17 21:20:51 -04:00
Andrew Osmond bb48e74870 Bug 1445479 - Ensure we teardown requests on image cache validation failure paths. r=tnikkel
If an imgCacheValidator object is destroyed without calling
imgCacheValidator::OnStartRequest, or imgRequest::Init fails in
OnStartRequest, we left the bound proxies hanging on an update. Now we
cancel the new request, and bind the validating proxies to said request
to ensure their listeners fail gracefully.
2018-04-17 14:42:35 -04:00
Cosmin Sabou 6c47714197 Backed out 2 changesets (bug 1444537) for causing crashes on test_discardFramesAnimatedImage.html. a=backout
Backed out changeset 0d23d74448c8 (bug 1444537)
Backed out changeset 07f5d48b90cb (bug 1444537)
2018-04-15 02:40:30 +03:00
Andrew Osmond 25213cc7ab Bug 1444537 - Part 4. Add gtests for AnimatedFrameBuffer for redecode errors. r=tnikkel 2018-04-13 10:58:54 -04:00
Andrew Osmond 2e06ac3032 Bug 1444537 - Part 3. Fix how redecode errors could cause animated image state inconsistencies. r=tnikkel
We can discard frames from an animated image if the memory footprint
exceeds the threshold. This will cause us to redecode frames on demand
instead. However decoders can fail to produce the same results on
subsequent runs due to differences in memory pressure, etc. If this
happens our state can get inconsistent. In particular, if we keep
failing on the first frame, we end up in an infinite loop on the decoder
thread.

Since we don't have the owning image to signal, as we had to release our
reference to it after the first pass, we can do little but stop decoding.
From the user's perspective, the animation will come to a stop.
2018-04-13 10:58:52 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Ciure Andrei 3f4a118829 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-04-11 12:00:35 +03:00
Kartikaya Gupta 0f89486f32 Bug 1452658 - Mark many reftests as fuzzy instead of failing for windows-qr. r=jrmuizel
MozReview-Commit-ID: BDvtV6trKkK

--HG--
extra : rebase_source : 0591564f6cea5c782de6baecc24c3defcef0c4fb
2018-04-10 17:48:16 -04:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Kartikaya Gupta 9a9c13a09f Bug 1344350 - Mark reftests failing with webrender on windows. r=jrmuizel
Many of these could probably be fuzzed but in the interests of getting
the reftest suite turned on sooner I'm doing a blanket fails-if. This
covers all the reftests where there is more fuzz with webrender on
windows than any of existing annotations account for. In some cases the
fuzz is only a few pixels more than the equivalent Linux fuzz already
annotated, but I'll clean that up in a future bug.

MozReview-Commit-ID: IaKarbnL46d

--HG--
extra : rebase_source : 71889340305b0b12fa8eace722e42bb3faf14419
2018-04-06 11:58:43 -04:00
Emilio Cobos Álvarez 3c69ce8551 Bug 1451405: Notify debug-only image observers off a script-runner. r=bz
MozReview-Commit-ID: ARn8d2Rxp13
2018-04-05 11:45:40 +02:00
Christoph Kerschbaumer a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Tom Ritter 449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Xidorn Quan 1962625a79 Bug 1448728 part 1 - Make popular headers not include nsWindowSizes.h. r=njn
MozReview-Commit-ID: EC5J9Im3gfu

--HG--
extra : source : 9fa9209aeeb00009143c5c21f21210c93184e61f
2018-03-28 10:44:49 +11:00
Andrew Osmond c3618a0b1b Bug 1444537 - Part 2. Shutting down the decode pool should make animated decoders bail early. r=tnikkel
When we shutdown the decode pool threads, it does not do a simple join
with the main thread. It will actually process the main thread event
loop, which can cause a bad series of events. The refresh tick could
still be running and advancing our animated images, causing the animated
decoders to continue running, which in turn prevents the decoder threads
from finishing shutting down, and the main thread from joining them.

Now we check on each frame whether or not the decoder should just stop
decoding more frames because the decode pool has started shutdown. If it
has, it will stop immediately.
2018-03-27 10:57:01 -04:00
Andrew Osmond a21bbb89ce Bug 1444537 - Part 1. Ensure discarding of animated image frames is clear. r=tnikkel
We should only attempt to discard animation image frames after passing
the frame threshold on the very first pass on the animation. Redecodes
are already in the correct state, as it will discard frames as it
advances the animation. This patch makes it clear what it should be
doing when, but there should be no functional change.
2018-03-27 10:56:48 -04:00
Andrew Osmond 3e285b7bbc Bug 1409440. r=tnikkel 2018-03-27 09:01:14 -04:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Valentin Gosu eccc344c51 Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: LonNnZyJjVO

--HG--
extra : rebase_source : ceefc81a669b17f68f193fce5f172f9f2268a998
2018-03-20 23:23:31 +01:00
Emilio Cobos Álvarez 48957d62c0 Bug 1446954: Cleanup !stylo and styloVsGecko test expectations. r=xidorn
MozReview-Commit-ID: J2glxiCWBVn
2018-03-20 11:29:51 +01:00
Emilio Cobos Álvarez 3d911916c0 Bug 1446954: Remove ImageCacheKey styloToGecko hack. r=xidorn
MozReview-Commit-ID: LiHH5T4XlnI
2018-03-20 11:29:42 +01:00
Valentin Gosu af5eeff2e3 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 01c8d16f7d31977eda6ca061e7889cedbf6940c2
2018-03-19 20:22:32 +01:00
Andreea Pavel e5950c0d39 Backed out 2 changesets (bug 1442239) for xpcshell failures at widget/tests/unit/test_taskbar_jumplistitems.js on a CLOSED TREE
Backed out changeset 513cd669aca1 (bug 1442239)
Backed out changeset aef4c73f736f (bug 1442239)
2018-03-19 21:19:26 +02:00
Valentin Gosu f0c7a1ae13 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 8ebb459445cab23288a6c4c86e4e00c6ee611e34
2018-03-08 13:35:10 +01:00
Andrew Osmond 4986917db0 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-14 14:19:13 -04:00
Andrew Osmond c887fd120c Backed out changeset 7f0409a405f2 (bug 1435291). 2018-03-13 16:03:59 -04:00
Andrew Osmond 785d1f4d18 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-13 15:59:05 -04:00
Lee Salzman d3709cc4e9 Bug 1444506 - part 6 - fuzz for Skia m66 update. r=jrmuizel 2018-03-12 16:37:10 -04:00
Timothy Nikkel 848546ef41 Bug 1443232. Fix test.
Convert it from reftest to crashtest (we never needed it to be a reftest).
2018-03-09 15:27:25 -06:00
Timothy Nikkel 7fee1119c7 Bug 1443232. Disable reftest for now to investigate why it doesn't work on android.
Seems to be a test problem, not a problem with the patch.
2018-03-08 21:10:04 -06:00
Timothy Nikkel 7d6982559e Bug 1443232. Don't insert frames into our AnimationFrameBuffer that we consider in error and unusable. r=aosmond
After decoding the first frame we allocate the second frame, but before it finishes we encounter an error, Decoder::PostError is called it aborts the second frame and decrements the frame count. But AnimationSurfaceProvider::CheckForFrameAtTerminalState just asks for the current frame ref from the decoder (which it never cleared) and inserts that.

The condition that we use from the decoder to decide to report a new frame is mFinishedNewFrame (via TakeCompleteFrameCount), however this doesn't directly correspond to mFrameCount. So we create a new bool on the Decoder to track when there is a frame that we can take.

This didn't cause any problems before but now we have tighter coupling between the list of frames the AnimationSurfaceProvider has and what FrameAnimator expects.

Another possible fix would be to clear the current frame ref in PostError, but the only place we clear the current frame is when we allocate the new frame and we have the mImageData pointer still around that decoders could theorhetically use to do final processing on the last partial frame.
2018-03-08 17:33:04 -06:00
Nathan Froyd 87bc1e3aa8 Bug 1443932 - part 2 - lower the default stack size for image decoder threads; r=tnikkel
These threads should not have deep stacks, and as we can have a number
of them running simultaneously, it's beneficial to set the stack size to
something reasonably low.
2018-03-07 20:33:17 -05:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell 262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Valentin Gosu 34872b6d20 Bug 1441688 - Remove nsIIPCSerializableURI.Deserialize r=mayhemer
MozReview-Commit-ID: 8gwX3vSKWNX

--HG--
extra : rebase_source : a2c21a7e66aa8be3c2e345ca64feea967b380491
2018-03-05 04:14:44 +01:00
Valentin Gosu f102a081b2 Bug 1434163 - Make all nsIURI attributes readonly r=mayhemer
MozReview-Commit-ID: KtjO8VWjPF5

--HG--
extra : rebase_source : 061a6db73e36b3a0b3732d44379bbc10e8268f9a
2018-02-27 00:07:48 +01:00
Andrew Osmond bd5718ece1 Bug 1442037 - Fix an incorrect assert in DecoderFactory::CloneAnimationDecoder. r=tnikkel
When cloning an animated image decoder, we asserted that
Decoder::HasAnimation was true. This is incorrect because if the decoder
has yet to complete the metadata decoding, or it has but only finds out
the image is animated when it discovers the second frame, then we will
try to clone a valid animated image decoder, but fail the assertion.
Instead, this patch verifies the image type supports animations.
2018-03-01 19:38:58 -05:00
Andrew Osmond fefdf99992 Bug 523950 - Part 10. Add mochitest for when we discard frames from an animated image. r=tnikkel
With the previous parts, for large animated images, we will now discard
previous frames after we reach the threshold. This mochitest configures
a very low threshold, such that it will trigger on a small animated
image. It then verifies that we are already to loop the animation a
couple of times.
2018-02-28 13:34:53 -05:00
Andrew Osmond 39b30d06d4 Bug 523950 - Part 9. Integrate AnimationSurfaceProvider with AnimationFrameBuffer. r=tnikkel 2018-02-28 13:34:53 -05:00
Andrew Osmond 01f0dbdb83 Bug 523950 - Part 8. Add gtests for AnimationFrameBuffer. r=tnikkel 2018-02-28 13:34:52 -05:00
Andrew Osmond 984f23cd9c Bug 523950 - Part 7. Add AnimatedFrameBuffer to manage storage and decoding of frames in an animation. r=tnikkel 2018-02-28 13:34:52 -05:00
Andrew Osmond 97d3a61a18 Bug 523950 - Part 6. Add DecoderFactory::CloneAnimationDecoder to clone an existing image decoder. r=tnikkel
Used later in the patch series, this API allows one to get an identical
decoder to the one given, but decodes from the beginning.
2018-02-28 13:34:52 -05:00
Andrew Osmond 54898d5d6c Bug 523950 - Part 5. Pass the currently displayed frame of an animation to its decoder. r=tnikkel
When we need to recreate an animated image decoder because it was
discarded, the animation may have progressed beyond the first frame.
Given that later in the patch series we need FrameAnimator to be driving
the decoding more actively, it simplifies its role by making it assume
the initial state of the decoder matches its initial state. Passing in
the currently displayed frame allows the decoder to advance its frame
buffer (and potentially discard unnecessary frames), such that when the
animation actually wants to advance as it normally would, the decoder
state matches what it would have been if it had never been discarded.
2018-02-28 13:34:52 -05:00
Andrew Osmond 646219b1e7 Bug 523950 - Part 4. Expose new surface provider APIs that will help drive animation decoding. r=tnikkel
Note that AnimationSurfaceProvider will override these methods to give a
proper implementation in a later patch in this series. For now, they are
mostly stubbed, using the default implementation from ISurfaceProvider.

They focus on the main operations we perform on an animation:

1) Progressing through the animation, e.g. advancing a frame. If we
don't decode the whole animation up front, we need to know at the
decoder level where we are in the display of the animation.

2) Restarting an animation from the beginning. This is a specialized
case of the above, where we want to skip explicitly advancing through
the remaining frames and instead restart at the beginning. The decoder
may have already discarded the earliest frames and must start redecoding
them.

3) Knowing whether or not the decoder is still active, e.g. can we be
missing frames.
2018-02-28 13:34:52 -05:00
Andrew Osmond 28978c4f66 Bug 523950 - Part 2. Expose image decoder type and SourceBuffer to owners. r=tnikkel
Later in the patch series, we use the new APIs to facilitate cloning of
an existing decoder. This is useful when you want to redecode the same
image with the exact same configuration but from the very beginning.
2018-02-28 13:34:52 -05:00
Andrew Osmond 1a18b79e50 Bug 523950 - Part 1. Do some unified build accounting, missing headers and namespaces. r=tnikkel 2018-02-28 13:34:51 -05:00
Florian Quèze 6df7549a3e Bug 1433175 - semi-automated indent fix, r=Mossop. 2018-02-28 18:51:34 +01:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Nathan Froyd b5d5605a54 Bug 1441584 - part 2 - declare some URI classes final; r=valentin 2018-02-27 20:13:57 -05:00