1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00
Commit Graph

19 Commits

Author SHA1 Message Date
Moonchild 335ddc41b9 Issue #3030 - Improve image cache entry handling.
This:
- increases max image cache entry size and adjusts related parameters.
- makes the cache entry timeout configurable for advanced tweaking.
- adds a mechanism to keep commonly-used, small image sizes in cache
  longer.
2026-05-15 09:19:17 +08:00
mittorn 1078e45dd3 Issue #2932 - Ensure that imgRequestProxy::CancelAndForgetObserver removes itself from the cache validator
https://hg-edge.mozilla.org/releases/mozilla-beta/rev/af82d0c33427
2026-02-07 21:38:25 +08:00
Moonchild c5cc980506 Issue #2928 - Improve imgLoader cache queue handling.
- Convert the imgCacheQueue to nsTArray from Vector
- Avoid marking the queue dirty when element operations are performed
that don't upset the sort order. This should improve performance as well.
2026-02-07 21:37:51 +08:00
Moonchild 21f4ab5e02 Issue #2928 - Avoid searching the image cache queue for an entry after we just popped it off the queue. 2026-02-07 21:37:33 +08:00
Moonchild 15e076130d Issue #2928 - Always refresh dirty queue. 2026-02-07 21:37:17 +08:00
Moonchild 17338528b7 Issue #2928 - Re-order imgLoader::RemoveFromCache
Remove from tracker first before removing from cache, and if the cache
queue is dirty, refresh it (causes a re-heap) before manipulating further.
2026-02-07 21:37:04 +08:00
Moonchild 4667b7f4b0 [image] Use the TriggeringPrincipal if we have one, not the SystemPrincipal 2025-12-17 22:45:33 +08:00
Moonchild 73c9c1dd73 Revert "Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers."
This reverts commit 51e1650d42b2c033d5d55750b4ea497053524c93.
2025-09-26 23:15:12 +08:00
Moonchild 2d4d48db72 Revert "Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type."
This reverts commit a56f978f70e2d96ba501d6a944be33460afc481a.
2025-09-26 23:14:52 +08:00
Moonchild 707c3e3fa8 Issue #2258 - Part 3: Allow sniffing with XCTO:nosniff + empty MIME type.
This moves the checking code back to NS_SniffContent and specifically
checks requests for either:
- Empty `Content-type` header, OR
- A known JSON MIME type

If present, sniffing is allowed despite `nosniff` because in the first
case this is webmaster error (conflicting `nosniff` without MIME type
would always fail, so sniff it), and in the second case we need this
carveout or our json viewer will break.
2025-08-18 09:47:36 +08:00
Moonchild cca20ae131 Issue #2258 - Part 2: Move XCTO:nosniff check into sniffers.
This fixes a regression for the JSON viewer from part 1 as it relies on
sniffing to prettify (and should carve out the exception even if `nosniff`
headers are sent).
No real functional changes otherwise. Just catering to a corner case.
2025-08-18 09:47:21 +08:00
Moonchild 166b25a42c Issue #2736 - Part 3: Use TriggeringPrincipal for image loads.
The imgLoader code consistently uses the term `loadingPrincipal` for
the principal that is called the `triggeringPrincipal` everywhere else.
This aligns the naming to avoid confusion in later changes.
2025-05-14 14:22:56 +08:00
Moonchild 9ad680cfc4 Issue #2736 - Part 1: Provide more consistent principals to CSP.
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a
loading principal currently retrieve it from the context node.
Since no current callers require the principal to be the loading
principal, and some already expect it to be the triggering principal
(which there's currently no other way to retrieve), a choice was made
to pass the triggering principal whenever possible, but use the loading
principal to determine the origin URL.
2025-05-14 14:21:46 +08:00
Job Bautista 51ea0e4f3a Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
2023-06-24 12:16:27 +08:00
Moonchild 8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
win7-7 e6f376f5ef Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
2019-08-10 06:26:08 +08:00
Gaming4JC d4ac94cf3e Remove support and tests for HSTS priming from the tree. Fixes #384 2019-02-15 23:59:39 +08:00
wolfbeast 8b0dd2f40b Add WebP content sniffing code. 2019-02-14 14:36:35 +08:00
roytam1 dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00