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

3937 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond a70c654c29 Bug 1550710 - Make vector images enable high quality scaling for embedded raster images. r=tnikkel
We did not pass FLAG_HIGH_QUALITY_SCALING down to the document used to
rasterize the SVG to a surface, resulting in embedded raster images to
not use high quality downscaling.

Differential Revision: https://phabricator.services.mozilla.com/D56422
2020-06-23 12:43:21 +00:00
tkhan 6ccabd4784 Bug 1602668 - M(1) manifest and test changes. r=kmag,karlt,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70362
2020-06-22 19:09:49 +00:00
Emilio Cobos Álvarez 16ca2c98df Bug 1642591 - Fix image/test/unit/test_private_channel.js. r=tnikkel
This test fails already on central if you change this line:

  https://searchfox.org/mozilla-central/rev/027893497316897b8f292bde48dbb6da2391a331/image/test/unit/test_private_channel.js#93

by:

  Ci.nsIReferrerInfo.EMPTY

Because the previous part of the test populates the image cache. The
test wants to check that the channel for the image load is properly
flagged as private and thus that the http cache is partitioned
appropriately, thus clearing the image caches seems sane.

While at it, also fix it so that we send a valid image instead of base64
text, though that change is not technically needed so feel free to ask
me to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D79848
2020-06-18 14:07:03 +00:00
Emilio Cobos Álvarez 6bb08bd490 Bug 1646056 - Use const references as keys instead of raw pointers for PreloadHashKey. r=mayhemer
Feels a bit more natural for the callers this way. This should have no
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D79831
2020-06-18 14:06:34 +00:00
Emilio Cobos Álvarez 939c7c466b Bug 1642591 - Don't make referrer policy a cache miss for sub-resource {pre,}loads. r=mayhemer,tnikkel
For preload we're already effectively not using it, I think, due to
bug 1642325.

For images, this matches the spec, see earlier comments in this bug and
https://bugzilla.mozilla.org/show_bug.cgi?id=1174921#c17.  I think it
makes sense for other sub-resources to align as well.

Differential Revision: https://phabricator.services.mozilla.com/D79812
2020-06-18 14:06:20 +00:00
Andrew Osmond b33277b10b Bug 1450353. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D79303
2020-06-11 23:13:09 +00:00
Kris Maglione 3bda67deab Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-17 17:17:16 +00:00
Emilio Cobos Álvarez e5fe143835 Bug 1599160 - Better integration of the shared stylesheet cache with the network cache. r=tnikkel,mayhemer,heycam
Make the stylesheet cache respect the same headers as the image cache
does. This makes no-cache stylesheets work as they do now, which is
useful for developers that want to develop sites locally, and for
shift-reloads, etc.

Differential Revision: https://phabricator.services.mozilla.com/D78659
2020-06-12 19:06:04 +00:00
Timothy Nikkel fdba166d63 Bug 1641682. Don't kick off a validation network request if the original image network request hasn't finished. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D78858
2020-06-13 08:15:45 +00:00
Andrew Osmond 03a8e2e93b Bug 1645042 - Revert bug 1631615 and color manage untagged images. r=tnikkel
We really should be color managing them. It was a mistake and
misunderstanding of how Chrome worked because of differences in how we
color manage canvas.

Differential Revision: https://phabricator.services.mozilla.com/D79295
2020-06-11 21:46:45 +00:00
Andrew Osmond 65ad608400 Bug 1641594 - Remove the wrapper around recycled surfaces. r=tnikkel
We can perform the same function as RecyclingSourceSurface by checking
the ref count of the underlying surface directly. We need to ensure
WebRender is explicitly aware that it is a recycled surface, but that is
easily achieved by changing the type of the surface. This avoids
unnecessary heap allocations, particularly in the case where many
elements on the same page refer to the same animation (and thus
duplicating RecyclingSourceSurface objects).

Differential Revision: https://phabricator.services.mozilla.com/D77513
2020-06-11 17:49:13 +00:00
Razvan Maries 7b30d6e82e Backed out 7 changesets (bug 1599160) for damp failures. CLOSED TREE
Backed out changeset edb0e17f3c98 (bug 1599160)
Backed out changeset 64b42ac358e6 (bug 1599160)
Backed out changeset ce1521b895e1 (bug 1599160)
Backed out changeset 0b0ff0ad8db7 (bug 1599160)
Backed out changeset c7ef05dae614 (bug 1599160)
Backed out changeset 466cfd0ad5db (bug 1599160)
Backed out changeset b3f28494f0e7 (bug 1599160)
2020-06-12 02:40:38 +03:00
Dorel Luca bb8522746f Backed out changeset c0573a579b73 (bug 1641682) for WPT failures in /html/canvas/element/imagebitmap/createImageBitmap-invalid-args.html. CLOSED TREE 2020-06-11 17:44:48 +03:00
Emilio Cobos Álvarez 5048e0ec84 Bug 1599160 - Better integration of the shared stylesheet cache with the network cache. r=tnikkel,mayhemer,heycam
Make the stylesheet cache respect the same headers as the image cache
does. This makes no-cache stylesheets work as they do now, which is
useful for developers that want to develop sites locally, and for
shift-reloads, etc.

Differential Revision: https://phabricator.services.mozilla.com/D78659
2020-06-11 11:42:01 +00:00
Timothy Nikkel 04d7907c66 Bug 1641682. Don't kick off a validation network request if the original image network request hasn't finished. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D78858
2020-06-11 09:54:18 +00:00
Dorel Luca 2a1f38a07c Backed out changeset 1c79bd1023d8 (bug 1641682) for Build bustage in worker/checkouts/gecko/config/rules.mk 2020-06-11 12:43:24 +03:00
Timothy Nikkel bc84cbd3de Bug 1641682. Don't kick off a validation network request if the original image network request hasn't finished. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D78858
2020-06-10 13:34:49 +00:00
Honza Bambas 191a2becd0 Bug 1642140 - Image link-preloads: do not overprioritize, never set UrgentStart, always set LOAD_BACKGROUND, r=edgar,tnikkel+tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D77664
2020-06-02 20:28:30 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +00:00
Kershaw Chang f325bc0048 Bug 1641496 - P6: Reenable some tests r=dragana,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D77277
2020-06-04 22:56:38 +00:00
Csoregi Natalia 63635ef2aa Backed out 7 changesets (bug 1641496) for failures on test_trr.js. CLOSED TREE
Backed out changeset 1c927e612dda (bug 1641496)
Backed out changeset 0f1ba77e3942 (bug 1641496)
Backed out changeset a626e86ce5c9 (bug 1641496)
Backed out changeset 196381953eac (bug 1641496)
Backed out changeset 70b0af678bfd (bug 1641496)
Backed out changeset bf41bd8ca89c (bug 1641496)
Backed out changeset 745da0e1cb80 (bug 1641496)
2020-06-05 01:39:19 +03:00
Kershaw Chang 9e895a5b1f Bug 1641496 - P6: Reenable some tests r=dragana,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D77277
2020-06-04 16:53:23 +00:00
Andrea Marchesini 22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00
Csoregi Natalia 2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini e31c7313ca Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-02 08:28:05 +00:00
Razvan Maries a36bb7751f Backed out 3 changesets (bug 1638153) for perma failures on cross-origin-objects.html. CLOSED TREE
Backed out changeset f7aedc92d396 (bug 1638153)
Backed out changeset 07ec713926c6 (bug 1638153)
Backed out changeset 5a656842e241 (bug 1638153)
2020-06-01 23:51:35 +03:00
Kris Maglione b3fcd970ec Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-01 17:59:01 +00:00
Noemi Erli f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini 8c0df411d1 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-01 11:57:46 +00:00
Masatoshi Kimura b9a2ffc214 Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-31 03:41:03 +00:00
Razvan Maries b65c634b01 Backed out changeset 6c865ed1f998 (bug 1641389) for perma failures on test_animation_operators.html. CLOSED TREE 2020-05-28 05:43:40 +03:00
Andrew Osmond 994485ee93 Bug 1641389 - Remove image.webp.enabled pref, always on by default. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D77182
2020-05-28 01:39:01 +00:00
Razvan Maries 09cc85b802 Backed out changeset fd4e161666b0 (bug 1641389) for build bustages on nsImageModule.cpp. CLOSED TREE 2020-05-28 02:44:42 +03:00
Andrew Osmond 342432ef38 Bug 1641389 - Remove image.webp.enabled pref, always on by default. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D77182
2020-05-27 23:08:38 +00:00
Andrew Osmond b1a4d4c79f Bug 1621283 - Ensure the WebP image decoder can handle source buffer errors. r=tnikkel
If we hit an OOM or similar when creating a SourceBuffer for an image,
we will hit COMPLETE immediately as the next read that goes to the
SourceBuffer from a SourceBufferIterator. If the iterator has yet to do
a read, that means it will hit COMPLETE right away without giving
anything. This patch fixes the WebP decoder to handle this case, as well
as adds test cases for all of the current image decoders.

Differential Revision: https://phabricator.services.mozilla.com/D77131
2020-05-27 22:52:10 +00:00
Jon Bauman 3b93e0e5f8 Bug 1635391 - Firefox does not download WebP and AVIF when their support flags are off. r=mattwoodrow
Dynamically toggle support for displaying image/webp and image/avif according
to the values of the image.webp.enabled and image.avif.enabled prefs.

Differential Revision: https://phabricator.services.mozilla.com/D76977
2020-05-27 18:51:25 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Timothy Nikkel b1a5b829a2 Bug 1640332. Access imgRequest::mIsMultiPartChannel while holding the mutex. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D76580
2020-05-26 02:06:07 +00:00
Timothy Nikkel 821ecf5a31 Bug 1640332. Move fields out of the bitfield that is accessed off main thread. r=aosmond
We don't access them off main thread so just move them out of the bitfield that is protected by the mutex.

Differential Revision: https://phabricator.services.mozilla.com/D76579
2020-05-26 02:06:00 +00:00
Andrew Osmond 532a41fd80 Bug 1639574 - Disable color management for CSS due to issues with canvas. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D76859
2020-05-26 21:20:18 +00:00
Kagami Sascha Rosylight 236de553f6 Bug 1466532 - Part 1: Drop nsIFile::followLinks r=froydnj,necko-reviewers,dragana
This drops `followLinks` as 1) it has been no-op on UNIX for a long time and 2) its Windows implementation never had a proper symlink support.

Differential Revision: https://phabricator.services.mozilla.com/D75569
2020-05-26 20:51:16 +00:00
Kershaw Chang 104bf647be Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 14:30:26 +00:00
Butkovits Atila f167b5c275 Backed out 6 changesets (bug 1602832) for causing perma failure at test_trr_case_sensitivity.js. CLOSED TREE
Backed out changeset 0e9c378df995 (bug 1602832)
Backed out changeset 534fedb3836e (bug 1602832)
Backed out changeset db012c05d64e (bug 1602832)
Backed out changeset ca0c207dca21 (bug 1602832)
Backed out changeset bea1f3aeea49 (bug 1602832)
Backed out changeset 2d54acd78124 (bug 1602832)
2020-05-26 13:09:07 +03:00
Kershaw Chang 52a180d403 Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-26 08:35:32 +00:00
Csoregi Natalia 38116effd4 Backed out changeset 8d0d9cb87686 (bug 1466532) for failures on test_file_protocol.js. CLOSED TREE 2020-05-26 01:46:49 +03:00
Kagami Sascha Rosylight b712a9333b Bug 1466532 - Part 1: Drop nsIFile::followLinks r=froydnj,necko-reviewers,dragana
This drops `followLinks` as 1) it has been no-op on UNIX for a long time and 2) its Windows implementation never had a proper symlink support.

Differential Revision: https://phabricator.services.mozilla.com/D75569
2020-05-25 18:55:59 +00:00
Honza Bambas 3e13f22e1b Bug 1637039 - Notify image preload when its loading channel synchronously fails to open, remove a used image preload from Document, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D76363
2020-05-25 18:38:58 +00:00
Jon Bauman 83307586cc Bug 1639409 - AVIF (AV1 Image File Format): decode with dav1d. r=aosmond
Also, add `clang-format off` directives to files which are ignored by
.clang-format-ignore so that the editor isn't trying to reformat them

Differential Revision: https://phabricator.services.mozilla.com/D76217
2020-05-22 19:00:17 +00:00
Mihai Alexandru Michis 37ef8a125d Backed out changeset a845717e4d10 (bug 1482279) for causing multiple failures.
CLOSED TREE
2020-05-23 02:22:20 +03:00
Masatoshi Kimura 0701e89b7e Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-22 21:46:25 +00:00
Dorel Luca 6c1dbf7154 Backed out changeset 40784ea31188 (bug 651482) for Reftest failures in bmp-corrupted/wrapper.html?invalid-compression-BITFIELDS.bmp. CLOSED TREE 2020-05-22 12:21:32 +03:00
wesj 2863da4ad0 * Bug 651482 - Allow decoding bitmaps with 52 and 56 byte info headers. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75803
2020-05-22 03:35:15 +00:00
Andrea Marchesini fd1027ec66 Bug 1639807 - Isolate image cache per first-party when privacy.partition.network_state is set to true - part 2 - Implementation, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D76283
2020-05-21 11:28:12 +00:00
Andrea Marchesini 55807d2b15 Bug 1639807 - Isolate image cache per first-party when privacy.partition.network_state is set to true - part 1 - Rename isolation key member in ImageCacheKey, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D76282
2020-05-21 11:28:14 +00:00
Narcis Beleuzu b3b1bc3da1 Backed out 3 changesets (bug 1639807) for xpcshell failures on test_staticPartition_image.js. CLOSED TREE
Backed out changeset 40e3b3b67880 (bug 1639807)
Backed out changeset cf10a7a55c2a (bug 1639807)
Backed out changeset 09a04d08423a (bug 1639807)
2020-05-21 14:25:25 +03:00
Andrea Marchesini d137d4f72b Bug 1639807 - Isolate image cache per first-party when privacy.partition.network_state is set to true - part 2 - Implementation, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D76283
2020-05-21 10:11:11 +00:00
Andrea Marchesini d0fc0ae13f Bug 1639807 - Isolate image cache per first-party when privacy.partition.network_state is set to true - part 1 - Rename isolation key member in ImageCacheKey, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D76282
2020-05-21 08:02:10 +00:00
Coroiu Cristina 44c378a7fb Backed out 5 changesets (bug 1602832) for browser-chrome failures at toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js on a CLOSED TREE
Backed out changeset 059a7f44d1a9 (bug 1602832)
Backed out changeset 2f3cc391b48a (bug 1602832)
Backed out changeset 24d1ce1b0ac9 (bug 1602832)
Backed out changeset 5ea85726cc48 (bug 1602832)
Backed out changeset ee00e846104e (bug 1602832)
2020-05-19 23:05:26 +03:00
Kershaw Chang 0e9baa4d27 Bug 1602832 - P3: Skip failed tests r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67448
2020-05-19 12:56:52 +00:00
Mihai Alexandru Michis f762733bac Backed out 2 changesets (bug 651482) for causing bitmap reftest failures.
CLOSED TREE

Backed out changeset 734c4f395eba (bug 651482)
Backed out changeset d8cc480c563c (bug 651482)
2020-05-18 10:31:53 +03:00
wesj 465e7d393b Bug 651482 - Update documentation. r=tnikkel
Depends on D75467

Differential Revision: https://phabricator.services.mozilla.com/D75703
2020-05-18 06:15:25 +00:00
wesj 85450013c7 Bug 651482 - Allow decoding bitmaps with 52 and 56 byte info headers. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75467
2020-05-18 06:41:28 +00:00
Cameron McCormack d009767bb6 Bug 1631214 - Fix oriented image invalidation rectangle calculation when a Flip is present. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D75647
2020-05-15 23:43:42 +00:00
Christian Holler (:decoder) 9781f63d53 Bug 1635037 - Add missing fuzzing instrumentation in image/decoders/. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D73603
2020-05-08 15:18:49 +00:00
Honza Bambas bc388980de Bug 1618322 - Merge `network.preload.experimental` pref to `network.preload`, r=dragana
Depends on D70235

Differential Revision: https://phabricator.services.mozilla.com/D70526
2020-05-11 14:15:30 +00:00
Edgar Chen 3f250fba44 Bug 1618295 - Make imgRequestProxy implement and use PreloaderBase to support the preload as speculative load feature; r=tnikkel,smaug,mayhemer
Depends on D72083

Differential Revision: https://phabricator.services.mozilla.com/D69860
2020-05-11 14:43:05 +00:00
Sylvestre Ledru 1929dd1ab3 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D73347
2020-05-09 14:51:53 +00:00
Matt Woodrow fce5746949 Bug 1635992 - Pass LoadInfo into nsMixedContentBlocker::ShouldLoad. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D74168
2020-05-08 02:53:42 +00:00
Timothy Nikkel 7994dd5c2d Bug 1634839. Call UpdateState on the animation state in RasterImage::NotifyProgress. r=aosmond
Since AnimationState::UpdateState now depends on a specific frame of the animation being in the surface cache we need to call UpdateState whenever we add a new frame.

Depends on D73583

Differential Revision: https://phabricator.services.mozilla.com/D73584
2020-05-04 18:49:13 +00:00
Timothy Nikkel 9f72de06ce Bug 1634839. Teach RasterImage::NotifyDecodeComplete to deal with getting notified about new frames. r=aosmond
It takes a frame count argument but probably never gets a value we haven't already seen in a NotifyProgress call, so this doesn't fix anything as far as I know.

Depends on D73564

Differential Revision: https://phabricator.services.mozilla.com/D73583
2020-05-04 18:46:53 +00:00
Timothy Nikkel 2534a47d4f Bug 1634839. Fix img.decode for animated images that aren't in the document. r=aosmond
The img.decode promise for animated images that aren't in the document might not resolve in common cases. Specifically for animated images that have been decoded and then discarded, so that mCompositedFrameInvalid is true.

mCompositedFrameInvalid is cleared by either:
  1) the image is fully decoded and NotifyDecodeComplete is called.
  2) RequestRefresh is able to advance to the current frame.

We don't call RequestRefresh on animated images that aren't in the document and we only decode a certain number of frames ahead of the current frame (even for fully retained animation buffers), so neither of these will happen with long enough animated images.

So we need to make sure that mCompositedFrameInvalid eventually gets cleared any time a decode is requested (which the FrameAnimator gets notified about via GetCompositedFrame). We do that be calling UpdateState in GetCompositedFrame whenever mCompositedFrameInvalid is true and the image is in the surface cache.

This runs into a second problem: UpdateState uses |mIsCurrentlyDecoded = aResult.Surface().IsFullyDecoded()| to determine when to clear mCompositedFrameInvalid. As mentioned above, we don't fully decode animated images. Further, for animated images that are large enough we use a discarding animation buffer that never keeps around all the frames and so IsFullyDecoded always returns false. So we replace that with a check that we can seek to the current animated frame index.

Differential Revision: https://phabricator.services.mozilla.com/D73564
2020-05-04 18:43:32 +00:00
Simon Giesecke de7abb3989 Bug 1626570 - Improve handling of copying arrays in image/. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D73676
2020-05-06 11:54:32 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Andrew Osmond 02334060e0 Bug 1631615 - Don't color manage PNG/JPG/WebP if not tagged. r=tnikkel
It appears some websites assume we will not color manage untagged images
and encode metadata in the image's surface data. Chrome matches this
behaviour. We should probably do the same for webcompat.

Differential Revision: https://phabricator.services.mozilla.com/D73737
2020-05-04 21:51:25 +00:00
Nathan Froyd cac3b9074f Bug 1634994 - fix --disable-av1; r=tnikkel
Some files are incorrectly built/included, as well as some code, when
`--disable-av1` is passed.  Let's fix that.

Differential Revision: https://phabricator.services.mozilla.com/D73744
2020-05-04 20:30:58 +00:00
Mihai Alexandru Michis 5d7a5b9d83 Bug 1630125 - Update fuzziness for rgb24prof2.bmp r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D73547
2020-05-02 20:33:21 +00:00
Jon Bauman 2db43533f3 Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- No support for ICC profiles (bug 1634741)
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-05-01 22:56:04 +00:00
Razvan Maries 668381a470 Backed out changeset 8cb47e0e268d (bug 1625363) for causing gtest failures at ImageDecoders.AVIFSingleChunk. CLOSED TREE 2020-04-30 08:26:53 +03:00
Jon Bauman 601b2f5365 Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-04-30 01:31:17 +00:00
Bogdan Tara 606f9e2e6c Backed out changeset 9804951497f9 (bug 1625363) for bustages complaining about nsAVIFDecoder.cpp CLOSED TREE 2020-04-29 19:46:12 +03:00
Jon Bauman 1c60246bba Bug 1625363 - AVIF (AV1 Image File Format): experimental support. r=aosmond,necko-reviewers,valentin
There are many limitations currently, but this prototype should successfully
render most basic AVIF images. Known limitations:

- No support for any derived image items (crop, rotate, etc.)
- No support for alpha planes
- The primary image item must be an av01 (no grid support)
- HDR images aren't tone-mapped

Differential Revision: https://phabricator.services.mozilla.com/D68498
2020-04-29 16:30:54 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Timothy Nikkel 0eb02fa8dd Bug 1633121. Add crashtest for bug 1262549 and bug 1277397.
Differential Revision: https://phabricator.services.mozilla.com/D72524
2020-04-25 09:10:25 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Olivier Tilloy 31609f81b8 Bug 1626972 - Add missing #include directive for the use of std::function. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D69390
2020-04-07 16:07:07 +00:00
Narcis Beleuzu b1072dc7ad Bug 1619847 - update reftest annotation for pal8v4.bmp for 899 pixel difference. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D71733
2020-04-21 10:16:49 +00:00
Timothy Nikkel 3d235e9172 Bug 1631365. img.decode never fulfills or rejects if the image is too big to fit into the surface cache. r=aosmond
Since we don't support downscaling animated images we'll need something like this even we were to try to request a smaller sized decode.

Differential Revision: https://phabricator.services.mozilla.com/D71523
2020-04-20 21:04:45 +00:00
Andreea Pavel 86d843e1cc Bug 1619847 - update reftest annotation for pal8v4.bmp r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D71550
2020-04-20 13:59:59 +00:00
Christoph Kerschbaumer d2cec90777 Bug 1629876: Do not query Principal from requestingContext within MixedContentBlocker since requestingContext is null in fission world. r=smaug,baku
Differential Revision: https://phabricator.services.mozilla.com/D71008
2020-04-20 06:30:32 +00:00
Timothy Nikkel 6fe6b37c32 Bug 1629490. Add a crashtest and a mochitest. r=aosmond
The mochitest caught the issue of the second patch here so there is value in both it seems.

Differential Revision: https://phabricator.services.mozilla.com/D71484
2020-04-20 03:38:57 +00:00
Timothy Nikkel 008ffcf520 Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked.

Differential Revision: https://phabricator.services.mozilla.com/D71483
2020-04-20 03:38:40 +00:00
Timothy Nikkel 288dbdf3a5 Bug 1629490. The composited frame is now invalid for animated images that have finished. r=aosmond
This is actually a one line change. The rest is just removing unneeded parameters.

The composited frame used to be valid for animations that had finished because we saved a separate composited frame, and since the animation had finished it was the final frame, so it had to be valid to display.

Now we don't have a separate composited frame so we only have a valid frame to display if we've decoded up to the current frame. For non-finished animations RequestRefresh will clear mCompositedFrameInvalid, but for finished animations we have to clear it, the easiest place is when we know we are fully decoded.

This problem caused img.decode to never fulfill or reject because we never sent out any frame update notifications because mCompositedFrameInvalid was always false because mAnimationFinished was always true. So we didn't get the invalidation that flipping mCompositedFrameInvalid to false when a full decode finished would cause.

Differential Revision: https://phabricator.services.mozilla.com/D70838
2020-04-20 03:38:27 +00:00
Daniel Varga 0d3538392f Backed out 3 changesets (bug 1629490) fo causing reftest failures at layout/reftests/image/img-invalidation-local-transform-1.html
Backed out changeset de2ced51599d (bug 1629490)
Backed out changeset f997fe14a6a5 (bug 1629490)
Backed out changeset ba69034f5207 (bug 1629490)
2020-04-20 06:03:35 +03:00
Timothy Nikkel d265f352ce Bug 1629490. Add a crashtest and a mochitest. r=aosmond
The mochitest caught the issue of the second patch here so there is value in both it seems.

Differential Revision: https://phabricator.services.mozilla.com/D71484
2020-04-19 23:02:34 +00:00
Timothy Nikkel c176e9f9c4 Bug 1629490. In RasterImage invalidate if we get a non-empty dirty rect, don't ignore it if mFrameAdvanced is false. r=aosmond
We invalidate for more things than just frames advancing (if we are redecoding and still showing the same frame as before discarding for example). So there is no reason that the dirty rect and a frame being advanced should be linked.

Differential Revision: https://phabricator.services.mozilla.com/D71483
2020-04-19 23:01:33 +00:00
Timothy Nikkel a33a3202e6 Bug 1629490. The composited frame is now invalid for animated images that have finished. r=aosmond
This is actually a one line change. The rest is just removing unneeded parameters.

The composited frame used to be valid for animations that had finished because we saved a separate composited frame, and since the animation had finished it was the final frame, so it had to be valid to display.

Now we don't have a separate composited frame so we only have a valid frame to display if we've decoded up to the current frame. For non-finished animations RequestRefresh will clear mCompositedFrameInvalid, but for finished animations we have to clear it, the easiest place is when we know we are fully decoded.

This problem caused img.decode to never fulfill or reject because we never sent out any frame update notifications because mCompositedFrameInvalid was always false because mAnimationFinished was always true. So we didn't get the invalidation that flipping mCompositedFrameInvalid to false when a full decode finished would cause.

Differential Revision: https://phabricator.services.mozilla.com/D70838
2020-04-19 23:01:21 +00:00
Timothy Nikkel 5ac7021bc5 Bug 1630964. Increase fuzz a small amount of newly added test. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D71414
2020-04-17 23:47:59 +00:00
Cameron McCormack e91f99f8e1 Bug 1616411 - Part 7: Tests. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70277
2020-04-17 02:57:49 +00:00
Cameron McCormack 78281a4d72 Bug 1616411 - Part 6a: Make OrientedImage::GetFrameAtSize return an appropriately sized surface. r=tnikkel
We need this since nsLayoutUtils::SurfaceFromElement expects the
returned frame size to be correct, and we are now wrapping a source
element's image with an OrientedImage.

Differential Revision: https://phabricator.services.mozilla.com/D71243
2020-04-17 02:57:46 +00:00
Cameron McCormack 8ab9b44ae1 Bug 1616411 - Part 4a: Make SurfaceCache aware that native image sizes can be affected by orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70983
2020-04-17 02:57:34 +00:00
Cameron McCormack 1bb5699b04 Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-17 02:57:32 +00:00
Cameron McCormack ca0466aa78 Bug 1616411 - Part 3: Make RasterImage deal with and apply image orientation. r=tnikkel
This makes EXIF orientation metadata honored by default.

Introduce OrientedPixel and UnorientedPixel typed rects and sizes and
use them throughout RasterImage so that we don't confuse which we want.

The reason for doing this rather than having the imgLoader wrap every
RasterImage it creates with an OrientedImage is that returning the
wrapper messes with various notifications, as OrientedImage is not an
ImageResource.

(It would be even better if the JPEG decoder could decode to imgFrames
handling the EXIF orientation itself, but that's a more complicated
change.)

Differential Revision: https://phabricator.services.mozilla.com/D70273
2020-04-17 02:57:30 +00:00
Cameron McCormack b23892c97a Bug 1616411 - Part 2: Don't bother passing in the size to OrientedImage::OrientSurface. r=tnikkel
We can get the size from the surface directly.

Differential Revision: https://phabricator.services.mozilla.com/D70272
2020-04-17 02:57:22 +00:00
Cameron McCormack 75f9b3902d Bug 1616411 - Part 1: Split out some helper methods from OrientedImage. r=tnikkel
RasterImage will make use of them.

Note that there is one bug fix in this patch, which is that
OrientedImage::OrientSurface now creates a surface of the correct size.

(Previously this code was creating a surface with the underlying
image's size, rather than the correctly oriented size.  But we must
not have been calling into that code with our current uses of
OrientedImage.)

Differential Revision: https://phabricator.services.mozilla.com/D70271
2020-04-17 02:57:20 +00:00
Csoregi Natalia ea673441ce Backed out 8 changesets (bug 1616411) for webgl failures on test_2_conformance__textures__misc__texture-upload-size.html. CLOSED TREE
Backed out changeset 03dd88d53439 (bug 1616411)
Backed out changeset cfee2ce9405d (bug 1616411)
Backed out changeset 0a323c33506f (bug 1616411)
Backed out changeset 1a25353a07b0 (bug 1616411)
Backed out changeset dc64af52b5f8 (bug 1616411)
Backed out changeset 0f54b1b12105 (bug 1616411)
Backed out changeset 4dee3e753e8e (bug 1616411)
Backed out changeset 034a30a6b088 (bug 1616411)
2020-04-16 05:43:16 +03:00
Cameron McCormack 1c996b2686 Bug 1616411 - Part 7: Tests. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70277

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:46 +00:00
Cameron McCormack 54fca42d06 Bug 1616411 - Part 4a: Make SurfaceCache aware that native image sizes can be affected by orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70983

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:39 +00:00
Cameron McCormack 808783c5aa Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:31 +00:00
Cameron McCormack edd1013c3e Bug 1616411 - Part 3: Make RasterImage deal with and apply image orientation. r=tnikkel
This makes EXIF orientation metadata honored by default.

Introduce OrientedPixel and UnorientedPixel typed rects and sizes and
use them throughout RasterImage so that we don't confuse which we want.

The reason for doing this rather than having the imgLoader wrap every
RasterImage it creates with an OrientedImage is that returning the
wrapper messes with various notifications, as OrientedImage is not an
ImageResource.

(It would be even better if the JPEG decoder could decode to imgFrames
handling the EXIF orientation itself, but that's a more complicated
change.)

Differential Revision: https://phabricator.services.mozilla.com/D70273

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:29 +00:00
Cameron McCormack 2ed202c917 Bug 1616411 - Part 2: Don't bother passing in the size to OrientedImage::OrientSurface. r=tnikkel
We can get the size from the surface directly.

Differential Revision: https://phabricator.services.mozilla.com/D70272

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:26 +00:00
Cameron McCormack 4038aaae51 Bug 1616411 - Part 1: Split out some helper methods from OrientedImage. r=tnikkel
RasterImage will make use of them.

Note that there is one bug fix in this patch, which is that
OrientedImage::OrientSurface now creates a surface of the correct size.

(Previously this code was creating a surface with the underlying
image's size, rather than the correctly oriented size.  But we must
not have been calling into that code with our current uses of
OrientedImage.)

Differential Revision: https://phabricator.services.mozilla.com/D70271

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:19 +00:00
Emilio Cobos Álvarez 30c6b93dd7 Bug 1625786 - Fix HTMLImageElement.currentSrc when we share the underlying blob image data. r=tnikkel
This fixes the web-observable bits, but still not the context menu. Patch
incoming for that.

Differential Revision: https://phabricator.services.mozilla.com/D70936

--HG--
extra : moz-landing-system : lando
2020-04-15 14:49:45 +00:00
alwu 2b9f31eaf9 Bug 1628929 - part2 : use a strong reference to hold a `imgINotificationObserver`. r=agi
Currently, `NotificationObserverWrapper` would leak because no one delete it. When clearing the weak pointer in `ImageDecoderListener`, that won't destroy `NotificationObserverWrapper` itself, but only destroy the `WeakReference<NotificationObserverWrapper>`.

Therefore, we should remove `NotificationObserverWrapper` and use a strong reference to hold `imgINotificationObserver` directly.

Differential Revision: https://phabricator.services.mozilla.com/D70569

--HG--
extra : moz-landing-system : lando
2020-04-14 18:17:08 +00:00
Mihai Alexandru Michis c4eb715e49 Backed out changeset b4fe683e333a (bug 1629860) for causing multiple failures.
CLOSED TREE
2020-04-14 20:12:06 +03:00
Christoph Kerschbaumer 00e7f8af07 Bug 1629860: Remove superfluous argument aRequestingLocation from nsMixedContentBlocker::ShouldLoad. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D70854

--HG--
extra : moz-landing-system : lando
2020-04-14 15:40:23 +00:00
Bogdan Tara a91b9af65a Backed out changeset 59e37bc27b66 (bug 1629860) for bustages complaining about nsMixedContentBlocker.cpp CLOSED TREE 2020-04-14 17:46:01 +03:00
Christoph Kerschbaumer 31437449a6 Bug 1629860: Remove superfluous argument aRequestingLocation from nsMixedContentBlocker::ShouldLoad. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D70854

--HG--
extra : moz-landing-system : lando
2020-04-14 13:35:42 +00:00
Emilio Cobos Álvarez 6fa211e927 Bug 1627585 - Add a test for animated CSS images. r=tnikkel
This tests this bug and the "canvas propagated to background" one.

Differential Revision: https://phabricator.services.mozilla.com/D70651

--HG--
extra : moz-landing-system : lando
2020-04-14 12:36:04 +00:00
Edgar Chen 869ca5daa1 Bug 1629653 - Remove unused argument from ImageCacheKey::GetSpecialCaseDocumentToken; r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70729

--HG--
extra : moz-landing-system : lando
2020-04-13 20:50:19 +00:00
Andrew Osmond c4a761420a Bug 1620522 - Increase fuzz on BMP color managed reftest.
Differential Revision: https://phabricator.services.mozilla.com/D70677

--HG--
extra : moz-landing-system : lando
2020-04-13 12:25:10 +00:00
Timothy Nikkel 41d66a8b53 Bug 1628606. Make sure to mark the surface cache entry available before sending the frame complete notification. r=aosmond
We use FRAME_UPDATE and FRAME_COMPLETE notifications to check if we should resolve/reject img.decode promises. But all of the FRAME_UPDATE/FRAME_COMPLETE notifications for image/test/crashtests/1443232-1.gif come before we change the surface cache entry from a placeholder to available. So RequestDecodeForSize returns false and we don't resolve and we don't get anymore notifications.

In this case the DECODE_COMPLETE notifications comes after we mark the surface cache entry as available so checking if we should resolve for DECODE_COMPLETEs would also work, but it seems reasonable for consumers to expect that they can get a frame after getting a FRAME_COMPLETE notification for it.

Differential Revision: https://phabricator.services.mozilla.com/D70312

--HG--
extra : moz-landing-system : lando
2020-04-09 13:17:40 +00:00
Edgar Chen 40ade72706 Bug 1628727 - Stop using nsISupports as argument type in some functions of imgLoader; r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70387

--HG--
extra : moz-landing-system : lando
2020-04-10 21:14:49 +00:00
Noemi Erli 91e2985a09 Backed out changeset 27d94573975d (bug 1628727) for causing build bustages in imgRequest.cpp CLOSED TREE 2020-04-11 00:03:57 +03:00
Edgar Chen 4f03b7c3ce Bug 1628727 - Stop using nsISupports as argument type in some functions of imgLoader; r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70387

--HG--
extra : moz-landing-system : lando
2020-04-10 00:00:12 +00:00
Andrew Osmond da72652618 Bug 1620600 - Add flags to allow image decoders to produce sRGB output. r=tnikkel
Currently we can only use the gfx.color_management.force_srgb pref to
force all images to sRGB, or just accept device space. It would be nice
to be able to test device space in our tests, as well as sRGB. This
patch adds a surface flag which allows us to selectively output sRGB.

This will also be useful for clipboard and re-encoding purposes, since
they want a neutral output. In an ideal world we would just output the
color profile and the pixel data in the original color space, but for
now this is a relatively simple approach that works on all platforms and
interops well with all applications.

Differential Revision: https://phabricator.services.mozilla.com/D65734

--HG--
extra : moz-landing-system : lando
2020-04-10 16:26:33 +00:00
Timothy Nikkel a769d2a630 Bug 1628532. Don't use WillDrawOpaqueNow in OrientedImage::GetFrame. r=aosmond
WillDrawOpaqueNow tries to answer the question "if Draw is called on this image 'pretty soon' from now will it draw something opaque (so I know if I can cull stuff behind it for painting)".

But OrientedImage wants "is the frame I have right now opaque (so I can choose the right format for a surface I'm trying to draw the flipped image into)".

Bug 1260324 replaces imgIContainer::IsOpaque with WillDrawOpaquaNow, but it should have considered this case a bit more.

RasterImage::GetFrame already checks if the surface is finished before returning, and we have the format on the returned frame, so we don't need anything complicated here.

Differential Revision: https://phabricator.services.mozilla.com/D70303

--HG--
extra : moz-landing-system : lando
2020-04-09 13:17:33 +00:00
Timothy Nikkel c3b100108c Bug 1470350. Enable delaytest.html tests again. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70105

--HG--
extra : moz-landing-system : lando
2020-04-09 08:36:40 +00:00
Timothy Nikkel 0d0ddcd3e5 Bug 1470350. Wait for MozReftestInvalidate event in delaytest.html and then wait for the animated image to complete. r=emilio
Just waiting for the load event of the image doesn't even mean the image has been painted at all yet, but by the time MozReftestInvalidate fires the first frame should be guaranteed to have been painted.

Also, switch to using new img.decode api. img.decode will decode an animated version of the img, whereas drawing to a canvas will kick off a first frame only decode which the page can't use.

Differential Revision: https://phabricator.services.mozilla.com/D70104

--HG--
extra : moz-landing-system : lando
2020-04-09 08:36:33 +00:00
Timothy Nikkel 6ed7c3056e Bug 1470350. Fix delaytest.html tests to compare to an html document instead of just an image. r=emilio
Loading just the image results in "theatre mode" display of the image (centered, dark background). But the test needs to be in an html document. We either changed how top level images were displayed or stopped using a style sheet in reftests that displayed images like this since the tests were last enabled.

Differential Revision: https://phabricator.services.mozilla.com/D70103

--HG--
extra : moz-landing-system : lando
2020-04-09 08:36:20 +00:00
Stefan Hindli e2003e251b Backed out 3 changesets (bug 1470350) for reftest failures in image/test/crashtests/delaytest.html?523528-1.gif CLOSED TREE
Backed out changeset 78dfbdcb7eea (bug 1470350)
Backed out changeset 01aae64a6b4b (bug 1470350)
Backed out changeset 8fa4c531ab77 (bug 1470350)
2020-04-08 04:08:59 +03:00
Timothy Nikkel 772d2f3c88 Bug 1470350. Enable delaytest.html tests again. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70105

--HG--
extra : moz-landing-system : lando
2020-04-08 00:20:39 +00:00
Timothy Nikkel d9027714b1 Bug 1470350. Wait for MozReftestInvalidate event in delaytest.html and then wait for the animated image to complete. r=emilio
Just waiting for the load event of the image doesn't even mean the image has been painted at all yet, but by the time MozReftestInvalidate fires the first frame should be guaranteed to have been painted.

Also, switch to using new img.decode api. img.decode will decode an animated version of the img, whereas drawing to a canvas will kick off a first frame only decode which the page can't use.

Differential Revision: https://phabricator.services.mozilla.com/D70104

--HG--
extra : moz-landing-system : lando
2020-04-08 00:23:59 +00:00
Timothy Nikkel 076552a89f Bug 1470350. Fix delaytest.html tests to compare to an html document instead of just an image. r=emilio
Loading just the image results in "theatre mode" display of the image (centered, dark background). But the test needs to be in an html document. We either changed how top level images were displayed or stopped using a style sheet in reftests that displayed images like this since the tests were last enabled.

Differential Revision: https://phabricator.services.mozilla.com/D70103

--HG--
extra : moz-landing-system : lando
2020-04-08 00:20:16 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

Differential Revision: https://phabricator.services.mozilla.com/D67635

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:07 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Andreas Farre 63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

Differential Revision: https://phabricator.services.mozilla.com/D67631

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Emilio Cobos Álvarez 4b9fdf3d73 Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

Differential Revision: https://phabricator.services.mozilla.com/D69828

--HG--
extra : moz-landing-system : lando
2020-04-06 18:57:36 +00:00
Cosmin Sabou d557e2ed22 Backed out 3 changesets (bug 1627707) for build bustages @ mozilla::net::LoadInfo.
Backed out changeset 65d6a90651ce (bug 1627707)
Backed out changeset 378ec30d9979 (bug 1627707)
Backed out changeset 058a19e11b06 (bug 1627707)
2020-04-06 20:07:04 +03:00
Emilio Cobos Álvarez 97872f2fee Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

Differential Revision: https://phabricator.services.mozilla.com/D69828

--HG--
extra : moz-landing-system : lando
2020-04-06 16:00:43 +00:00
Anders S 6b5a6aead2 Bug 1622661 - Removed 'else' after 'return'. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68998

--HG--
extra : moz-landing-system : lando
2020-03-31 19:27:35 +00:00
Andrea Marchesini 7400947ea3 Bug 1625568 - Add compatibility heuristics to third-party cookie blocking - part 5 - extra code to enable heuristics, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D69355

--HG--
extra : moz-landing-system : lando
2020-04-02 14:59:44 +00:00
Christoph Kerschbaumer cc0919a14b Bug 1625918: Remove superfluous null checks for mLoadInfo within Necko. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68790

--HG--
extra : moz-landing-system : lando
2020-04-01 06:58:13 +00:00
Chris Peterson f749ec9f1f Bug 1625828 - Replace MOZ_MUST_USE with [[nodiscard]] in image. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68746

--HG--
extra : moz-landing-system : lando
2020-03-30 05:34:51 +00:00
Cameron McCormack de27b9bf00 Bug 1625797 - Replace RasterImage nsIProperties impl with accessors for hotspot coordinate. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68737

--HG--
extra : moz-landing-system : lando
2020-03-31 21:16:39 +00:00
Honza Bambas 052f8ccd60 Bug 1625770 - Qualify image::Decoder in image gtests, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68722

--HG--
extra : moz-landing-system : lando
2020-03-30 13:09:51 +00:00
Oana Pop Rus cb4fa960a7 Backed out changeset 903f141a89b9 (bug 1625797) for build bustages in Image.h on a CLOSED TREE
--HG--
extra : amend_source : 0d6a6cf13c97b91c263188df07e6975c341f7f81
2020-03-30 07:44:01 +03:00
Cameron McCormack 1487c292cc Bug 1625797 - Replace RasterImage nsIProperties impl with accessors for hotspot coordinate. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68737

--HG--
extra : moz-landing-system : lando
2020-03-30 02:29:27 +00:00
sonakshi b204bf50aa Bug 1551306 - Remove context parameter from nsIProgressEventSink.onProgress() and nsIProgressEventSink.onStatus() r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68235

--HG--
extra : moz-landing-system : lando
2020-03-29 19:18:56 +00:00
Cosmin Sabou 79929c6462 Backed out changeset ad4847d17298 (bug 1551306) for causing build bustages. CLOSED TREE 2020-03-27 20:24:17 +02:00