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

3760 Коммитов

Автор SHA1 Сообщение Дата
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