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

98 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa 1abe447481 Bug 1907009 - Part 1: Add CacheExpirationTime type. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D217957
2024-08-06 05:38:23 +00:00
Tooru Fujisawa a127747b14 Bug 1893402 - Part 2: Use minimum cache expiration time in image cache. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D208979
2024-05-17 11:20:59 +00:00
Tamas Szentpeteri 86dcf9e3dc Backed out 2 changesets (bug 1893402) for causing mochitest failures regarding nsGlobalWindowInner. CLOSED TREE
Backed out changeset e909b94c1280 (bug 1893402)
Backed out changeset beef636e1562 (bug 1893402)
2024-05-17 00:16:25 +03:00
Tooru Fujisawa 64388946b4 Bug 1893402 - Part 2: Use minimum cache expiration time in image cache. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D208979
2024-05-16 15:40:41 +00:00
Sylvestre Ledru 21f973ed5c Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D207867
2024-04-22 16:00:09 +00:00
Frédéric Wang b005b82248 Bug 1872657 - Add fetchpriority support for `<link rel=preload as=image>`. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-27 06:33:48 +00:00
Stanca Serban b54de79827 Backed out changeset 621c8480cd35 (bug 1872657) for causing FetchPriority related bp-nu bustages in IconLoader.cpp. CLOSED TREE 2024-02-26 18:15:18 +02:00
Frédéric Wang c7734232ca Bug 1872657 - Add fetchpriority support for `<link rel=preload as=image>`. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-26 15:03:58 +00:00
sunil mayya 8ce40ef93d Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-27 13:30:11 +00:00
Narcis Beleuzu 722f6a1679 Backed out 6 changesets (bug 1851992) for DT failure on browser_net_image_cache.js . CLOSED TREE
Backed out changeset 3ceaf46f8f55 (bug 1851992)
Backed out changeset c9d322362e22 (bug 1851992)
Backed out changeset 673df3f83249 (bug 1851992)
Backed out changeset 46e18c56dd39 (bug 1851992)
Backed out changeset f9f9143ac713 (bug 1851992)
Backed out changeset 38c40d735ab7 (bug 1851992)
2023-10-24 13:16:40 +03:00
sunil mayya 1acfb3f11f Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-24 01:48:09 +00:00
Cristina Horotan ea9336a2ca Backed out 5 changesets (bug 1851992) for causing multiple failures
Backed out changeset d28399b3d947 (bug 1851992)
Backed out changeset 95e4df69007a (bug 1851992)
Backed out changeset fa61d4e76827 (bug 1851992)
Backed out changeset 79969d9eb5cd (bug 1851992)
Backed out changeset 03c17255f1af (bug 1851992)
2023-10-17 14:48:23 +03:00
sunil mayya f350089afd Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-17 08:27:49 +00:00
Nika Layzell ca0d37e8d5 Bug 1842658 - Part 1: Use a refcounting macro for imgCacheEntry, r=tnikkel
It appears that when this was originally added in bug 430061, the inline
refcounting macros didn't exist yet.

Differential Revision: https://phabricator.services.mozilla.com/D183203
2023-07-14 16:20:53 +00:00
Emilio Cobos Álvarez 6d294944a6 Bug 1832553 - Remove the chrome / non-chrome image cache split. r=tnikkel
This probably made more sense when everything was in the same process,
so that prefs like the image cache size etc only measured web content.

But that's achieved via e10s nowadays, so probably having different
cache tables for chrome:// URIs is overkill. Plus, we probably want to
also clear resource:// URIs etc when flushing chrome caches and so on.

Differential Revision: https://phabricator.services.mozilla.com/D177765
2023-05-13 08:31:46 +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
Manuel Bucher 17df5816aa Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 16:15:55 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher e4a53f90d5 Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 09:45:26 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Randell Jesup 12fddc66fd Bug 1207753 - image thread-safety annotations r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D132641
2022-03-21 20:04:39 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Sean Feng 8e783e6bee Bug 1753471 - Only notify http-on-image-cache-response once per cache entry r=tnikkel
I've also tested the behavior in Chrome and I think this is
the correct way of doing it. Chrome also only notifies the
cached entry once, it won't notify it even if I manually
trigger it after pageload.

Differential Revision: https://phabricator.services.mozilla.com/D138346
2022-02-10 18:18:28 +00:00
Emilio Cobos Álvarez 323ecd6f31 Bug 1743377 - Remove imgLoader::PreferLoadFromCache. r=aosmond
Instead treat these protocols as "never-expiring" protocols, and clean
up revalidation code while at it.

Depends on D132347

Differential Revision: https://phabricator.services.mozilla.com/D132348
2021-11-29 15:18:14 +00:00
Emilio Cobos Álvarez c5f2196f46 Bug 1743377 - Prefer using to typedef in imgLoader. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D132347
2021-11-29 15:18:13 +00:00
Sean Feng d275bc2c1f Bug 1722759 - Make devtools network panel to display images that are loaded by the image cache r=necko-reviewers,dragana,tnikkel,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D121122
2021-10-12 22:30:46 +00:00
Emilio Cobos Álvarez a480cfb732 Bug 1729477 - Tweak SubresourceCacheValidationInfo to account for chrome uris. r=tnikkel
Turns out my patch above causes some failures because chrome:// channels
don't have cache information, so we conservatively assume they always
expire, which causes some interesting timing issues in a single test.
Fun stuff.

Tweak the code so that SubresourceCacheValidationInfo has the
pre-existing data:// URI special-case and also special-cases chrome://
URIs.

Differential Revision: https://phabricator.services.mozilla.com/D124921
2021-09-09 09:32:11 +00:00
Sandor Molnar 870ff4f480 Backed out 3 changesets (bug 1729477) for causing devtools failures in browser_webconsole_sidebar_object_expand_when_message_pruned. CLOSED TREE
Backed out changeset 8cbf3101ed8a (bug 1729477)
Backed out changeset 7457834fb7d0 (bug 1729477)
Backed out changeset 1259d2d1f247 (bug 1729477)
2021-09-09 03:55:31 +03:00
Emilio Cobos Álvarez d4d9525111 Bug 1729477 - Tweak SubresourceCacheValidationInfo to account for chrome uris. r=tnikkel
Turns out my patch above causes some failures because chrome:// channels
don't have cache information, so we conservatively assume they always
expire, which causes some interesting timing issues in a single test.
Fun stuff.

Tweak the code so that SubresourceCacheValidationInfo has the
pre-existing data:// URI special-case and also special-cases chrome://
URIs.

Differential Revision: https://phabricator.services.mozilla.com/D124921
2021-09-08 21:03:02 +00:00
Paul Zuehlcke 48a7a1ad98 Bug 1705033 - Added ImageCacheCleaner deleteByBaseDomain. r=tnikkel,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D115621
2021-05-27 12:37:04 +00:00
Paul Zuehlcke 5c8aef557a Bug 1710818 - Updated imgLoader removeEntriesFromPrincipal to clear entries for all processes. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D115620
2021-05-27 12:37:04 +00:00
Emilio Cobos Álvarez 4b43f36ac6 Bug 1709577 - Check list of available images before deciding to defer a lazy load. r=edgar
As per https://html.spec.whatwg.org/#updating-the-image-data step 6.

Differential Revision: https://phabricator.services.mozilla.com/D114353
2021-05-07 13:56:33 +00:00
Dorel Luca 69e7a22434 Backed out 2 changesets (bug 1709577) for WPT Failures in /html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html. CLOSED TREE
Backed out changeset ceed6d7fca1c (bug 1709577)
Backed out changeset bb44c14b754f (bug 1709577)
2021-05-07 16:46:48 +03:00
Emilio Cobos Álvarez 5767e04759 Bug 1709577 - Check list of available images before deciding to defer a lazy load. r=edgar
As per https://html.spec.whatwg.org/#updating-the-image-data step 6.

Differential Revision: https://phabricator.services.mozilla.com/D114353
2021-05-07 11:44:15 +00:00
Sandor Molnar 21a6efd6a3 Backed out 2 changesets (bug 1709577) for causing wpt failures. CLOSED TREE
Backed out changeset 0da1dba1749c (bug 1709577)
Backed out changeset bab974107b3b (bug 1709577)
2021-05-07 05:34:43 +03:00
Emilio Cobos Álvarez b6493d8a6e Bug 1709577 - Check list of available images before deciding to defer a lazy load. r=edgar
As per https://html.spec.whatwg.org/#updating-the-image-data step 6.

Differential Revision: https://phabricator.services.mozilla.com/D114353
2021-05-07 00:11:06 +00:00
Emilio Cobos Álvarez 62550fa581 Bug 1709577 - Remove CORS_* constants from imgIRequest, use CORSMode instead. r=tnikkel
These don't have the same value, and is a bit confusing.

Differential Revision: https://phabricator.services.mozilla.com/D114352
2021-05-05 15:23:25 +00:00
Emilio Cobos Álvarez dffb321319 Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
There's no reason to require a null-terminated string in imgLoader.

Differential Revision: https://phabricator.services.mozilla.com/D112478
2021-04-17 22:21:19 +00:00
Simon Giesecke 62d4fb1410 Bug 708901 - Migrate to nsTHashSet in image. r=tnikkel
Depends on D108603

Differential Revision: https://phabricator.services.mozilla.com/D109316
2021-03-23 10:36:36 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Emilio Cobos Álvarez e5fe143835 Bug 1599160 - Better integration of the shared stylesheet cache with the network cache. r=tnikkel,mayhemer,heycam
Make the stylesheet cache respect the same headers as the image cache
does. This makes no-cache stylesheets work as they do now, which is
useful for developers that want to develop sites locally, and for
shift-reloads, etc.

Differential Revision: https://phabricator.services.mozilla.com/D78659
2020-06-12 19:06:04 +00:00
Razvan Maries 7b30d6e82e Backed out 7 changesets (bug 1599160) for damp failures. CLOSED TREE
Backed out changeset edb0e17f3c98 (bug 1599160)
Backed out changeset 64b42ac358e6 (bug 1599160)
Backed out changeset ce1521b895e1 (bug 1599160)
Backed out changeset 0b0ff0ad8db7 (bug 1599160)
Backed out changeset c7ef05dae614 (bug 1599160)
Backed out changeset 466cfd0ad5db (bug 1599160)
Backed out changeset b3f28494f0e7 (bug 1599160)
2020-06-12 02:40:38 +03:00