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

3949 Коммитов

Автор SHA1 Сообщение Дата
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
sonakshi 145046fde2 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-27 17:57:10 +00:00
Simon Giesecke d3deabac64 Bug 1613363 - Maybe<T> should preserve trivial copy-constructability and destructability of T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68173

--HG--
extra : moz-landing-system : lando
2020-03-27 14:22:51 +00:00
Mihai Alexandru Michis c1256a18a6 Backed out changeset d91e4acdd63c (bug 1551306) for causing bustages in request::InitBitsRequest
CLOSED TREE
2020-03-27 16:12:47 +02:00
sonakshi b5f7fb3be7 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-27 14:05:02 +00:00
Chris Fronk d5b004443b Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
Boris Zbarsky 4e0a47195b Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 04:25:34 +00:00
Arthur Iakab 6990ddf5e2 Backed out changeset e6e5816403d9 (bug 1620600) for causing Gtest failures.
CLOSED TREE
2020-03-12 04:44:59 +02:00
Mihai Alexandru Michis 795c7787a3 Backed out changeset 3552ac882d4f (bug 1621835) for causing bustages.
CLOSED TREE
2020-03-12 04:15:33 +02:00
Boris Zbarsky e5766424b8 Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 01:46:16 +00:00
Andrew Osmond 5c7e1dd283 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-03-12 00:37:53 +00:00
shindli b02b3a6e1a Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk a27e438c2d Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Ehsan Akhgari cde7e014c2 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 23:36:39 +00:00
Ehsan Akhgari 5200d034f5 Bug 1620322 - Part 8: Rename AntiTrackingCommon to ContentBlocking; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65821

--HG--
rename : toolkit/components/antitracking/AntiTrackingCommon.cpp => toolkit/components/antitracking/ContentBlocking.cpp
rename : toolkit/components/antitracking/AntiTrackingCommon.h => toolkit/components/antitracking/ContentBlocking.h
extra : moz-landing-system : lando
2020-03-09 23:36:39 +00:00
Narcis Beleuzu 0186cbe565 Backed out 8 changesets (bug 1620322) for bustages on nsContentSink.cpp . CLOSED TREE
Backed out changeset f41739c64dff (bug 1620322)
Backed out changeset be942a7f329e (bug 1620322)
Backed out changeset a916987c7c71 (bug 1620322)
Backed out changeset ead3484ffb5f (bug 1620322)
Backed out changeset 4e1e8b9afa1a (bug 1620322)
Backed out changeset 473bba698e5a (bug 1620322)
Backed out changeset 0e5e5d41597d (bug 1620322)
Backed out changeset 31b24d79db3d (bug 1620322)

--HG--
rename : toolkit/components/antitracking/ContentBlockingLog.cpp => dom/base/ContentBlockingLog.cpp
rename : toolkit/components/antitracking/ContentBlockingLog.h => dom/base/ContentBlockingLog.h
rename : toolkit/components/antitracking/ContentBlocking.cpp => toolkit/components/antitracking/AntiTrackingCommon.cpp
rename : toolkit/components/antitracking/ContentBlocking.h => toolkit/components/antitracking/AntiTrackingCommon.h
2020-03-09 22:18:36 +02:00
Ehsan Akhgari 8530d61140 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 18:12:42 +00:00
Ehsan Akhgari 5045d313c2 Bug 1620322 - Part 8: Rename AntiTrackingCommon to ContentBlocking; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65821

--HG--
rename : toolkit/components/antitracking/AntiTrackingCommon.cpp => toolkit/components/antitracking/ContentBlocking.cpp
rename : toolkit/components/antitracking/AntiTrackingCommon.h => toolkit/components/antitracking/ContentBlocking.h
extra : moz-landing-system : lando
2020-03-09 18:12:40 +00:00
Noemi Erli a48fac9e3b Backed out 8 changesets (bug 1620322) for causing bustages in ContentBlockingLog.cpp CLOSED TREE
Backed out changeset 3dcf513e36cb (bug 1620322)
Backed out changeset 46714855ce1d (bug 1620322)
Backed out changeset 0eb2b5f7322f (bug 1620322)
Backed out changeset 72d640fa0740 (bug 1620322)
Backed out changeset 4533bb4e5177 (bug 1620322)
Backed out changeset 659270edd419 (bug 1620322)
Backed out changeset 6802c18b1914 (bug 1620322)
Backed out changeset 60ff34db9f15 (bug 1620322)

--HG--
rename : toolkit/components/antitracking/ContentBlockingLog.cpp => dom/base/ContentBlockingLog.cpp
rename : toolkit/components/antitracking/ContentBlockingLog.h => dom/base/ContentBlockingLog.h
rename : toolkit/components/antitracking/ContentBlocking.cpp => toolkit/components/antitracking/AntiTrackingCommon.cpp
rename : toolkit/components/antitracking/ContentBlocking.h => toolkit/components/antitracking/AntiTrackingCommon.h
2020-03-09 19:19:41 +02:00
Ehsan Akhgari 271a1e1e51 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 10:23:30 +00:00
Ehsan Akhgari 1195c302a4 Bug 1620322 - Part 8: Rename AntiTrackingCommon to ContentBlocking; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65821

--HG--
rename : toolkit/components/antitracking/AntiTrackingCommon.cpp => toolkit/components/antitracking/ContentBlocking.cpp
rename : toolkit/components/antitracking/AntiTrackingCommon.h => toolkit/components/antitracking/ContentBlocking.h
extra : moz-landing-system : lando
2020-03-09 10:23:07 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Andrew Osmond 5b52ff522e Bug 1619946 - Ensure PNG decoder does not recreate sRGB transforms unnecessarily. r=tnikkel
In the PNG decoder, when an image is tagged as sRGB, we create a new
sRGB profile, and a new transform to map that to device space. Creating
a transform is fairly expensive, and we already cache sRGB to device
space transforms in gfxPlatform. This patch ensures that we use the
cached transforms instead. It should be noted that we ignore the intent
from the sRGB tag; nominally we could transform differently as a result
of that, but qcms does not actually implement any of that.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 11:51:15 +00:00
Andrew Osmond be28b4e1e5 Bug 1619249 - Upgrade to BMPSuite 2.6. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D64973

--HG--
rename : image/test/reftest/bmp/bmpsuite/q/rgba32.bmp => image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp
extra : moz-landing-system : lando
2020-03-02 19:17:19 +00:00
Simon Giesecke 7d128654e9 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in image. r=tnikkel
Depends on D65288

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

--HG--
extra : moz-landing-system : lando
2020-03-04 09:09:43 +00:00
Tim Huang 04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

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

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Andrew Osmond 5ee82cb26c Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel
This patch adds support for color management in BMPs added in
BITMAPV4HEADER and BITMAPV5HEADER. While display of BMPs is relatively
rare this comes in handy when interacting with the Windows clipboard.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 14:16:00 +00:00
Dorel Luca 284433eb29 Backed out changeset 388ac5609ceb (bug 1615394) for MinGW build bustage. CLOSED TREE
--HG--
extra : amend_source : cf3cec59ae1efd99b9de0d19b7a09c135138daf5
2020-03-03 13:02:04 +02:00
Andrew Osmond 97a2bca5b9 Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel
This patch adds support for color management in BMPs added in
BITMAPV4HEADER and BITMAPV5HEADER. While display of BMPs is relatively
rare this comes in handy when interacting with the Windows clipboard.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 23:49:37 +00:00
Emilio Cobos Álvarez 326534f0c8 Bug 1619245 - Associate image to display item at paint time rather than at construction time. r=tnikkel
On some RDL situations we may create the new item, then destroy the old one
afterwards.

When this is the order of operations, the image would end up unregistered, and
thus not invalidating the canvas frame.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 02:19:59 +00:00
Andrew Osmond 127fcd7b52 Bug 1255105 - Use SurfacePipe in the BMP decoder. r=tnikkel
This patch converts the BMP decoder to use SurfacePipe instead of using
AllocateFrame and Downscaler directly. As a result, it now uses the
accelerated premultiplication path, honours the
SurfaceFlags::NO_PREMULTIPLY_ALPHA flag, and allows for a path forward
to support color management and clipboard better.

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

--HG--
extra : moz-landing-system : lando
2020-03-02 23:24:12 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Andrew Osmond 9e0d8ccbf5 Bug 1617880 - Make RecyclingSourceSurface use NotNull for member pointers. r=tnikkel
We are seeing some crash reports with RecyclingSourceSurface containing
null pointers in the signature. The proto signature doesn't make any
sense however. Let's use NotNull to reassure ourselves that there isn't
something going wrong when we create RecyclingSourceSurface.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 17:20:43 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Chris Martin 726cba0bb5 Bug 1540776 - Change CMSOutputProfile functions to return nsArray r=gcp
Currently, the GetCMSOutputProfile() and related methods pass their output
using the old C-style "ptr, len" parameters. This makes them more difficult
to deal with later in this change when they need to be safely passed over IPC.

This refactors them to return nsTArray<uint8_t> results instead. I also
removed some old cruft and refactored the existing code.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 21:27:53 +00:00
Andrew Halberstadt 4d752c4ca7 Bug 1616368 - [reftest] Replace 'default-preferences' with 'defaults' r=dbaron
With the new 'defaults' key being added, 'default-preferences' is now
redundant. This commit converts all existing uses of 'default-preferences' to
use 'defaults' instead.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 18:47:54 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Sebastian Streich 891b2aa719 Bug 1614959 - Remove ReqLocation in imgLoader r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62595

--HG--
extra : moz-landing-system : lando
2020-02-17 13:58:06 +00:00
Andrew Osmond 2df60fe00f Bug 1615539 - Fix explicit image memory reporting broken on Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D62899

--HG--
extra : moz-landing-system : lando
2020-02-14 13:02:41 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Sebastian Streich ac5daf49e7 Bug 1594766: Respect Nosniff header for empty content-types r=ckerschb
Backed out changeset 35436d4e7917

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

--HG--
extra : moz-landing-system : lando
2020-02-12 16:20:46 +00:00
Kristen Wright cc862d2d30 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

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

--HG--
extra : source : 541b98270c9985c5bd3569ff3ff8bc6c3d3c650a
2020-02-11 21:01:56 +00:00
Ciure Andrei 0ddf5384e0 Backed out changeset 541b98270c99 (bug 1539944) for causing bc leaks CLOSED TREE 2020-02-12 03:23:15 +02:00
Kristen Wright e40c296db4 Bug 1539944 - Get rid of NS_NewThread r=froydnj
Gets rid of `NS_NewThread`. Where it was used in testing, I gave the new named threads names relevant to their tests.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 21:01:56 +00:00
Emilio Cobos Álvarez 006e5cca66 Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.

But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().

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

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:20 +00:00
Emilio Cobos Álvarez d7841a5f17 Bug 1614208 - Remove some include dependencies in nsStyleConsts.h. r=jfkthame,jgilbert
We include it everywhere because it's included from gfxTypes.h.

This should avoid including all the generated bindings _everywhere_.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:37 +00:00
Andrew Osmond 52c022a178 Bug 1612589 - Improve image memory reporting even further. r=tnikkel
This patch adds reporting the surface types used by the image frame in a
bit mask (such if it is a CAPTURE including a DATA_SHARED, the mask will
be 1 << CAPTURE | 1 << DATA_SHARED), as well as an estimated size
included in the report as decoded-unknown for when we do not know if the
surface is on the heap or the non-heap specifically. This is the default
implementation for a SourceSurface as well, so we should no longer have
the case where surfaces appear empty despite being in the cache. It also
makes requests being validated as always notable for reporting purposes.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 22:22:13 +00:00
Andrew Osmond 4130525818 Bug 1611127 - Fix how images with optimized surfaces may go missing on Windows. r=tnikkel
On Windows, optimized surfaces can become invalid due to a device reset
or GPU process crash when D2D draw targets were being used. This is
because SourceSurfaceD2D1 checks if the D2D context has changed from the
one it was optimized for.

We assumed when creating a DrawableFrameRef that if we don't have
imgFrame::mRawSurface, then we must have an imgFrame::mOptSurface. This
is incorrect and causes SurfaceCache to believe it has a valid
DrawableSurface, even if the underlying optimized surface cannot be used
for drawing (or has already been freed).

If we can't draw the image, it goes missing from the screen. But since
the cache thinks it has a valid surface, we never actually redecode it.
With this patch, we now check if the imgFrame::mOptSurface has been
freed already, and if not, that it remains valid for drawing purposes.
If either condition is true, the SurfaceCache entry will be removed,
thus permitting a redecode attempt.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 22:19:40 +00:00
Gijs Kruitbosch c229dbc8a1 Bug 1526731 - handle image.http.accept pref inside netwerk instead of forcing all consumers to do the same dance, r=valentin,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D60568

--HG--
extra : moz-landing-system : lando
2020-01-23 08:36:48 +00:00
pbz c5cd6f9c64 Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59695

--HG--
extra : moz-landing-system : lando
2020-01-22 10:45:15 +00:00
Andrew Osmond bf8cd36674 Bug 1610381 - Part 3. Improve image memory reporting by including validation state. r=jrmuizel
This patch adds an annotation to an image cache entry if it is in the
process of being validated. This is very useful to know when debugging
missing images because state notifications are suppressed when we are
validating and may prevent the image from being displayed.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 16:32:11 +00:00
Andrew Osmond 3fb86e5d59 Bug 1610381 - Part 2. Improve image memory reporting with more state information. r=jrmuizel
This patch adds error and progress tracker states to the memory dump. It
also now will include requests that have yet to create an image, and
fills in what information it is able to without it (such as URI, error
and progress tracker states).

Additionally the notability of an image has changed. If there are any
errors, missing progress trackers, or incomplete surfaces, they will
also now be notable. This is a departure from just the memory footprint.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 14:39:59 +00:00
Andrew Osmond da3cf4fd77 Bug 1610381 - Improve image memory reporting for missing/incomplete surfaces. r=tnikkel
This dumps more information about the surface cache. Each surface has a
flag indicating whether or not it has finished decoding; incomplete
surfaces are now marked as such in the cache reports. We now also have
counters for various insertion errors, as well as the composition of the
cache (total vs locked images, total vs locked surfaces).

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:59:15 +00:00
Ehsan Akhgari 3f9530ed27 Bug 1588980 - Part 1: Hide HTMLCanvasElement.mozGetAsFile behind a preference; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60283

--HG--
extra : moz-landing-system : lando
2020-01-20 22:03:13 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Emilio Cobos Álvarez 5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Cosmin Sabou 38f8a8661d Backed out 2 changesets (bug 1588980) for mochitest failures on dom/canvas/test/mochitest.ini.
Backed out changeset dc0733b283e7 (bug 1588980)
Backed out changeset aaff3fef7fd6 (bug 1588980)

--HG--
extra : rebase_source : 2ec145cfc7d648cf78b927cce22210070ef579a2
2020-01-20 18:06:11 +02:00
Ehsan Akhgari 6ba1137eeb Bug 1588980 - Part 1: Hide HTMLCanvasElement.mozGetAsFile behind a preference; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60283

--HG--
extra : moz-landing-system : lando
2020-01-18 05:06:25 +00:00
Emilio Cobos Álvarez e076e40ab1 Bug 1610165 - Failing to insert an SVG into the surface cache continuously repaints the image. r=tnikkel
I was poking at the missing images bug by dropping cache sizes and such and
found that we always ended up repainting some SVGs over and over. This seems to
be the cause. When we fail to insert into the cache we still end up notifying
over and over (because we forget to say aWillCache=false), so we'd end up
repainting, and failing again, etc.

This is easy to see adding some logging to
nsDisplayBackgroundImage::PaintInternal.

Any ideas as to how to add a test for it?

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

--HG--
extra : moz-landing-system : lando
2020-01-19 23:02:52 +00:00
Edwin Takahashi 1c7bbf914b Bug 1608582 - tighten reftest annotation, part 1 r=jmaher
Changes:

Tighten reftest pixel differences now that reftest has been migrated fully over to ubuntu1804.

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

--HG--
extra : moz-landing-system : lando
2020-01-11 12:32:27 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Valentin Gosu c7d9b630cb Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

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

--HG--
extra : moz-landing-system : lando
2020-01-07 20:20:38 +00:00
Andrew Osmond c34bf035c8 Bug 1602710 - Do not shut down threads not found in the image decode thread pool. r=tnikkel
We should not attempt to shut down threads which we did not explicitly
remove from the image decode thread pool, when we want to shut down an
idle thread or otherwise. This behaviour would put us at risk of
shutting down a thread twice, which may trip assertions and/or cause
other issues. Now we assuming that any thread that is already removed
from the pool array has already been gracefully shutdown.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 23:40:08 +00:00
Andrew Osmond dc7128f82b Bug 1516761 - Only use OS_RGBA for the first frame of animated GIFs. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D58821

--HG--
extra : moz-landing-system : lando
2020-01-06 19:03:41 +00:00
Andrew Osmond 73ee861def Bug 1604535 - Avoid copying image surfaces when used with OMTP. r=tnikkel
When one uses SourceSurfaceRawData to wrap a data pointer, it will
perform a copy of said data if GuaranteePersistence is called. This is
done for DrawTargetCapture, which is used with OMTP. Prior to this
patch, image surfaces would be wrapped by a SourceSurfaceRawData when
using the basic compositor on any non-Linux platform (since Linux does
not support volatile memory). This means every time imgFrame::Draw is
called with OMTP, a copy of the image will be made. Images don't need
this property since the data is already going to persist, so this patch
adds a new class SourceSurfaceMappedData, which takes a ScopedMap
keeping the underlying surface open and readable.

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

--HG--
extra : moz-landing-system : lando
2019-12-25 21:27:46 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Tyler ea8b8dab8a Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-18 21:46:51 +00:00
Jean-Yves Avenard dd4db4a4b5 Bug 1598497 - P2. Have the canceled attribute only if explicitly canceled. r=mayhemer.
Previously, GetCancelled() would have return true should the channel's status was an error.
Doing Cancel(NS_OK) for example, would have made a follow-up call to GetCancelled() return false. However, we can assert that such a call would have been a bug.

Following this change GetCancelled() will only return true if Cancel() was explicitly called.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 05:20:07 +00:00
Jean-Yves Avenard b1be794e1b Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:13:26 +00:00
Noemi Erli 58bf47752e Backed out 2 changesets (bug 1598497) for causing OSX build bustages CLOSED TREE
Backed out changeset 3b31bbf74a5f (bug 1598497)
Backed out changeset 81beebdc2202 (bug 1598497)
2019-12-18 01:54:56 +02:00
Jean-Yves Avenard 653fbeaf3a Bug 1598497 - P2. Have the canceled attribute only if explicitly canceled. r=mayhemer.
Previously, GetCancelled() would have return true should the channel's status was an error.
Doing Cancel(NS_OK) for example, would have made a follow-up call to GetCancelled() return false. However, we can assert that such a call would have been a bug.

Following this change GetCancelled() will only return true if Cancel() was explicitly called.

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

--HG--
extra : moz-landing-system : lando
2019-12-17 23:21:55 +00:00
Jean-Yves Avenard c63570cb58 Bug 1598497 - P1. move canceled attribute to nsIChannel. r=mayhemer
There is no functional change with this commit. The default implementation for GetCanceled() is still to check if the status code is a failure.

However, it can be argued that as you had to call Cancel() on the nsIChannel, having to check the nsIHttpChannelInternal interface to determine if you had been canceled in the past was rather a non obvious path.

It makes more sense to check the nsIChannel interface to determine if it's been canceled already and this allows for finer granularity if needed in the future.

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

--HG--
extra : moz-landing-system : lando
2019-12-17 23:21:46 +00:00
Hiroyuki Ikezoe 4b150fda20 Bug 1603933 - Use Date.now() instead of DocumentTimeline.currentTime. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D57213

--HG--
extra : moz-landing-system : lando
2019-12-14 22:34:19 +00:00
Hiroyuki Ikezoe 8e9dea3aa5 Bug 1603744 - Make test_animated_gif.html reliable. r=tnikkel
Now the test runs following steps;

1) Start the test
2) Set iframe's src attribute to load the iframe document
3) Waits for a `loadComplete` message from the iframe
4) Waits 1 second to make sure `decodeComplete` doesn't happen in the iframe

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

--HG--
extra : moz-landing-system : lando
2019-12-14 00:30:09 +00:00
Jeff Walden e57173377f Bug 1439659 - Make |MOZ_{LITTLE,BIG}_ENDIAN| into function macros so that invoking them inside |#if| conditions when they haven't been defined yet is a compile error. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57038

--HG--
extra : moz-landing-system : lando
2019-12-13 20:51:04 +00:00
Kris Maglione 94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Hiroyuki Ikezoe 99e39cdefa Bug 1577084 - A mochitest to make sure images outside of display port is not decoded. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D57090

--HG--
extra : moz-landing-system : lando
2019-12-13 12:36:52 +00:00
Cameron McCormack 7d20996c2c Bug 1598480 - Test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57019

--HG--
extra : moz-landing-system : lando
2019-12-13 02:04:07 +00:00
Cameron McCormack 9115e99eb4 Bug 1598480 - Make SVG images respond to theme changes. r=tnikkel,emilio
Differential Revision: https://phabricator.services.mozilla.com/D56156

--HG--
extra : moz-landing-system : lando
2019-12-13 02:04:07 +00:00
Andreas Farre 9dcf7d5237 Bug 1561715 - Part 1: Remove unused functionality in SchedulerGroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55638

--HG--
extra : moz-landing-system : lando
2019-12-11 14:48:41 +00:00
shindli 91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00