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

4430 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang 8f95e3fca6 Bug 1808323 - Add telemetry for the page load time and the time to first paint for sites that supports Early Hints response, r=manuel,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D165966
2023-05-02 08:08:44 +00:00
Timothy Nikkel 9d0226a146 Bug 1823375. Fix all variable shadowing warnings in imagelib. r=Zaggy1024,gfx-reviewers,nical
We can't actually enable the warning because there are some warnings generated by includes coming from outside of imagelib.

Note that change in AOMDecoder::Init is actually a behaviour change: the new behaviour is to return the error code if we fail to decode the alpha image. This matches what we do for the dav1d decoder.

Depends on D173000

Differential Revision: https://phabricator.services.mozilla.com/D173001
2023-04-11 08:06:29 +00:00
Nika Layzell d57c9498f6 Bug 1825360 - Remove the NS_DISPATCH_SYNC flag, r=necko-reviewers,geckoview-reviewers,media-playback-reviewers,karlt,jesup,m_kato,emilio
This flag is not supported by most event targets and can have unexpected
side effects (namely spinning a nested event loop). All consumers have
been replaced with a new function which is more explicit about this side
effect.

Differential Revision: https://phabricator.services.mozilla.com/D173985
2023-03-30 16:53:51 +00:00
Otto Länd 314123012b Bug 1276351: apply code formatting via Lando
# ignore-this-changeset
2023-03-27 07:23:36 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Timothy Nikkel 2f85ec68a3 Bug 1823614. Limit the number of scans we allow in jpeg images to some finite value. r=gfx-reviewers,bradwerth a=reland
We want to provide some finite limit to prevent small jpeg files from being able to tie up cpus for a much larger time than their small size would normally allow. We want to choose a number high enough so that no sane jpeg file would approach it, unless it had been crafted to take advantage of this problem.

Skia's jpeg decoder limit's it to 100:

https://searchfox.org/mozilla-central/rev/f078cd02746b29652c134b144f0629d47e378166/gfx/skia/skia/src/codec/SkJpegDecoderMgr.cpp#33

The OSS_Fuzz targets for libjpeg-turbo limit it to 500:

https://bugzilla.mozilla.org/show_bug.cgi?id=1252196#c11

Differential Revision: https://phabricator.services.mozilla.com/D173120
2023-03-25 01:46:53 +00:00
Iulian Moraru 0b75230e48 Backed out changeset 9e5254e7728e (bug 1823614) for causing reftest failures on pattern-transformed. CLOSED TREE 2023-03-25 05:23:27 +02:00
Timothy Nikkel 6a90e1f8f5 Bug 1823614. Limit the number of scans we allow in jpeg images to some finite value. r=gfx-reviewers,bradwerth
We want to provide some finite limit to prevent small jpeg files from being able to tie up cpus for a much larger time than their small size would normally allow. We want to choose a number high enough so that no sane jpeg file would approach it, unless it had been crafted to take advantage of this problem.

Skia's jpeg decoder limit's it to 100:

https://searchfox.org/mozilla-central/rev/f078cd02746b29652c134b144f0629d47e378166/gfx/skia/skia/src/codec/SkJpegDecoderMgr.cpp#33

The OSS_Fuzz targets for libjpeg-turbo limit it to 500:

https://bugzilla.mozilla.org/show_bug.cgi?id=1252196#c11

Differential Revision: https://phabricator.services.mozilla.com/D173120
2023-03-25 01:46:53 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Timothy Nikkel 57ebc1d81a Bug 1277397. Set a max memory limit for libjpeg turbo to use. r=gfx-reviewers,bradwerth
This means that for trivial images whose header specifies large dimensions but with no image data  we don't use a lot of memory.

Differential Revision: https://phabricator.services.mozilla.com/D173119
2023-03-24 04:47:43 +00:00
Timothy Nikkel 3fb8b06877 Bug 1818725. Don't ignore the return value of nsAVIFDecoder::CreateDecoder. r=Zaggy1024
And also make it return a better result when mDecoder already exists, Complete is not what we want to return.

Depends on D172994

Differential Revision: https://phabricator.services.mozilla.com/D172998
2023-03-23 03:39:06 +00:00
Tom Schuster 1509ba1c86 Bug 1808146 - When creating a file promise for images, remember the referrer. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D172920
2023-03-22 21:55:08 +00:00
Kershaw Chang 5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
Timothy Nikkel c869e31d5e Bug 1818724. Rename nsAVIFDecoder::Decode. r=Zaggy1024
Because it has the same name as the base class function Decoder::Decode but different arguments, which is confusing.

Depends on D172998

Differential Revision: https://phabricator.services.mozilla.com/D173000
2023-03-20 23:46:50 +00:00
Timothy Nikkel 2c69c06d89 Bug 1813562. Fix leak with color profile and transform in avif decoder. r=Zaggy1024
We run this code for every frame of animated images, so we need to make the code handle that.

Differential Revision: https://phabricator.services.mozilla.com/D172994
2023-03-20 22:49:39 +00:00
zaggy1024 ef5aaf44a9 Bug 1813466 - Store AVIF prefs as default decoder flags in RasterImage. r=tnikkel
This prevents a crash that would occur if a redecode of an animated AVIF happened after changing the `sequences.enabled` pref from `true` to `false`.

Differential Revision: https://phabricator.services.mozilla.com/D170190
2023-03-17 00:50:07 +00:00
Nika Layzell 3b40268cc1 Bug 1818305 - Part 2: Add a streamStatus method to nsIInputStream, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,valentin,jesup,m_kato,mccr8
This is semantically similar to the existing available() method, however will
not block, and doesn't need to do the work to actually determine the number of
available bytes.

As part of this patch, I also fixed one available() implementation which was
incorrectly throwing NS_BASE_STREAM_WOULD_BLOCK.

Differential Revision: https://phabricator.services.mozilla.com/D170697
2023-03-15 19:52:34 +00:00
Marian-Vasile Laza ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Timothy Nikkel 379fa32eff Bug 1818903. Adjust fuzz on moz-icon reftest for Windows 11. r=emilio
I looked at the failures compared to the passing results. The passing results look very faint and blurry. The failures look much better actually.

Differential Revision: https://phabricator.services.mozilla.com/D171552
2023-03-03 12:17:21 +00:00
zaggy1024 e349b686f8 Bug 1817108 - Check that AVIF frame sizes remain unchanged during animation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D170193
2023-03-01 07:04:31 +00:00
Brad Werth 75eeec6a99 Bug 1768495 Part 4: Disable window occlusion tracker pref on crashtests that rely on a running compositor. r=emilio
These crashtests rely upon either a requestAnimationFrame callback or a
MozAfterPaint event. Those currently won't happen when the compositor is
paused, and on Windows these crashtests are occluded, which will now pause
the compositor. To deal with this, we disable the occlusion tracking pref
on Windows. Other platforms seem not to treat the crashtests as occluded,
so their compositors keep running.

Differential Revision: https://phabricator.services.mozilla.com/D171137
2023-02-28 23:04:54 +00:00
Jonathan Kew 4594ae314a Bug 1815404 - Replace most uses of gfxContext::CreateOrNull with stack-allocated contexts. r=gfx-reviewers,lsalzman
Depends on D170370

Differential Revision: https://phabricator.services.mozilla.com/D170371
2023-02-21 07:28:25 +00:00
Jonathan Kew 1b3e69f8aa Bug 1815404 - Remove refcounting from gfxContext. r=gfx-reviewers,lsalzman
Depends on D170367

Differential Revision: https://phabricator.services.mozilla.com/D170369
2023-02-21 07:28:24 +00:00
Tyson Smith f14d70cf52 Bug 1817479 - Enable AVIF sequence support in DecodeToSurface Fuzzer. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D170230
2023-02-18 04:19:54 +00:00
Gijs Kruitbosch 387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Manuel Bucher 0a2efcaedf Bug 1813132 - Fix Early Hints image Link preloads not connecting back to preloader in parent process r=emilio,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D168131
2023-02-09 16:35:50 +00:00
Emilio Cobos Álvarez d28f1e4d47 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 12:24:53 +00:00
Nazım Can Altınova 3c14a0bff0 Bug 1812368 - Truncate the URLs we are passing into profiler markers r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169053
2023-02-09 10:16:51 +00:00
Marian-Vasile Laza 7675a138b5 Backed out 2 changesets (bug 1815255) for causing reftest failures. CLOSED TREE
Backed out changeset b1173e8c7497 (bug 1815255)
Backed out changeset bd09cf2a4abb (bug 1815255)
2023-02-09 04:26:01 +02:00
Emilio Cobos Álvarez 656f11b2a0 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-09 00:55:13 +00:00
Cristina Horotan fbcc0f66b4 Backed out 2 changesets (bug 1815255) for causing chrome failures at test_focus.xhtml on a CLOSED TREE
Backed out changeset 983fe4e70647 (bug 1815255)
Backed out changeset f8c6426c60f9 (bug 1815255)
2023-02-08 19:50:19 +02:00
Emilio Cobos Álvarez 5db814c383 Bug 1815255 - Fix tests to deal with flexbox emulation. r=Jamie,Gijs
Mostly changing XUL attributes to CSS properties, though there are a few
tricky ones:

 * test_offsets.xhtml expects the scroller to be full-width, while
   modern flexbox would honor width: 200px (so just remove it).

 * window_intrinsic_size.xhtml was relying on the div imposing a XUL
   min-size (the test is for SetSizeConstraints, bug 1447056). Use
   min-height instead as that's what modern flexbox reads. Confirmed
   that bug doesn't regress in any case.

 * object-fit-contain-png-001.xhtml has a float: left which had no
   effect on -moz-box, but which assert with modern layout[1]. In the
   future I think we could remove that assert but anyways, for now just
   keeping behavior.

 * image-size.xhtml has a couple uninvestigated sizing differences. They
   didn't seem problematic.

 * 579323-1-ref.html changes because the other file has a canvas with
   width=100 height=100 which imposes an aspect ratio (which XUL never
   honored).

 * window_largemenu.xhtml shows a regression, but this never worked on
   some platforms (at least Linux+Wayland) and nobody has noticed it in
   the browser area, so I suspect we're fine.

[1]: https://searchfox.org/mozilla-central/rev/08362489086b10de96e7a199b267ea5504c01583/layout/generic/ReflowInput.cpp#2137

Differential Revision: https://phabricator.services.mozilla.com/D169084
2023-02-08 16:52:18 +00:00
zaggy1024 0c11da1fd0 Bug 1814708 - Error when the length of AVIF color or alpha sequences mismatch. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168777
2023-02-07 07:35:32 +00:00
zaggy1024 a55a629ec0 Bug 1814561 - Error out when samples fail to be read from an AVIF sequence. r=tnikkel
The iterator used to read from an AVIF sample index will return `true` from
`HasNext()` even if the next sample is incomplete. We should error completely
out of the decode when this happens, so that we are always guaranteed to have a
sample to decode when there is no error in the parser.

Differential Revision: https://phabricator.services.mozilla.com/D168643
2023-02-07 07:28:55 +00:00
zaggy1024 5117018c2f Bug 1814553 - Make sure to always send AVIF decoder error telemetry. r=tnikkel
This fixes an assertion failure due to the assumption before Bug 1682662 that
all metadata decodes will completely decode a sample. That is no longer the case
because telemetry for image sizes can be sent without a full decode.

Differential Revision: https://phabricator.services.mozilla.com/D168645
2023-02-07 06:34:57 +00:00
zaggy1024 2697cbe267 Bug 1814677 - Use the decoded image size for SurfacePipe frame rectangle. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168773
2023-02-07 05:55:17 +00:00
arcade 89386c6c26 Bug 1810343 - skip implementation check of PR_GetPhysicalMemorySize on DragonFly BSD r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D168350
2023-02-06 15:37:55 +00:00
zaggy1024 3fcaa79602 Bug 1814741 - Store AVIFDecoderStream in a RefPtr. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168793
2023-02-06 02:13:37 +00:00
zaggy1024 8f9447e7ed Bug 1814774 - Error early when a different-sized AVIF alpha plane is decoded. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168892
2023-02-04 13:17:22 +00:00
Nicolas Silva 96d8fb28ba Bug 1814878 - Use the rasterSize to decide whether to fall back. r=jrmuizel,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168808
2023-02-04 01:28:42 +00:00
Timothy Nikkel 532b16706c Bug 1814878. Use fallback rendering if rasterizing a vector image will use too big of a surface. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D168784
2023-02-03 13:46:58 +00:00
zaggy1024 e5729af5b8 Bug 1810613 - Part 2 - Apply loop counts from AVIF animation files. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D168345
2023-02-01 09:45:41 +00:00
zaggy1024 72068f13d2 Bug 1810613 - Part 1 - Update mp4parse to 40763b6. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D168344
2023-02-01 09:45:40 +00:00