Commit graph

7,055 commits

Author SHA1 Message Date
roytam1
e72f8a3a81 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-14 14:36:05 +08:00
Moonchild
53a6f6349d Issue #2736 - Part 14: Make CSP-enabled available to workers. 2025-05-14 14:35:35 +08:00
Moonchild
727acf7b3f Issue #2736 - Follow-up: Fix line endings in nsGenericHTMLFrameElement.h 2025-05-14 14:33:59 +08:00
Moonchild
60ad5b2ffd Issue #2736 - Part 12: Re-work style <link> href attribute.
Use subject principal as triggering principal in style <link> "href"
attribute.
2025-05-14 14:33:26 +08:00
Moonchild
dde21838de Issue #2736 - Part 11: Re-work <input> src attribute.
Use subject principal as triggering principal in <input> "src" attribute.
2025-05-14 14:33:09 +08:00
Moonchild
faf4f2c23f Issue #2736 - Part 10: Re-work <source> srcset attribute.
Use subject principal as triggering principal in <source> "srcset"
attribute for <picture>.
2025-05-14 14:32:54 +08:00
Moonchild
b1b5062dc4 Issue #2736 - Part 9: Re-work <source> src attribute.
Use subject principal as triggering principal in <source> "src" attribute
for <audio>/<video> elements.
2025-05-14 14:32:39 +08:00
Moonchild
b6bdce6f98 Issue #2736 - Part 8: Re-work <video> and <audio> src attribute.
Use subject principal as triggering principal in <video>/<audio> "src"
attribute. We deviate from Mozilla here because we do not worry
about content isolation principals in Page Info.
2025-05-14 14:32:24 +08:00
Moonchild
2416e71cd3 Issue #2736 - Part 7: Re-work <frame> and <iframe> src attribute.
Use subject principal as triggering principal in <iframe>/<frame> "src" attribute.
2025-05-14 14:26:23 +08:00
Moonchild
1f638b22ec Issue #2736 - Part 6: Re-work <script> src attribute.
Use subject principal as triggering principal in <script> "src" attribute.
2025-05-14 14:26:06 +08:00
Moonchild
2bdb9f3d85 Issue #2736 - Part 5: Re-work img <srcset> attribute.
Use subject principal as triggering principal in <img> "srcset" attribute.
2025-05-14 14:23:33 +08:00
Moonchild
c8db9efb3c Issue #2736 - Part 4: Re-work img <src> attribute.
Use subject principal as triggering principal in <img> "src" attribute.
Also get rid of the `BeforeMaybeChangeAttr`/`AfterMaybeChangeAttr` dance:
It makes more logical sense for these effects to happen _after_ the
attribute has actually been changed.
2025-05-14 14:23:17 +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
824d0cad58 Issue #2736 - Part 2: Pass subject principal to SetAttribute and friends.
In order to tailor certain security checks to the caller that is
attempting to load a particular piece of content, we need to be able to
attach an appropriate triggering principal to the corresponding requests.

Since most HTML content is loaded based on attribute values, this means
capturing the subject principal of the caller who sets those attributes,
which in turn means we need to make it available to `AfterSetAttr` hooks
on all relevant element types.
2025-05-14 14:22:13 +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
Shadow
422ca16a8e No Issue - Remove obsolete pref.
Bug 1193695

Removes obsolete preference "gfx.prefer-mesa-llvmpipe"

The code which made use of it was removed.
2025-05-14 14:20:49 +08:00
Moonchild
facab7f0ab No issue - Bump general.useragent.compatMode.version to 128.0 2025-05-14 14:20:31 +08:00
Brian Smith
e8b3077d4f No Issue - Fixes for building with LLVM 19 included with FreeBSD 13.5. Fix a conflict with libc++ 19 and the old Mozilla (re)alloc macros. LLVM 18+ does not allow std::char_traits<unsigned char> so avoid it. https://bugzilla.mozilla.org/show_bug.cgi?id=1849070 Partial NSS upgrade to replace ByteString with a class. https://bugzilla.mozilla.org/show_bug.cgi?id=1851092 2025-05-14 14:20:07 +08:00
Shadow
40e01c31e4 No Issue - Fix incorrectly written pref name
Bug 1481096
"spdy.default-hpack-buffer" was incorrectly written as "spdy.hpack-default-buffer".
2025-05-14 14:05:47 +08:00
Moonchild
055765d101 No issue - Explicitly indicate image/apng in Accept: header 2025-05-14 14:01:29 +08:00
Moonchild
0e02e94278 No issue - Include all non-ubiquitous image and media types in nav Accept:
See: https://github.com/whatwg/fetch/issues/274#issuecomment-2841053461
Considering the ubiquitous nature of gif, jpg, png, mp4, avi, etc. those
are left out, leaving just jxl, webp, x-matroska (mkv) and webm as
explicitly mentioned supported formats for conneg.

Note: it's not clear where network.http.accept.image is used in practice
because our normal place to use the image override (imgloader) uses
a different pref (image.http.accept).
2025-05-14 14:01:11 +08:00
roytam1
5384bb6d14 nss: update builtin certstore and bump ckbi version 2025-04-30 23:07:58 +08:00
roytam1
6792dc4b66 Merge remote-tracking branch 'origin/tracking' into custom 2025-04-30 23:06:47 +08:00
Moonchild
ba3a5074c7 [devtools] Escape some more characters for copying as cURL on Posix. 2025-04-30 23:06:24 +08:00
Moonchild
be9a6ed2ac [NSS] Improve locking in nssPKIObject_GetInstances. 2025-04-30 23:03:04 +08:00
Moonchild
fd4a224d1d Issue #2737 - Part 1: Base implementation of SVGGeometryElement.
Mostly mechanical changes to generalize path geometry for all SVG draw
elements. No user-exposed changes.
2025-04-30 23:02:16 +08:00
Moonchild
8ae2b45691 Issue #2732 - Part 3: Explicitly search for <area> only.
Relying on the implicit conversion by `::FromContent` doesn't work for
us because we inherit that from `nsGenericHTMLElement` and isn't specific
to `HTMLAreaElement`, so it would accept other elements.

This also updates the Attribute changed event handler to exclude `<a>`
elements and cleans up an unused variable from the old code.
2025-04-30 23:00:35 +08:00
Moonchild
8a21d95ea3 No issue - restore nullptr-check 2025-04-30 23:00:04 +08:00
Moonchild
8db40dbbb5 No Issue - Modernize nsImageFrame/nsImageMap
Primarily flow control improvements, and removing unused `nsresults`.
2025-04-30 22:59:45 +08:00
Moonchild
9f64d0f4b0 Issue #2732 - Part 2: Stop accepting <a> as a valid image map <area>
This was part of the HTML4 standard but only ever implemented by Mozilla
and removed again in HTML5 due to lack of adoption. Retaining this could
cause web compat issues and unspecified behavior in the layout engine.
2025-04-30 22:59:26 +08:00
Moonchild
2ef82632d4 Issue #2732 - Part 1: Rename mContainsBlockContents to mConsiderWholeSubtree
It is more descriptive of what it actually does.
2025-04-30 22:59:06 +08:00
Moonchild
0331e633bd Issue #2728 - Remove obsolete CSP referrer policy.
This has been superseded by the dedicated Referrer-policy header.
Resolves #2728
2025-04-30 22:58:43 +08:00
Moonchild
d7f01911b8 Issue #2731 - Fix crashes on unknown BigInt types in JIT
This only works around the unknown type crashes but doesn't actually fix
attempts at using 64-bit BigInts in Ion.
Resolves #2731
2025-04-30 22:58:27 +08:00
roytam1
42e13fd8bf Merge remote-tracking branch 'origin/tracking' into custom 2025-04-18 10:32:18 +08:00
Moonchild
8bacedc9a9 Issue #2729 - Add missing jsonifier interfaces to DOM{Matrix|Rect|Point}
Resolves #2729
Resolves #2705
2025-04-18 10:31:48 +08:00
Moonchild
9ff0c63602 No issue - Update Twemoji font to unicode 16.0.0 2025-04-18 10:31:12 +08:00
Moonchild
d13c759467 Issue #2726 - Remove obsolete FirefoxOS MMS prefs
These aren't referenced anywhere.
Resolves #2726
2025-04-18 10:30:47 +08:00
Moonchild
17031f216b No issue - set UXP to dereference links in file open dialogs.
Since we (and Mozilla) currently don't have a solution for "auto" that
doesn't break usability for users, keep the old behavior for now.
2025-04-18 10:30:29 +08:00
Brian Smith
59977aa358 No issue - Various updates for Mac buildability with XCode 16.3 2025-04-18 10:30:02 +08:00
roytam1
b86d97747f Merge remote-tracking branch 'origin/tracking' into custom 2025-04-03 09:50:55 +08:00
Moonchild
1283a5f874 [widget] Extend the use of FOS_NODEREFERENCELINKS on Windows.
In the modern era of user-customizable Quick Access sidebars on every file
dialog, navigating via `.lnk` files is considerably less useful than it
was twenty years ago.

Disable link-following in file-open dialogs by default, to prevent any of
the usual security issues involving symlink smuggling.

Allow overriding this behavior via a pref, for users who want to trade off
this security issue for convenience of being able to follow links inside
file dialogs (older OSes and established user workflows).
Note: File Save dialogs have a set of more nuanced guards against link
smuggling and protected file access; this change doesn't affect that.
2025-04-03 09:50:02 +08:00
Moonchild
0113b2715d [DOM] Check state before compiling/transforming. 2025-04-03 09:47:35 +08:00
Moonchild
cc29855b66 No issue - Update SQLite lib to 3.49.1 and require it as syslib. 2025-04-03 09:47:08 +08:00
Moonchild
9490504bf9 Issue #2703 - Part 0: Add UnorderedRemoveElement[s]At to nsTArray 2025-04-03 09:45:17 +08:00
Moonchild
80b30a8177 Issue #2720 - Implement two-location color stop logic.
This allows for two-location color stops (`color x% y%`) which is shorthand
for `color x%, color y%` where both colors are equal. (pct/length accepted)
See code comment for the reason it's implemented the way it is.

Resolves #2720
2025-04-03 09:44:51 +08:00
roytam1
79614a4216 js: use MOZ_MUST_USE instead of C++17 keyword 2025-03-27 09:15:28 +08:00
roytam1
e5a48f8565 Merge remote-tracking branch 'origin/tracking' into custom 2025-03-27 09:05:29 +08:00
Martok
46fadb2d2b Issue #2715 - Compute Channel Binding Hashes using the certificate signature's hash algorithm as per spec 2025-03-27 09:04:36 +08:00
Martok
7d3dc5a2f2 Issue #2692 - Follow-Up: fix compilation in debug 2025-03-27 09:04:21 +08:00
Moonchild
c31cda6c74 No issue - Fix incorrect js message ref in js shell. 2025-03-27 09:04:00 +08:00