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

3076 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 277247123d Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
Andrew Osmond ba1e1bbaef Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
Andrew Osmond 186b24b666 Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel
When SurfaceCache::Lookup is called to access surface data, it indicates
that the caller will not accept substitutes as in the case of
SurfaceCache::LookupBestMatch. As such, we need to be careful not to
remove those surfaces from our cache when pruning (in part 8b). This is
the marker used to track that, at some point, there was a caller which
got this surface that would accept no other (e.g. factor of 2 mode must
make an accept for this particular surface).
2017-09-05 07:58:45 -04:00
Andrew Osmond ee46542020 Bug 1370412 - Part 7. ImageSurfaceCache::Lookup should enter factor of 2 mode on cache misses. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond dedad4d54f Bug 1370412 - Part 6. ImageSurfaceCache::LookupBestMatch should enter factor of 2 mode on cache misses. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond 7dae87727c Bug 1370412 - Part 5. Add ImageSurfaceCache factor of 2 mode size calculations. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond 403e25501d Bug 1370412 - Part 4. Add ImageSurfaceCache::MaybeSetFactor2Mode and state. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond dc7109aa94 Bug 1370412 - Part 3. Break out ImageSurfaceCache::CompareArea from LookupBestMatch for reuse. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond caf9b84aa6 Bug 1370412 - Part 2. Give image::LookupResult an optional preferred size to decode at when the surface is not found. r=tnikkel 2017-09-05 07:58:45 -04:00
Andrew Osmond 480d81cc52 Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
Emilio Cobos Álvarez 6b100f997c Bug 1384232: Same for test_xultree_animation.xhtml. r=me
MozReview-Commit-ID: HFo0aFXezzF
2017-09-01 15:35:01 +02:00
Andrew Osmond 2c86b9676b Bug 1391430 - Force heap allocated surfaces for image decoding to use an unaligned stride. r=tnikkel
In bug 1383499 we fixed the case where on Android, animated images could
consume all of the available file handles. This is because each volatile
buffer will contain a file handle on Android, and animated images can
contain many, many frames. However in doing so we introduced a bug where
the stride of replacement surface was aligned to a 16-byte boundary. We
do not currently support any stride value but pixel size * image width
in the image decoding framework. This may be something we correct in the
future but for now, we should just ensure all surfaces follow the
expected stride value.
2017-08-31 06:38:55 -04:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Nicholas Nethercote 092af8e0a1 Bug 1390428 (part 5) - Remove more nsXPIDLCString uses. r=erahm.
These are all simple cases, with similarities to previous patches in this
series.

--HG--
extra : rebase_source : 6ef36382df9fef217d5cb737e218d65ac062f90a
2017-08-16 14:07:18 +10:00
Joel Maher a322883818 Bug 1370784 - Disable image/test/mochitest/test_animSVGImage.html on windows. r=me a=testonly 2017-08-22 14:21:44 -04:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Ryan VanderMeulen 24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Nicholas Nethercote 5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10:00
Kevin Hsieh 2ab70861b6 Bug 1325080 - Synchronously decode image metadata for data URIs. r=tnikkel
MozReview-Commit-ID: IPrP3EepQ6a
2017-08-16 19:04:20 -07:00
Daniel Holbert b6c8e1e084 Backed out changeset 393eadbb146f (bug 1325080) for causing a talos regression.
MozReview-Commit-ID: E0SE51ZWru5
2017-08-17 09:46:16 -07:00
Andrew Osmond 539ab65d03 Bug 1383499 - Animated PNGs should allocate after-first frames on the heap instead of as volatile buffers on Android. r=tnikkel
Animated image frames are never actually released to let the OS purge
them, because AnimationSurfaceProvider keeps them as RawAccessFrameRef.
Meanwhile, each volatile buffer on Android needs a file handle to be
retained for as long as the buffer lives. Given sufficient number of
animated image frames, we could easily exhaust the available file
handles (which in turn causes many problems). As such on Android we
should stick with the heap for animated image frames. On other platforms
it is better to stay because we will avoid a memset, because the OS will
zero-fill the requested pages on our behalf.
2017-08-16 08:57:40 -04:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Wes Kocher be24aec8e9 Merge m-c to inbound a=merge
MozReview-Commit-ID: JqsSD85rE4W
2017-08-15 19:15:22 -07:00
Wes Kocher 7921644d1b Merge inbound to central, a=merge
MozReview-Commit-ID: 1DadhJTLBXN
2017-08-15 19:02:51 -07:00
Andrew Osmond 2aac283f14 Bug 1389479 - Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel 2017-08-15 15:02:14 -04:00
Andrew Osmond 5360de90d7 Bug 1389479 - Part 2. Make the SurfaceCache free ImageSurfaceCache objects outside of the lock. r=tnikkel 2017-08-15 15:02:14 -04:00
Mike Hommey 60432eb34f Bug 1390704 - Skip 694165-1.xhtml crashtest on stylo debug. r=bholley
--HG--
extra : rebase_source : cad1d36159767362c646f3a8ed05ae7568c5d1eb
2017-08-16 12:54:04 +09:00
Andrew Osmond 6be360ba2c Bug 1388590 - StreamingLexer::Clone should bail if SourceBufferIterator::Advance returns not ready. r=tnikkel
StreamingLexer::Clone should always succeed because we are merely
creating a new SourceBufferIterator which is at the same position as the
given iterator. However it is possible if there is no more data after,
the current position, it could return COMPLETE instead of READY.

This should not happen during the first Advance loop however. We handle
the failure gracefully now, and if someone files a report with the
invalid ICO file causing this problem, then we can investigate further.
2017-08-15 17:44:03 -04:00
Carsten "Tomcat" Book a6ae5910bb Merge mozilla-central to autoland 2017-08-15 13:12:22 +02:00
Carsten "Tomcat" Book 6b36e00b7c merge mozilla-inbound to mozilla-central a=merge 2017-08-15 11:42:11 +02:00
Kevin Hsieh d113ce52dc Bug 1325080 - Always synchronously decode image size. r=tnikkel
MozReview-Commit-ID: LYNLjwy1kAy

--HG--
extra : rebase_source : 7d5d4b4f90efb4cb461828e3222e948f70a9d1fe
2017-08-07 13:54:11 -07:00
Jan Beich d525be7d2f Bug 1389733 - Add missing Skia compile guards. r=lsalzman
MozReview-Commit-ID: BXYxGjj0j73

--HG--
extra : rebase_source : dc54b6f513468879a2aeb8f298f1b920572c6402
2017-08-12 04:31:21 +00:00
Milan Sreckovic 5c01b5706c Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond
MozReview-Commit-ID: 8gyxxLziVe7

--HG--
extra : rebase_source : c79e81e10c54106645539c590bf81a03a300a909
2017-08-14 08:29:56 -04:00
Andrew Osmond 1cdcc57ee2 Bug 1390109 - Gracefully propogate ImageSurfaceCache::Insert OOM failures to SurfaceCache::Insert. r=tnikkel 2017-08-14 21:35:43 -04:00
Wes Kocher 7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Andrew Osmond 5fd7930ced Bug 1382664 - RasterImage::OnSurfaceDiscarded should dispatch with ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 20:26:40 -04:00
Andrew Osmond 358b89b79c Bug 1382662 - ImageResource::SendOnUnlockedDraw should dispatch using ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 20:24:55 -04:00
Andrew Osmond 904a5bf8ca Bug 1351869 - Part 2. Make imgCacheExpirationTracker use the system group for its expiration events. r=tnikkel 2017-08-14 20:23:16 -04:00
Andrew Osmond 20dd87011b Bug 1351869 - Part 1. Make SurfaceCache using the system group for its expiration events. r=tnikkel 2017-08-14 20:23:09 -04:00
Andrew Osmond 444c3a179f Bug 1378488 - Part 2. imgRequest::Cancel should dispatch using ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 16:59:58 -04:00
Andrew Osmond 3afc88f6f9 Bug 1378488 - Part 1. imgRequest::FinishPreparingForNewPart should dispatch using ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 16:59:58 -04:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Nicholas Nethercote 764c284800 Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8.
This makes it clear they are never null.

MozReview-Commit-ID: H4i8uqZs48H

--HG--
extra : rebase_source : c7ada64881f015c68eaee2fbfad901f806cab833
2017-08-10 14:13:22 +10:00
Andrew Osmond da707462b6 Bug 1382658 - imgRequestProxy::DoRemoveFromLoadGroup and imgCancelRunnable should be dispatched on labelled group if possible. r=tnikkel 2017-08-15 07:14:51 -04:00
Wes Kocher 936a9461f6 Merge inbound to m-c a=merge
MozReview-Commit-ID: KRQeIGmhAPA
2017-08-10 18:14:34 -07:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Masatoshi Kimura 6815cee2bd Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel
MozReview-Commit-ID: GZBYTPanHH6

--HG--
extra : rebase_source : f6ccc1a661533f7bdba8bb33bc9a85855b51ffae
2017-08-06 10:54:14 +09:00
Andrew Osmond b15e213fc9 Bug 1388733 - Ensure animations resume when the image surfaces are discarded while still decoding. r=tnikkel
When an animated image has been discarded, we avoided marking the
composited frame invalid unless it had been previously decoded. Most of
the time this was fine, but if the animated image was still decoding for
the first time, then we still had a composited frame lingering that we
did not mark as invalid. As a result, when we called
RasterImage::LookupFrame (and indirectly
FrameAnimator::GetCompositedFrame), it would always return the
composited frame. This meant that RasterImage::Decode would never be
called to trigger a redecode. At the same time,
FrameAnimator::RequestRefresh would not cause us to advance the frame
because the state was still discarded.

With this patch we separate out the concepts of "has ever requested to
be decoded" and "has ever completed decoding." The former is now used to
control whether or not a composited frame is marked as invalid after we
discover we currently have no surface for the animation -- this solves
the animation remaining frozen as we now request the redecode as
expected. The latter remains used to determine if we actually know the
total number of frames.
2017-08-09 22:26:55 -04:00
Xidorn Quan 58e5987209 Bug 1383992 part 1 - Disable failing mochitests. r=heycam
MozReview-Commit-ID: J9LoovJJJgM

--HG--
extra : rebase_source : a5ed4b2a11c293c50d642c3a0da6831ce5a885a1
extra : source : 8d97565b7dedaef3b46e65b92b1ca1e0598d2a76
extra : histedit_source : 72834d0bc485e78cb8c1de357e4b545d7e6408f5
2017-08-09 08:31:26 +10:00
Ryan VanderMeulen 6eb7aef00e Merge m-c to autoland. a=merge 2017-08-09 18:51:26 -04:00
KuoE0 e418f1ccf5 Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam
MozReview-Commit-ID: 7cyXheHQ7Ot

--HG--
extra : rebase_source : 4a92de63228cb2a138d95d8f366b39122dbdc05e
2017-07-24 11:51:20 +08:00
Valentin Gosu 7520c99a2c Bug 1380617 - Add nsIURI.displayPrePath r=mcmanus,Gijs
- Use displayPrePath in the pageInfo permissions that shows "Permissions for:"
- The extra displayPrePath method is necessary because it's difficult to compute it manually, as opposed to not having a displaySpecWithoutRef - as it's easy to get that by truncating displaySpec at the first '#' symbol.

MozReview-Commit-ID: 9RM5kQ2OqfC
2017-08-09 17:43:58 +02:00
Andrew Osmond 42e6712830 Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel
A default constructed SurfacePipe contains a NullSurfaceSink as its
filter in mHead. This filter does nothing and is merely a placeholder.
Since most SurfacePipe objects are constructed with the default
constructor, and NullSurfaceSink has no (modified) state, we use a
singleton to represent it. Normally the SurfacePipe owns its filter, so
it needs to do a special check for NullSurfaceSink to ensure it doesn't
free it explicitly.

A Decoder object contains a default constructed SurfacePipe until it
needs to create the first frame from an image. This is a very brief
window because it does not take very long or much data to get to this
stage of decoding.

The NullSurfaceSink singleton is freed upon shutdown, however some
ISurfaceProvider objects may be lingering after this. If their Decoder
has yet to create the first frame, that means the SurfacePipe actually
contains a dangling pointer to the already freed singleton. To make
things worse, it actually tried to free the filter because it didn't
match the singleton (it got freed!).

As such, this change removes NullSurfaceSink entirely. We never use the
SurfacePipe before initializing it with a proper filter, and it would be
considered a programming error to do so. Instead let SurfacePipe::mHead
be null, and assert that it is not null when any operations are
performed on the SurfacePipe.
2017-08-09 06:54:55 -04:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Masatoshi Kimura 8ed4a80a4e Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu
nsIURI.originCharset had two use cases:
 1) Dealing with the spec-incompliant feature of escapes in the hash
    (reference) part of the URL.
 2) For UI display of non-UTF-8 URLs.

For hash part handling, we use the document charset instead. For pretty
display of query strings on legacy-encoded pages, we no longer care to them
(see bug 817374 comment 18).

Also, the URL Standard has no concept of "origin charset". This patch
removes nsIURI.originCharset for reducing complexity and spec compliance.

MozReview-Commit-ID: 3tHd0VCWSqF

--HG--
extra : rebase_source : b2caa01f75e5dd26078a7679fd7caa319a65af14
2017-08-02 20:43:30 +09:00
Johann Hofmann 4ac05f9ead Bug 1386439 - Record image-drawing in RasterImage::GetImageContainer and RasterImage::GetFrameAtSize for browser_image_startup.js. r=tnikkel
MozReview-Commit-ID: 1JDWyx8toTB

--HG--
extra : rebase_source : 32659556571acb887f85b922731489f91fcd9075
2017-08-02 00:08:02 +02:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Andrew Osmond 9bc359ef2c Bug 1385409 - Ignore ICO resource entries which contain little or no data. r=tnikkel 2017-08-01 07:21:14 -04:00
Andrew Osmond 9ea902f3c5 Bug 1383404 - Part 4. imgTools::DecodeImage should set the source size hint to optimize the allocation. r=tnikkel 2017-08-01 06:59:12 -04:00
Andrew Osmond af89f9b9b6 Bug 1383404 - Part 3. SourceBuffer::mChunks should be an AutoTArray instead of FallibleTArray. r=tnikkel
We should use AutoTArray instead because telemetry shows that the vast
majority of images loaded (95%+) contain only a single chunk when
decoding finishes. Even if part 2 of this bug increases the number of
images loaded with multiple chunks, we still call SourceBuffer::Compact
after the decode is complete, which typically will reduce the number of
chunks to 1 (unless memory is very low and we fail to consolidate the
chunks). Thus it should be rare to contain more than 1 chunk on
anything but a temporary basis, and we can easily save the malloc
overhead.

Note that SourceBuffer::AppendChunk still uses the fallible variant of
nsTArray::AppendElement.
2017-08-01 06:59:11 -04:00
Andrew Osmond f072d8f9e8 Bug 1383404 - Part 2. When SourceBuffer::ExpectLength creates the initial buffer, it should not round up. r=tnikkel
Currently SourceBuffer::ExpectLength will allocate a buffer which is a
multiple of MIN_CHUNK_CAPACITY (4096) bytes, no matter what the expected
size is. While it is true that HTTP servers can lie, and that we need to
handle that for legacy purposes, it is more likely the HTTP servers are
telling the truth when it comes to the content length. Additionally
images sourced from other locations, such as the file system or data
URIs, are always going to have the correct size information (barring a
bug elsewhere in the file system or our code). We should be able to
trust the size given as a good first guess.

While overallocating in general is a waste of memory,
SourceBuffer::Compact causes a far worse problem. After we have written
all of the data, and there are no active readers, we attempt to shrink
the allocated buffer(s) into a single contiguous chunk of the exact
length that we need (e.g. N allocations to 1, or 1 oversized allocation
to 1 perfect). Since we almost always overallocate, that means we almost
always trigger the logic in SourceBuffer::Compact to reallocate the data
into a properly sized buffer. If we had simply trusted the expected size
in the first place, we could have avoided this situation for the
majority of images.

In the case that we really do get the wrong size, then we will allocate
additional chunks which are multiples of MIN_CHUNK_CAPACITY bytes to fit
the data. At most, this will increase the number of discrete allocations
by 1, and trigger SourceBuffer::Compact to consolidate at the end. Since
we are almost always doing that before, and now we rarely do, this is a
significant win.
2017-08-01 06:59:11 -04:00
Andrew Osmond e0e5004eb0 Bug 1383404 - Part 1. SourceBuffer::Compact should use realloc to grow the first chunk to try to avoid a copy. r=tnikkel
SourceBuffer::Compact attempts to consolidate multiple, discrete
allocations into a single buffer, as well as trim excess capacity from a
singular allocation if we set aside too much. Using realloc lets
jemalloc (or whatever heap implementation we have) decide which is
better -- growing the existing buffer if there is sufficient free memory
contiguous with the first chunk, or allocating a new buffer entirely.
Since we were going to copy regardless, this should result either in an
improvement or the status quo. Brief empirical testing on Linux suggests
somewhere from 1/3 to 1/2 of allocations resulted in reusing the same
data pointer (and presumably avoided a copy as a result). This also has
the advantage of potentially reducing OOM errors, as it may have enough
room to satisfy an expansion, but not an entirely new buffer.
2017-08-01 06:59:11 -04:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Nicholas Nethercote 200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Andrew Osmond 16a218837a Bug 1383579 - SourceBufferIterator::SetWaiting should not assert for spurious wakeups if no consumer was given. r=tnikkel
The ICO decoder creates a cloned SourceBufferIterator for its own
SourceBuffer bounded by the resource size. This iterator is used by the
child decoder (PNG, BMP) for decoding the actual image. However we rely
upon the ICO decoder and its iterator to drive event loop, rather than
the child decoder and the cloned iterator. The cloned iterator knows how
many bytes it requires, but it is problematic to give it a consumer to
tell us when to resume without changes to StreamingLexer.

Without a consumer (IResumable), we won't have anything to notify when
we get the appropriate amount of data for the caller. If the caller
tries to advance after some, unknown amount of data has been written to
the SourceBuffer, then it may need to go back to waiting. Thus it should
only assert for a spurious wakeup if we have an actual consumer.
2017-07-27 21:18:17 -04:00
Honza Bambas eafe13d61a Bug 1381048 - Add few object tracking logs to imagelib. r=tnikkel 2017-07-25 11:14:00 -04:00
Andrew Osmond 1c78f9203b Bug 1315554 - Part 10b. Force CMS output profile to be sRGB for gtests. r=me
Thus far gtests have only tested fairly simple images which already
render the same on all platforms (e.g. solid green 100x100 square).
If we want to test more complicated images consistently across
platforms, we need to ensure the color adjustments we perform are
also consistent. Using the pref gfx.color_management.force_srgb to
force an sRGB CMS profile makes us consistent with the reftests and
mochitests.

However an additional quirk of the gtests is that we own the main
thread and we never check our event queue to see if anything is
pending. Depending on the initialization order of our graphics
dependencies, it may or may not have created pending runnables to
process the pref change. As such, we need to change the pref,
initialize imagelib/gfx and then check for, and if present execute,
any necessary runnables. Only then can we be sure that our desired
CMS profile is applied.
2017-07-22 07:50:32 -04:00
Andrew Osmond 3155630a3f Bug 1315554 - Part 10a. Add large embedded PNG/BMP ICO tests. r=me 2017-07-22 07:50:32 -04:00
Andrew Osmond cd5abe3e4e Bug 1315554 - Part 9. Get the ICO size from the resource instead of the dir entry if unspecified. r=tnikkel 2017-07-22 07:50:32 -04:00
Andrew Osmond d400495cf1 Bug 1315554 - Part 8. Allow DecoderFactory::CreateDecoderForICOResource to create metadata decoders. r=tnikkel 2017-07-22 07:50:32 -04:00
Andrew Osmond 99d43905e2 Bug 1315554 - Part 7. Remove unnecessary buffering of BMP header in ICO decoder. r=tnikkel 2017-07-22 07:50:32 -04:00
Andrew Osmond a162fde8c7 Bug 1315554 - Part 6. Reuse the same SourceBuffer when decoding a resource within an ICO. r=tnikkel 2017-07-22 07:50:31 -04:00
Andrew Osmond 6d97dbaa41 Bug 1315554 - Part 5. Add method to clone a SourceBufferIterator when decoding. r=tnikkel 2017-07-22 07:50:31 -04:00
Andrew Osmond 35f9b857b0 Bug 1315554 - Part 4. Combine nsICODecoder::ReadBMP and ::ReadPNG. r=tnikkel 2017-07-22 07:50:31 -04:00
Andrew Osmond 93efb56fbf Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 07:50:31 -04:00
Andrew Osmond e5537d8caf Bug 1315554 - Part 2. The BMP decoder should be responsible for adjusting its size when embedded inside an ICO. r=tnikkel 2017-07-22 07:50:31 -04:00
Andrew Osmond ac14e4f8f5 Bug 1315554 - Part 1. Enforce the parent decoder size (ICO) for child decoders (BMP, PNG). r=tnikkel 2017-07-22 07:50:31 -04:00
Sebastian Hengst cc27374338 Backed out changeset fd310390a64a (bug 1315554) for failing GTest's ImageDecoders.LargeICOWithPNGSingleChunk on OS X opt. r=backout 2017-07-22 11:05:35 +02:00
Sebastian Hengst b33e39c76b Backed out changeset e1eec63b920f (bug 1315554) 2017-07-22 11:04:22 +02:00
Sebastian Hengst 7197a59a77 Backed out changeset 9780a01b3e94 (bug 1315554) 2017-07-22 11:04:17 +02:00
Sebastian Hengst 501b9eab08 Backed out changeset e67f6df41836 (bug 1315554) 2017-07-22 11:04:12 +02:00
Sebastian Hengst c8ba1dd256 Backed out changeset 6fa3ad97ce9c (bug 1315554) 2017-07-22 11:04:07 +02:00
Sebastian Hengst b2ef50b2fe Backed out changeset e39309b6fe7f (bug 1315554) 2017-07-22 11:04:02 +02:00
Sebastian Hengst 767a09b296 Backed out changeset dbae61d1cbee (bug 1315554) 2017-07-22 11:03:57 +02:00
Sebastian Hengst 5981e481e8 Backed out changeset d46b7e02802c (bug 1315554) 2017-07-22 11:03:52 +02:00
Sebastian Hengst 8604a9cc71 Backed out changeset 18614b05270d (bug 1315554) 2017-07-22 11:03:46 +02:00
Sebastian Hengst d4bb320357 Backed out changeset abc949687bdc (bug 1315554) 2017-07-22 11:03:41 +02:00
Andrew Osmond 8202116fbd Bug 1315554 - Part 10. Add large embedded PNG/BMP ICO tests. r=me 2017-07-22 00:15:00 -04:00
Andrew Osmond 081dd8f0be Bug 1315554 - Part 9. Get the ICO size from the resource instead of the dir entry if unspecified. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond ea108d0367 Bug 1315554 - Part 8. Allow DecoderFactory::CreateDecoderForICOResource to create metadata decoders. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 1c5f449591 Bug 1315554 - Part 7. Remove unnecessary buffering of BMP header in ICO decoder. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 88e2751836 Bug 1315554 - Part 6. Reuse the same SourceBuffer when decoding a resource within an ICO. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 1404a847cc Bug 1315554 - Part 5. Add method to clone a SourceBufferIterator when decoding. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 10a558df00 Bug 1315554 - Part 4. Combine nsICODecoder::ReadBMP and ::ReadPNG. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond a5bb792dc9 Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 27542e8875 Bug 1315554 - Part 2. The BMP decoder should be responsible for adjusting its size when embedded inside an ICO. r=tnikkel 2017-07-22 00:14:59 -04:00
Andrew Osmond 1e83b97079 Bug 1315554 - Part 1. Enforce the parent decoder size (ICO) for child decoders (BMP, PNG). r=tnikkel 2017-07-22 00:14:58 -04:00
Andrew Osmond 6764b5b440 Bug 1382495 - Fix assert in imgRequestProxy::Dispatch to accept a listener or a tab group. r=me
imgRequestProxy::IsOnEventTarget must return false in order for imgRequestProxy::Dispatch to be called. Typically we check for mListener before any of this but in imgRequest::OnLoadComplete, we have other things to do besides notifying the listener. As such, we want to dispatch even if there is no listener, and that is when the assert can fail. Since IsOnEventTarget can only return false if it has either a tab group *or* a listener, we can change the assert to match.
2017-07-20 07:53:53 -04:00
Andrew Osmond 7deae0134b Bug 1359833 - Part 10. Add telemetry to track how often imgRequestProxy needs to dispatch. r=tnikkel data-r=bsmedberg 2017-07-19 14:15:12 -04:00
Andrew Osmond 9cc95e86c2 Bug 1359833 - Part 9. Fix image mochitests to not assume a particular order of events. r=tnikkel 2017-07-19 14:15:12 -04:00
Andrew Osmond 3f2ef119ba Bug 1359833 - Part 8. ScriptedNotificationObserver should use nsAutoScriptBlocker when issuing notifications. r=tnikkel 2017-07-19 14:15:12 -04:00
Andrew Osmond 02a3031379 Bug 1359833 - Part 4. imgLoader should pass down the loading document to the imgRequest. r=tnikkel 2017-07-19 14:15:11 -04:00
Andrew Osmond 614095af6d Bug 1359833 - Part 3b. Split imgRequestProxy::Clone into Clone and SyncClone. r=tnikkel
imgRequestProxy::SyncClone preserves the original behaviour of issuing
synchronous notifications once cloned. Some uses and tests depend on
this behaviour but in an ideal world, it would not be required.

imgRequestProxy::Clone is intended to be the replacement going forward,
which issues asynchronous notifications once cloned.
2017-07-19 14:15:11 -04:00
Andrew Osmond 77f71d7379 Bug 1359833 - Part 3a. imgRequestProxy should use an event target derived from the loading document. r=tnikkel 2017-07-19 14:15:11 -04:00
Andrew Osmond b37314e6ec Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
Andrew Osmond 25dd032904 Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
Honza Bambas 8f8eed7be6 Bug 1378375 - Kill switch preference for image network request prioritization according layout position. r=tnikkel 2017-07-14 09:26:00 -04:00
Andrew Osmond f732dc9f43 Bug 1380341 - Fallback on the document's channel to check private browsing status if the load group has no load context. r=baku 2017-07-17 09:38:10 -04:00
Wes Kocher ee45f814bb Merge m-c to autoland, a=merge
MozReview-Commit-ID: GOb2bgdUd36
2017-07-14 17:27:36 -07:00
Andrew McCreight bf7fff95f0 Bug 1379786, part 4 - Use GetIsSystemPrincipal() method instead of going through secman in CHECK_PRINCIPAL_AND_DATA. r=mrbkap
MozReview-Commit-ID: INBsjjxbXZz

--HG--
extra : rebase_source : fd6d491d01acc70be1bf51e25ec31bbcde81344a
2017-07-10 15:00:03 -07:00
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Junior Hsu ca582441d7 Bug 1373198 - Part2: disable rcwn for xpcshell tests which require deterministic cache behavior, r=michal 2017-06-16 03:55:00 +02:00
Christoph Kerschbaumer 35d23fb10f Bug 1380631 - Convert test_drawDiscardedImage.html to comply with new data: URI inheritance model. r=smaug 2017-07-14 12:16:12 +02:00
Andrew Osmond e3f5cfe833 Bug 1414065 - Ensure nsJPEGDecoder::fill_input_buffer avoids memmove calls with nullptr and zero length. r=tnikkel 2017-11-23 06:58:12 -05:00
Valentin Gosu f957fd9eef Bug 945240 - Make nsIURI.host & variants return ASCII strings r=mcmanus
* nsStandardURL::GetHost/GetHostPort/GetSpec contain an punycode encoded hostname.
* Added nsIURI::GetDisplayHost/GetDisplayHostPort/GetDisplaySpec which have unicode hostnames, depending on the hostname, character blacklist and the network.IDN_show_punycode pref
* remove mHostEncoding since it's not needed anymore (the hostname is always ASCII encoded)
* Add mCheckedIfHostA to know when GetDisplayHost can return the regular host, or when we need to use the cached mDisplayHost

MozReview-Commit-ID: 4qV9Ynhr2Jl
* * *
Bug 945240 - Make sure nsIURI.specIgnoringRef/.getSensitiveInfoHiddenSpec/.prePath contain unicode hosts when network.standard-url.punycode-host is set to false r=mcmanus

MozReview-Commit-ID: F6bZuHOWEsj

--HG--
extra : rebase_source : d8ae8bf774eb22b549370ca96565bafc930faf51
2017-07-11 19:09:10 +02:00
Lee Salzman d0547ecaee Bug 1375842 - add crashtest for convolution filter. r=jrmuizel
MozReview-Commit-ID: ARSDNl1DXCl
2017-07-07 13:55:17 -04:00
Lee Salzman ed3169ba6b Bug 1375842 - increase SIMD padding for convolution filter to 31 bytes. r=jrmuizel
MozReview-Commit-ID: IAwY4xbA0P2
2017-07-07 13:32:05 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Carsten "Tomcat" Book 7857fa0a5e merge mozilla-inbound to mozilla-central a=merge 2017-07-06 11:18:05 +02:00
Timothy Nikkel e2e23f6bc4 Bug 1376722. r=aosmond a=abillings 2017-07-06 01:16:41 -05:00
Kartikaya Gupta 4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Phil Ringnalda 22cb9f77bb Merge m-c to m-i
MozReview-Commit-ID: H6zGgEm7oOM
2017-07-04 20:32:07 -07:00
Mats Palmgren 9542d00e58 Bug 1376498 part 2 - Use plain Remove(key) in some places instead of Lookup(key).Remove() for simplicity. r=froydnj
MozReview-Commit-ID: 7GlCL1jyGAz
2017-07-05 02:01:44 +02:00
Ehsan Akhgari 022893e635 Bug 1378046 - Make ImageCacheKey::Hash() return PLDHashNumber; r=aosmond 2017-07-04 11:09:03 -04:00
Ehsan Akhgari 42cecdc81e Bug 1378044 - Switch the SVGImageContext::Hash() hashing code to use PLDHashNumber; r=dholbert 2017-07-04 11:08:28 -04:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Carsten "Tomcat" Book daa67cc9e3 merge mozilla-inbound to mozilla-central a=merge 2017-06-30 12:59:45 +02:00
Timothy Nikkel c7a12ae0d8 Bug 1377252. Stop using RasterImage::IsUnlocked because it doesn't do what we want. r=aosmond
We currently use RasterImage::IsUnlocked for two different purposes:
1) to determine that we can't throw away the decoded image in WillDrawOpaqueNow
2) to determine when to send the unlockeddraw notification

For 1) what we want to check is mLockCount == 0.

For 2) what we actually want to check is mAnimationConsumers == 0. This is because images that are in the visible list in background tabs will have mLockCount == 0 but mAnimationConsumers > 0 and if we are drawing an image we need to make sure it will be animated (mAnimationConsumers == 0 stops the animation). This is what VectorImage already does.
2017-06-29 20:09:44 -05:00
Marco Bonardo 4346bdf652 Bug 1377920 - Too many WARNING: 'obs' from imagelib in debug builds. r=aosmond
MozReview-Commit-ID: 5Rt7VUYpOmt

--HG--
extra : rebase_source : 30add1827cba8508263d0a3c351e104bc5732fa7
2017-07-04 14:49:04 +02:00
Kartikaya Gupta 7332c6da98 Bug 1376782 - Replace gfxSize with a typedef to SizeDouble. r=jrmuizel
Most of the changes in this patch are just using the explicit
constructor from gfx::IntSize to gfx::Size, since gfxSize did
that implicitly but gfx::Size doesn't.

MozReview-Commit-ID: CzikGjHEXje

--HG--
extra : rebase_source : 9d19977f2a774d9a2a653db923553a6c2e06f82a
2017-06-28 11:41:21 -04:00
Carsten "Tomcat" Book d5e2b3c9e6 Backed out changeset 2cb9f9ba6b91 (bug 1363059) on a CLOSED TREE for failures in browser_startup_images.js | Loaded image chrome://browser/skin/bookmark-hollow.svg was shown 2017-06-28 16:53:49 +02:00
Johann Hofmann 857d540365 Bug 1363059 - Add a test for images loaded at startup vs. images shown at startup. r=florian,jwatt
This patch enables startupRecorder.js to collect data on
loaded and shown raster and SVG images on startup via events
from native code. It also adds a test that uses this data
to find images that are unnecessarily loaded.

I've not fixed any of the affected images yet, there's a
fairly comprehensive whitelist that I want to gradually
decrease by opening bugs in the respective components.

MozReview-Commit-ID: 9KqQvKLtZhu

--HG--
extra : rebase_source : 856f06320c78ed88c4578fce985b2a526566e825
2017-06-15 00:11:48 +02:00
Mats Palmgren feb3fcc320 Bug 1376468 - Use Lookup instead of Get+Remove to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 4OE5TzQXXxk
2017-06-28 01:03:17 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Johann Hofmann 4c2650ccdf Bug 1363059 - Add a test for images loaded at startup vs. images shown at startup. r=florian,jwatt
This patch enables startupRecorder.js to collect data on
loaded and shown raster and SVG images on startup via events
from native code. It also adds a test that uses this data
to find images that are unnecessarily loaded.

I've not fixed any of the affected images yet, there's a
fairly comprehensive whitelist that I want to gradually
decrease by opening bugs in the respective components.

MozReview-Commit-ID: 9KqQvKLtZhu

--HG--
extra : rebase_source : 5f75fcd1152f569a5b48e21d4e4821a24f768ecd
2017-06-15 00:11:48 +02:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote 4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Lee Salzman 062ca88ee0 Bug 1371689 - reuse Skia's SkConvolutionFilter1D instead of forked code from Chromium. r=jrmuizel
MozReview-Commit-ID: 5MFXOXqQvTw
2017-06-22 13:57:17 -04:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Timothy Nikkel 7be47e636c Bug 1374123. Correctly pass aAllowInvalidation flag from FrameAnimator::UpdateState to UpdateStateInternal. r=aosmond 2017-06-19 15:21:53 -05:00
Yoshi Huang 0da35daccc Bug 1267075 - Part 3: cancel imgRequestProxy if asyncOpen2 failed. r=tnikkel
The problem is if we found a cache hit, then we could go through
ValidateRequestWithNewChannel to validate the cache.
Then if the CSP check fail(asyncOpen2() will fail), then the
imgRequestProxy will remain there, and cause the timeout.

I run into problem when running mochitest
browser/base/content/test/general/browser_aboutHome.js in non-e10s mode.
In the beginning, browser.xul will load defaultFavicon.png, will create
an image cache there.
Next time when the test starts to run, when it loads about:home, then it
will try to load defaultFavicon.png, it will found an image cache hit
(loaded previously by browser.xul), and call
ValidateRequestWithNewChannel there, however the asyncOpen2 call failed,
and the imgRequestProxy is added to the loadGroup of about:home, and
never be notified until timeout.
2017-06-16 10:12:09 +08:00
Bill McCloskey d7df561295 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-14 14:44:04 -07:00
Wes Kocher 6c1a0ae549 Backed out 6 changesets (bug 1371699) for various failures including frequent img-blobURI-2.html failures and leaks a=backout
Backed out changeset 67a27cf0ab80 (bug 1371699)
Backed out changeset 7e494fa90087 (bug 1371699)
Backed out changeset 30405ec37e1e (bug 1371699)
Backed out changeset 2d67624a01dc (bug 1371699)
Backed out changeset 503c9d22e6bb (bug 1371699)
Backed out changeset eedcb67a9fb6 (bug 1371699)

MozReview-Commit-ID: 4HydLjK7Ond
2017-06-13 17:50:11 -07:00
Wes Kocher e883883e7c Backed out changeset 45b5cadadc22 (bug 1372426) because it's blocking a backout a=backout
MozReview-Commit-ID: Jl0zxef8R9k
2017-06-13 17:48:38 -07:00
Mats Palmgren bddaa611f0 Bug 1371961 - Use nsRefPtrHashtable::Remove instead of Get + nsBaseHashtable::Remove to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 2TGVmqDo8YI
2017-06-14 01:54:26 +02:00
Bill McCloskey 1b366c9ec9 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 15:24:08 -07:00
Wes Kocher fdca69feeb Backed out changeset e8a63038d787 (bug 1372426) for build failures in nsStringStream.cpp a=backout
MozReview-Commit-ID: 8ci8nKoiLhz
2017-06-13 15:20:12 -07:00
Bill McCloskey 7efe80ba16 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 14:53:26 -07:00
Boris Zbarsky 3d884086c3 Bug 1371699 part 3. Make nsIStringInputStream not inherit from nsIInputStream anymore. r=bkelly
This will prevent ambiguous nsIInputStream inheritance once we also inherit from nsIAsyncInputStream.
2017-06-13 16:16:23 -04:00
Glenn Randers-Pehrson cec136b369 Bug 1368407 - Check for too-large PNG width. r=tn
--HG--
extra : source : 76404bf85ef79bacff8fd82b364698af17275d6b
2017-06-03 14:37:00 -04:00
Ryan VanderMeulen f6491af56c Backed out changeset 76404bf85ef7 for landing with the wrong bug number in the commit message. 2017-06-07 22:43:58 -04:00
Glenn Randers-Pehrson a20fe96562 Bug 1367496 - Check for too-large PNG width. r=tn
--HG--
extra : rebase_source : 0c4a6e639e803bceff110cab600aadb3779a79fe
2017-06-03 14:37:00 -04:00
Timothy Nikkel 9ddfa24f9c Bug 1368440. Drop the layerized version of animated images when they are discarded so we don't show an out of date version of the image. r=aosmond 2017-06-06 00:41:40 -05:00
Timothy Nikkel 5dbb032f4f Bug 1363092. Don't update the state of an animated image that requires an invalidation when creating a new decoder because we may not be able to send invalidations. r=aosmond 2017-06-01 02:19:55 -05:00
Ryan VanderMeulen 2fbcb8b3bb Merge m-c to inbound. a=merge 2017-05-30 16:09:45 -04:00
Timothy Nikkel 41616c178d Bug 1342567. r=aosmond a=abillings 2017-05-30 14:49:26 -05:00
Xidorn Quan bbbd718f2c Bug 1341102 - Update test expectations.
MozReview-Commit-ID: C8hTU5S3Tgg

--HG--
extra : rebase_source : 98559841c5381589f06f09f0f5c31d7b7ed608f3
extra : amend_source : 031eb125fff71dbb1ae112e387e5c183c07c947d
2017-05-30 10:56:51 +10:00
Jonathan Watt 29f20fa2d0 Bug 1367601 - Fix unified build error in imgRequestProxy.cpp. r=tnikkel
This file does not have a |using namespace mozilla;| line, so it cannot use
image::Image without a mozilla:: qualification.
2017-04-28 12:46:19 +01:00
Timothy Nikkel 07c22d39dd Bug 1364365. Limit the number of full loops of an animated image we can skip to the number of remaining loops. r=aosmond
The optimization is incorrect if we try to skip ahead more full loops then are remaining in the loop count.
2017-05-24 16:20:41 -05:00
Emilio Cobos Álvarez 1f11cbb1e1 Bug 1368589: handle the case where a RebuildAllStyleData event is posted and stylesheets are added at the same time. r=heycam
MozReview-Commit-ID: IWiTCCo55cg

--HG--
extra : rebase_source : 0c90c496d3d53fa50e42a54332c97591b176ba80
2017-05-30 02:46:33 +02:00
cku d26418ab50 Bug 1351440 - Part 1. Implement imgDrawingParams. r=jwatt
A struct used during painting to provide input flags to determine how
imagelib draw calls should behave, plus an output DrawResult to return
information about the result of any imagelib draw calls that may have
occurred.

MozReview-Commit-ID: 3jGEh5vEPF
2017-05-18 22:03:36 +02:00
Sebastian Hengst 2ed2e93dc1 Backed out changeset 0065478cc7eb (bug 1351440) under suspicion for causing reftest failures on Stylo debug. r=backout 2017-05-18 21:16:31 +02:00
cku fedf7f24d9 Bug 1351440 - Part 1. Implement imgDrawingParams. r=jwatt
A struct used during painting to provide input flags to determine how
imagelib draw calls should behave, plus an output DrawResult to return
information about the result of any imagelib draw calls that may have
occurred.

MozReview-Commit-ID: 3jGEh5vEPF

--HG--
extra : rebase_source : 6a40d1bca79425dabf28538b5492cb090074223e
2017-05-09 13:41:18 +08:00
Timothy Nikkel 09788ebab5 Back out changesets from bug 1342567.
Backed out changeset 06d6f928ed64
* * *
Backed out changeset f577512b1a29
* * *
Backed out changeset 289645ac65c1
* * *
Backed out changeset 600f9d60d76f
* * *
Backed out changeset 445330fd1211
2017-05-17 16:17:23 -05:00
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Max Stepin 1175dd3922 Bug 1255497. Change the number of iterations we do for finite length animated gif to match what everyone else does. r=seth 2017-05-12 22:29:12 +02:00
Manish Goregaokar d495981f56 Bug 1340484 - More expectation updates; r=manishearth
MozReview-Commit-ID: 2E3HbI3FPl6
2017-05-11 18:31:48 -07:00
Manish Goregaokar 60a054b7f9 Bug 1340484 - Round RGB values when obtaining from HSL instead of flooring; r=dbaron
MozReview-Commit-ID: AFfczBFV00n

--HG--
extra : rebase_source : 127da8fa5cd21f9054de89f30f83db96d1a3392b
2017-05-08 16:43:05 -07:00
Timothy Nikkel eea47ac6ca Bug 1342567. r=aosmond a=abillings 2017-05-10 17:39:45 -05:00
Carsten "Tomcat" Book 455239782b Merge mozilla-central to mozilla-inbound 2017-05-10 15:30:44 +02:00
Carsten "Tomcat" Book d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
Bill McCloskey c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Kershaw Chang a879fe7ee3 Bug 1352176 - Part3: Pass an event target at places where nsIInputStream::init is called., r=mayhemer 2017-05-09 20:05:00 +02:00
Jonathan Watt cfea97eb87 Bug 1359762 - Only allow SVG images to use context paint if they're from chrome:// or resource://. r=dholbert
MozReview-Commit-ID: 5vaPp4Y8zMd
2017-04-25 12:47:19 +01:00
Tom Tung 0e308b0c4f Bug 1348050 - Part 3: Mark channel as urgent-start for loading image. r=baku,mayhemer
This part is mainly to mark the channel as urgent-start if src related
attributes in HTMLImageElement and HTMLInputElement is set and the channel is
open due to user interaction. Unfortunately, we cannot just check the event
state just after creating channel since some loading image tasks will be queue
and execute in stable state. Thus, I store the event state in elements and
pass it to the place where create the channel.

MozReview-Commit-ID: GBdAkPfVzsn

--HG--
extra : rebase_source : 715352317b4b600f8a7f78b7bc22b894bb272d27
2017-04-25 09:17:38 +08:00
Jonathan Watt 33cfc4aa43 Bug 1362891, part 2 - Make use of XRE_IsE10sParentProcess in code that could use it. r=froydnj
MozReview-Commit-ID: 81PFEgNH37m

--HG--
extra : rebase_source : 350b11b3bec652472565bd590ef13680e480a75e
2017-04-24 10:40:12 +01:00
Timothy Nikkel c570406a5e Bug 1360572. Invalidate the whole animated image when the composited frame becomes valid. r=aosmond
We invalidate if FrameAnimator::UpdateState marks the composited frame as valid, but we fail to do so if FrameAnimator::RequestRefresh does so.

The other place that sets the composited frame as valid is RasterImage::Decode. This call is actually redundant because the UpdateState call will do the same.

Even though we will invalidate when the decode produces results we could still draw incorrectly if something else invalidates. In which case we would only draw the part of the image that was invalidated. But that should actually be impossible as explained in the comment.
2017-05-03 21:20:35 -05:00
Ehsan Akhgari cd8e5781d1 Back out bug 1357107 since it broke a feature that we have no automated tests for... 2017-05-05 22:41:36 -04:00
Masatoshi Kimura 2195becf33 Bug 1360784 - Revert a workaround for bug 1361632. r=xidorn
MozReview-Commit-ID: FU7r2cMaQOL

--HG--
extra : rebase_source : 05bad5a3cc60c26391b52e21b4390db321ad6dc4
2017-05-04 23:35:59 +09:00
Timothy Nikkel 432937f220 Bug 1361642. Return PENDING from FrameAnimator::GetCompositedFrame is a decode is pending so that we don't start another decode. r=aosmond 2017-05-04 01:25:10 -05:00
Iris Hsiao ab85c1ac98 Backed out changeset dda520b4ed32 (bug 1360572) for Assertion failure at RasterImage.cpp 2017-05-04 11:30:45 +08:00
Timothy Nikkel 82de893b0a Bug 1360572. Invalidate the whole animated image when the composited frame becomes valid. r=aosmond
We invalidate if FrameAnimator::UpdateState marks the composited frame as valid, but we fail to do so if FrameAnimator::RequestRefresh does so.

The other place that sets the composited frame as valid is RasterImage::Decode. This call is actually redundant because the UpdateState call will do the same.

Even though we will invalidate when the decode produces results we could still draw incorrectly if something else invalidates. In which case we would only draw the part of the image that was invalidated. But that should actually be impossible as explained in the comment.
2017-05-03 21:20:35 -05:00
Jonathan Watt f6147ec697 Bug 1360511 - Move SVGDrawingParameters to a header file to allow it to be shared. r=longsonr
MozReview-Commit-ID: I1EU0AlLLHU

--HG--
extra : rebase_source : b9b76a35daf73307d3d9a62ade92c301f87f9654
2017-04-18 12:46:19 +01:00
Timothy Nikkel 16893a87d5 Bug 1319283. In test_bug1217571.html use an image that is only used in this test. r=aosmond
We do this to avoid having one of the image loads happen before the cache entry for the image times out and the other image load after the cache entry times out.

--HG--
rename : image/test/mochitest/damon.jpg => image/test/mochitest/bug1217571.jpg
2017-05-02 21:05:29 -05:00
Masatoshi Kimura a32ffda28f Bug 1360784 - Enable huge-1.html reftests for stylo. r=xidorn
MozReview-Commit-ID: 8PhXOTUplLI

--HG--
extra : rebase_source : 405a0549759a473d9dd3c04aca49a6d55e8e8c6d
2017-04-29 10:58:45 +09:00
Ehsan Akhgari 2ba38555ad Bug 1357107 follow-up: replace some run-away tab characters
DONTBUILD
2017-04-28 00:30:14 -04:00
Ehsan Akhgari 1bf467365d Bug 1357107 - Part 1: Move the handling of the permissions.default.image pref to imgLoader.cpp; r=bzbarsky 2017-04-28 00:13:23 -04:00
Shing Lyu c46f5d5baf Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: 8LoQ9xNnDnj
2017-04-28 11:15:58 +08:00
Shing Lyu 435db45b79 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-28 11:15:50 +08:00
Nathan Froyd 8bbd081c88 Bug 1359415 - move threadsafety checks inside nsAutoOwningThread; r=erahm
This change moves most of the logic for the threadsafety check into
nsAutoOwningThread, rather than having part of the logic live in
nsAutoOwningThread and part of the logic live in nsDebug.h.  Changing
this also forces us to clean up a couple of places that replicated the
logic that lived in nsDebug.h as well.
2017-04-26 11:41:32 -04:00
Sebastian Hengst ceff3b0678 Backed out changeset 1f9d0f8e65b9 (bug 1351548) 2017-04-26 13:13:05 +02:00
Sebastian Hengst f46ebb0d94 Backed out changeset aebb0ceeb20a (bug 1351548) 2017-04-26 13:12:53 +02:00
Shing Lyu 96b400c04a Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: Gn0fbS4PZ7i
2017-04-26 18:21:52 +08:00
Shing Lyu dae014d9d5 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-26 18:21:43 +08:00
Jonathan Watt 228e5e7649 Bug 1358828, part 3 - Split AutoSVGRenderingState into two separate classes. r=longsonr
MozReview-Commit-ID: CmBB3MHU4Dt
2017-04-03 10:40:13 +01:00
Jonathan Watt a64f783074 Bug 1358828, part 2 - Avoid setting state on SVG images if we use an image from the surface cache. r=longsonr
MozReview-Commit-ID: zvdStzP5Zx
2017-03-27 12:49:44 +01:00
Jonathan Watt c42adf48d9 Bug 1358828, part 1 - Add some missing includes. r=longsonr
MozReview-Commit-ID: 3nDDATmCkJV
2017-03-27 12:49:21 +01:00
Wes Kocher d973551173 Merge inbound to central, a=merge
MozReview-Commit-ID: FHfhKIIlItM
2017-04-21 17:30:43 -07:00
Julian Descottes 3466153b93 Bug 1358070 - register dedicated privileged image for browser_docshell_type_editor.js;r=Gijs
The test image/test/browser/browser_docshell_type_editor.js used to rely on a devtools image.
Devtools are moving away from mozilla central, so here we register a new image dedicated for
this test.

MozReview-Commit-ID: Log4J0eLudV

--HG--
extra : rebase_source : 63890e9b4bbcf4de46190d42808ed92430f3c072
2017-04-20 11:46:51 +02:00
Timothy Nikkel c2119cfed3 Bug 1342567. r=aosmond a=abillings 2017-04-21 00:18:49 -05:00
Timothy Nikkel b97346ec7a Bug 1342567. r=aosmond a=abillings 2017-04-21 00:18:46 -05:00
Valentin Gosu 0a4d506e21 Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor
MozReview-Commit-ID: K28Opd9JTr2

--HG--
extra : rebase_source : d1a786d9b4318be15f195fdc330489121ebd6ece
2017-04-20 10:15:06 +08:00
Wei-Cheng Pan 1978d62be4 Bug 1344893 - Part 1: Report Navigation Timing into Telemetry. r=smaug, data-review=bsmedberg
We only need metric from top level content document, but we dont have
any information about it in nsDOMNavigationTiming, so I add a weak
reference which points to nsDocShell.

MozReview-Commit-ID: GiJigRLYHNV
2017-04-19 02:00:00 -04:00
Timothy Nikkel c12e8c8307 Bug 1342567. r=aosmond a=abillings 2017-04-19 00:36:06 -05:00
cku 258222aaaf Bug 1346618 - Part 1. Remove SVGImageContext::mGlobalOpacity. r=mstange
MozReview-Commit-ID: ByiPa4sreEh

--HG--
extra : rebase_source : eda6104c00cbc7ebe7b9a5ddc9e2abc73fbc37df
extra : source : df69799726bdccc5a25d6190c0fe22645e264ab7
2017-04-15 02:01:22 +08:00
Ehsan Akhgari 29071e6146 Backout change fb3c323635d6 (bug 1347400) because the telemetry probe didn't prove to be useful 2017-04-15 17:20:25 -04:00
Shih-Chiang Chien fe043ed110 Bug 1357318 - remember previous priority boost request in imgRequest. r=tnikkel
MozReview-Commit-ID: IieWWUw8EIB

--HG--
extra : rebase_source : 2a4fcc625f6f44833533b524bb388bedfeceecaa
2017-03-22 19:52:15 +08:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Timothy Nikkel 7aeea3c59d Bug 1355898. Add crashtest. 2017-04-13 19:56:24 -05:00
Ehsan Akhgari d52952ffdd Bug 1316683 - Part 4: Use the non-scriptable LoadContext object in test_private_channel.js; r=hurley 2017-04-12 11:32:16 -04:00
Timothy Nikkel ff22b71de5 Bug 1342567. r=aosmond a=dveditz 2017-04-11 03:14:11 -05:00
Timothy Nikkel c1bda06e96 Bug 1352408. Restore imgICache::RemoveEntry. r=ehsan
It was removed in bug 1202085 because there were no callers and changes made in that bug would have required it to be updated.
2017-04-11 03:14:09 -05:00
Timothy Nikkel 6d1e6e26bb Bug 1354499. Enable test_discardAnimatedImage.html. 2017-04-08 15:58:17 -05:00
Timothy Nikkel 87341e1350 Bug 1354499. Disable test_discardAnimatedImage.html temporarily. 2017-04-08 02:04:52 -05:00
Timothy Nikkel 05aceb8d0a Bug 1354499. Do a better job of not recording successful results after test finish in test_discardAnimatedImage.html.
The previous patch wasn't good enough because it only prevented dispatching more setTimeouts after finish. It did nothing to stop already dispatched setTimeouts from calling ok(true,...).
2017-04-08 02:04:52 -05:00
Timothy Nikkel 7bd2215f6e Bug 1354499. Don't record further successful results after finishing in test_discardAnimatedImage.html. 2017-04-07 18:26:20 -05:00
Timothy Nikkel a453a97b57 Bug 1354499. Fix test_discardAnimatedImage.html to not call finish multiple times.
We can have multiple setTimeouts from multiple frame update notifications in flight at the same time. If one of them reaches the finishing conditions the rest will too. So just guard calling finish with a global bool.
2017-04-07 16:11:14 -05:00
Phil Ringnalda fd177bad39 Backed out 2 changesets (bug 1354499) for only changing the failure to a frequent Result logged after SimpleTest.finish()
CLOSED TREE

Backed out changeset 415cd9f87458 (bug 1354499)
Backed out changeset 17d681fd2b32 (bug 1354499)
2017-04-07 21:35:14 -07:00
Timothy Nikkel ec4e60afa1 Bug 1354499. Don't record further successful results after finishing in test_discardAnimatedImage.html. 2017-04-07 18:26:20 -05:00
Timothy Nikkel e6e0643c2e Bug 1354499. Fix test_discardAnimatedImage.html to not call finish multiple times.
We can have multiple setTimeouts from multiple frame update notifications in flight at the same time. If one of them reaches the finishing conditions the rest will too. So just guard calling finish with a global bool.
2017-04-07 16:11:14 -05:00
Mike Hommey e91179eda5 Bug 1344038 - Remove --enable-gnomeui. r=karlt
--HG--
extra : rebase_source : 562519f2f6727750afe7d4a8503b41e722222d7d
2017-03-08 15:35:53 +09:00
Mike Hommey 94c16743bb Bug 1344038 - Remove --disable-gio. r=karlt
--HG--
extra : rebase_source : 3b5b820536b0e9b1fb1da3a16c444ed7839770b9
2017-04-05 14:06:25 +09:00
Timothy Nikkel 91e6c26580 Bug 1353299. Make sure to invalidate when composited frame becomes valid. r=aosmond
We draw nothing when the composited frame is invalid, so when we mark it valid we should invalidate. Usually the action that causes the composited frame to be valid will invalidate (ie RequestRefresh).
2017-04-06 04:00:36 -05:00
Timothy Nikkel fbb79c8298 Bug 1353298. Don't report that an animated image with an invalid composited frame will draw opaquely. r=aosmond
We draw nothing until the composited frame is valid.

The IsFinished call lower down only considers one frame of the animation, so doesn't do what we want.
2017-04-06 04:00:36 -05:00
Timothy Nikkel 6c5f81b150 Bug 1352282. In test_discardAnimatedImage.html call drawWindow from a setTimeout from frame update notification.
Image notifications sent from nsImageLoadingContent happen under a scriptblocker. drawWindow flushes will paint observers, which can dispatch events. Events dispatched while scripts are blocked assert.
2017-04-06 04:00:36 -05:00
Timothy Nikkel 74f25a0e00 Bug 1352282. Improve test_discardAnimatedImage.html to check that the animation continues when we re-decode. r=aosmond 2017-04-05 11:28:41 -05:00
Timothy Nikkel 0e7000fdce Bug 1352282. Always fill in the number of loops when decoding an APNG file. r=aosmond
If we were doing a first frame only decode we wouldn't fill in this value. The spec says this chunk must come before any image data so it should always be available at the end of any full decode (whether it be truly full or first frame only).
2017-04-05 11:28:40 -05:00
Carsten "Tomcat" Book 7a670cdd01 merge mozilla-inbound to mozilla-central a=merge 2017-04-05 14:33:35 +02:00
Shing Lyu c98fca71fd Bug 1353643 - reftest-stylo.list fixes. r=heycam
MozReview-Commit-ID: 9HPACBPCOB6

--HG--
extra : rebase_source : ee63c4854ea4c4cba7c1cd47b4af4fa711ca75fb
2017-03-29 15:16:47 +08:00
Bevis Tseng 87fae2d807 Bug 1350177 - Part 3: Refactor SurfaceCache with ExpirationTrackerImpl. r=froydnj,aosmond
Always acquire StaticMutexAutoLock for the use of ExpirationTrackerImpl.

--HG--
extra : rebase_source : 39d59130b9f1edd9fc43cc3597015a3f21b37977
2017-03-27 21:47:23 -04:00
Brendan Dahl a1f2e12af8 Bug 1338004 - Add headless browser mode. r=jrmuizel, r=ted
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.
2017-04-04 10:22:00 -04:00
Timothy Nikkel b3137a6749 Bug 1348941. r=njn 2017-03-31 06:07:29 -05:00
Phil Ringnalda 57f1484fe3 Backed out changeset ada34cba0052 (bug 1348941) for image-related bustages
CLOSED TREE
2017-03-30 19:28:00 -07:00
Timothy Nikkel c11cd13119 Bug 1352008. Check return value of DrawableSurface::Seek because if it failed it will return the first frame when you ask for a frame. r=aosmond 2017-03-30 19:07:05 -05:00
Timothy Nikkel 0ed714966d Bug 1348941. r=n.nethercote 2017-03-30 19:07:04 -05:00
Ryan VanderMeulen f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Timothy Nikkel 7bf131a182 Bug 1351434. Don't do any work in RasterImage::OnSurfaceDiscarded because we hold the surface cache mutex in it. r=aosmond
https://hg.mozilla.org/integration/mozilla-inbound/rev/432215553953 (bug 1343341) is what caused this.

The UpdateState call does a surface cache lookup.
2017-03-28 15:46:23 -05:00
Makoto Kato f3c1c49239 Bug 1348177 - Part 1. Remove GetProcAddress for shell32 to use Vista+ API (image part). r=jimm,tnikkel
Since we drop XP support, it is unnecessary to use SHGetStockIconInfo via LoadLibrary.

MozReview-Commit-ID: 4lvhVObHv5U

--HG--
extra : rebase_source : 04ac6f97e6a3eff7c52e11e3868da0939efd6ffe
2017-03-17 13:26:57 +09:00
Timothy Nikkel e4da61a3e1 Bug 1343341. Add a test to check that discarding and redecoding of animated images works. r=aosmond
The test does nothing if the animated images discarding pref isn't enabled.

--HG--
rename : image/test/crashtests/1249576-1.png => image/test/mochitest/infinite-apng.png
2017-03-27 00:17:54 -05:00