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

616 Коммитов

Автор SHA1 Сообщение Дата
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 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 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 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
Sebastian Hengst b33e39c76b Backed out changeset e1eec63b920f (bug 1315554) 2017-07-22 11:04:22 +02:00
Sebastian Hengst c8ba1dd256 Backed out changeset 6fa3ad97ce9c (bug 1315554) 2017-07-22 11:04:07 +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 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 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 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
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
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
Lee Salzman d0547ecaee Bug 1375842 - add crashtest for convolution filter. r=jrmuizel
MozReview-Commit-ID: ARSDNl1DXCl
2017-07-07 13:55:17 -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
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
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02: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
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
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +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
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 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
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
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
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
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 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
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
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
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