Commit graph

7,069 commits

Author SHA1 Message Date
roytam1
7f3ccb5dc3 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-27 23:22:51 +08:00
Moonchild
75c0461123 No issue - Force C++ run-time type information on protobuf
Protobuf uses `dynamic_cast` on polymorphic types which cannot be
inferred properly at compile-time, which can lead to unexpected behavior.
As a code safety measure, enable C++ RTTI for protobuf.
2025-05-27 23:22:24 +08:00
Moonchild
6da047af1e Issue #2736 - Follow-up: Remove erroneous workerthread CSP check.
In `OnStreamCompleteInternal` an incorrect workerthread CSP enabled check
was added. This was a duplicate check and this is actually on the main
thread so asserts the wrong thread for a `WorkerPref`.
2025-05-27 23:22:08 +08:00
trav90
497b6d5854 Issue #2749 - Part 8 - Put mfbt/casting.h pragmas behind GCC conditional. 2025-05-27 23:21:47 +08:00
trav90
fc9643a1a7 Issue #2749 - Part 6 - Teach mfbt/casting.h to deal with floating point values
This now uses `if constexpr (...)` which is a lot more readable, and still compiles to almost no assembly instructions, as expected. Floating point casting assert when casting an integer that's too large to be represented exactly as a floating point (e.g. UINT64_MAX to double, since double have less than 64 bytes of mantissa), or when casting a double that's too large to be represented in a float.
2025-05-27 23:21:26 +08:00
Brian Smith
d461e75034 No Issue - Fix building on Linux 32-bit ARM with clang. Need to have system definitions before defining the overrides. The sytem definitions have additional attributes that conflict. clang 14 that I am using also requires -fno-integrated-as for several files, but I left that out since it is probably fixed in newer versions of clang. 2025-05-27 23:21:04 +08:00
Brian Smith
ce535a850f No Issue - MacOS fixes and updates. stroucki reported on the forum a libary not loading. This corrects the path. It still loads with the incorrect path on most systems, but fixing it anyway. https://github.com/joseluisq/macosx-sdks Update the SDK list with the SDKs available here. 2025-05-27 23:20:46 +08:00
Shadow
2a2236d4d9 No issue - Remove obsolete pref.
Bug 1356751

Remove unused pref `layout.frame_rate.precise`
2025-05-27 23:18:38 +08:00
Moonchild
71ba67cfbe No issue - Don't support modulo math space in ExtractLinearSum. 2025-05-27 23:18:24 +08:00
Moonchild
01ebabde5b No issue - Fix promise combinator function state. 2025-05-27 23:18:09 +08:00
trav90
96cc879fab Issue #2741 - Part 3 - Clamp rolloff factor appropriately in PannerNodeEngine 2025-05-27 23:17:53 +08:00
Shadow
a8f9e383fa No Issue - Fix a typo in DOMSVGPoint constructor.
Bug 1442972

DOMSVGPoint constructor checked mX is finite twice, leaving out mY finite.

-- Stupidly rushed.  Shambles.
2025-05-27 23:17:27 +08:00
roytam1
296db1641b Merge remote-tracking branch 'origin/tracking' into custom 2025-05-14 15:49:14 +08:00
Moonchild
9847e9f759 Issue #2736 - Part 13: Override page CSP for loads by expanded principals.
Per the CSP specification, content injected by extensions is meant to
be exempt from page CSP. This patch takes care of the most common case
of content injected by extension content scripts, which always have
expanded principals which inherit from the page principal.

To make this easier, de-virtualize BasePrincipal::Kind(), using CTOR
initializers instead.
2025-05-14 15:48:54 +08:00
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