Commit graph

6,435 commits

Author SHA1 Message Date
Moonchild
c9e08cb2f5 Issue #2790 - Follow-up: Ensure both text and background are set.
The common issue of needing to set both foreground and background for dark
themes.
2025-09-23 15:19:43 +08:00
Moonchild
1bcdad3ef1 Issue #2852 - Follow-up: Add comment and fix formatting. 2025-09-23 15:19:29 +08:00
Moonchild
3a121f34c8 [gfx] Use std::size rather than hardcoding an array size 2025-09-23 15:19:12 +08:00
Moonchild
16164b3d38 Issue #2852 - Parse full cache-control headers.
This makes sure we parse the merged/stored version of `cache-control`
instead of just the latest-received header.
`ResponseHead::ParseHeaderLine_locked` parses each header as it comes in.
It then updates its member variables based on that header.
For `cache-control`, it's important to reparse the merged (updated)
version of the header instead of the most recent one, otherwise we'll miss
directives present in previously received headers.

Resolves #2852
2025-09-23 15:18:48 +08:00
Moonchild
6e19656e11 [gfx] Clarify comments.
There may be other situations where putting a font entry in the cache
table may fail that are perfectly valid.
2025-09-23 15:18:03 +08:00
Moonchild
060e2965b8 Revert "[gfx] Guard against possible race via gfxFontEntry::GetFontTable."
This reverts commit a1cf966815240aef59e33c49c9496e3516b1fdd7.
2025-09-23 15:17:12 +08:00
Moonchild
c7e103b06e No issue - Clarify Azure Back-end info.
Only mention OpenGL accelerated canvas flag when it's relevant, and rename
the entry to be more descriptive, to prevent confusion for users looking
at Troubleshooting Information.
2025-09-23 15:16:56 +08:00
Moonchild
fe21538da4 [NSS] Avoid leak in pkcs12 decoder. 2025-08-21 16:07:31 +08:00
Moonchild
425f38ff84 [js] Error-check pthread calls
These calls return error states (int) that weren't checked for success.
Failures here are fatal, so using MOZ_RELEASE_ASSERT to safely crash.
2025-08-21 16:06:31 +08:00
Moonchild
7cadc57d49 [gfx] Guard against possible race via gfxFontEntry::GetFontTable. 2025-08-21 16:04:25 +08:00
Moonchild
6d47d819fa Issue #2850 - Alias :focus-visible to :-moz-focusring
Band-aid to have it be parsed as valid with reasonably-expected behaviour.
2025-08-18 09:48:39 +08:00
Moonchild
e3de626c1f Bug 1875345 - Report 24 instead of 32 as the colorDepth (and pixelDepth) on Linux (assuming 8 of 32 bits are for the alpha channel).
This now matches the logic in our equivalent Windows code, and this is
also per spec ("number of bits...excluding the alpha channel"):
https://drafts.csswg.org/cssom-view/#dom-screen-colordepth
With this change, the WPT test starts passing on Ubuntu 22.04
(which was previously flagged as an unexpected failure).
2025-08-18 09:48:16 +08:00
Moonchild
bd734f795c Issue #2258 - Part 4: Clean up unused pointers. 2025-08-18 09:47:53 +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
e56e5d6cb1 Issue #2258 - Part 1: Support XCTO:nosniff when navigating. 2025-08-18 09:46:58 +08:00
Moonchild
723180132d Issue #2847 - Extend -moz-os-version media query with win11.
Resolves #2847
2025-08-14 08:39:18 +08:00
Moonchild
7af71cb345 Issue #1843 - Clean up WindowsVersion.h
This gets rid of all the unnecessary named functions to be replaced with
a straightforward check `IsWindows10BuildOrLater(WinBuild::{build})`
Where `WinBuild` is an enum with common `{build}` names of Win 10+
versions: `Win10v1809`, `Win10v21H2`, `Win11RTM`, `Win11v24H2`, etc.

None of these named functions were actually in use, so no other changes
should be necessary in the platform.
2025-08-14 08:35:44 +08:00
Moonchild
842cc60707 Issue #1899 - Remove MDN docs tooltip and link code from devtools.
Resolves #1899
2025-08-14 08:11:21 +08:00
Moonchild
df3b213459 Issue #2837 - Implement prefers-reduced-motion media query.
Resolves #2837
2025-08-14 08:11:04 +08:00
Moonchild
fcc58bfbba Issue #2838 - Update tests 2025-08-08 09:28:58 +08:00
Moonchild
c07ea665ea Issue #2838 - Use ToIndex in TypedArray CTORs
Also adjusts index handling to be more accurate/spec compliant.
2025-08-08 09:28:38 +08:00
Francis Dominic Fajardo
2026586ce1 Issue #2835 - Follow-up: Guard against import rules with no attached style sheet 2025-08-04 21:33:14 +08:00
Moonchild
1ffa7569e9 Issue #2714 - Enable the Visual Viewport API by default.
Flip the pref. We want this on by default for web compat.
Users can disable it if they really want to, but it doesn't expose
anything of note to web content anyway that can't already be determined.
2025-08-04 21:32:58 +08:00
Moonchild
a036cfeb69 Issue #2714 - Implement the Visual Viewport API
This DOM/Web API is entirely irrelevant for desktop use.
We give back the width/height of the root scrollframe of content and
for scale we pass forward our dpp resolution (usually 1.0).
Since we have no "no touch" zones in our content on desktop,. the rest
(origin and offset) is hard-coded to (0,0).
2025-08-04 21:32:39 +08:00
Moonchild
ace2c1c1ee [DOM] Simplify <object> scheme check code and fix plugin handling.
Trying to do a positive check on nested URIs apparently doesn't work,
but the handling could be simplified to just check for non-null mURI
instead - this also fixes plugin loading (which broke with the previous
check).
2025-07-31 22:08:07 +08:00
Moonchild
838be26145 [DOM] Fix crash in <object> scheme checking code.
If a website would nor supply a URI for object loading code, the browser
would crash on a null deref.
This reintroduces the nestedURI check to make sure we have a valid URI.
2025-07-31 07:40:43 +08:00
Moonchild
cea125a01d Issue #2489 - Follow-up: Add color-mix() manual test. 2025-07-31 07:40:09 +08:00
MeladJM
429e05c8a1 Issue #2790 - Cleanup: Correct whitespaces 2025-07-29 10:44:03 +08:00
MeladJM
61f92f89ea Issue #2790 - Part 7: Setting of contrasting color and fixing of last commit's issues 2025-07-29 10:43:26 +08:00
MeladJM
61ad3b8d6e Issue #2790 - Part 6: Highlight color change and remove important 2025-07-29 10:42:29 +08:00
MeladJM
70cbf0dfd3 Issue #2790 - Cleanup: Remove whitespaces 2025-07-29 10:41:22 +08:00
MeladJM
459ed6ea85 Issue #2790 - Cleanup: Remove debugging lines 2025-07-29 10:41:05 +08:00
MeladJM
156c755085 Issue #2790 - Part 5: Persistent highlight despite blur click 2025-07-29 10:36:38 +08:00
MeladJM
bf8cfcc980 Issue #2790 - Part 4: Working non persistent autofill highlight 2025-07-29 10:35:07 +08:00
MeladJM
4cdfb9e16b Issue #2790 - Part 3: Address BZ bug 1849122 and resolve build issues 2025-07-29 10:14:48 +08:00
MeladJM
d99eab0d9d Issue #2790 - Part 2: Address BZ bugs: 1355438 and 1341230 2025-07-29 10:14:23 +08:00
MeladJM
13d1054046 Issue #2790 - Part 1: Add: event state, pseudo-class mapping, SetAutofilled methods 2025-07-29 10:14:06 +08:00
erixreyes
2855cd6ded Issue #2489: Produce more accurate computations 2025-07-29 10:13:49 +08:00
erixreyes
052b5d1ffa Issue #2489: Disallow percentage overflow and underflow 2025-07-29 10:13:28 +08:00
erixreyes
5fe574de22 Issue #2489: Allow SRGB with alpha mixing 2025-07-29 10:13:12 +08:00
erixreyes
22be9f7fc6 Issue #2489: Allow HSL with alpha mixing 2025-07-29 10:12:56 +08:00
erixreyes
01b0b8251d Issue #2489: Allow color-mix() to differentiate color spaces 2025-07-29 10:12:38 +08:00
erixreyes
cb2547efa3 Issue #2489: Adding RGB to HSL function 2025-07-29 10:12:20 +08:00
erixreyes
ff5f3b2b2d Issue #2489: Improve color-mix() computation algorithm 2025-07-29 10:12:05 +08:00
erixreyes
eb7eacc565 Issue #2489: Remove unnecessary initializations 2025-07-29 10:11:49 +08:00
erixreyes
a3cb799126 Issue #2489: Fix CSS color-mix() percentage parsing 2025-07-29 10:11:34 +08:00
erixreyes
7899850a19 Issue #2489: color-mix function parsing 2025-07-29 10:11:13 +08:00
erixreyes
cb60df2169 Issue #2489: Create ColorMixValue structure 2025-07-29 10:10:55 +08:00
erixreyes
99d7fb8e95 Issue #2489: Update enum class syntax 2025-07-29 10:10:37 +08:00