Commit graph

6,328 commits

Author SHA1 Message Date
Moonchild
2d9cb22a28 [devtools] Further improve special character escaping in "copy as curl".
Follow-up to 15335ce39d1ea2ef4585a36a4d562a3894459a15

Trying to cross-platform sanitize causes issues escaping too much and
as a result mangling the curl commands that get spit out.
This reverts previously added Windows-specific escaping on POSIX and
vice versa.
Since we do not offer cross-platform copying as a curl command in devtools
anyway, it makes little sense to sanitize for the O.S. we're not running on
as we would not be using the command processor in such environments that
could trip over characters for the other O.S. This was previously added
as a defense-in-depth in case we would start offering this, but I see no
real reason to do so, anyway.

Also decided to in-line comments for readability instead of a bulleted
list in the function head.

Mozilla has taken similar steps because of fall-out, but they do offer
cross-platform "copy as curl" for corner cases, so they will have to
find solutions for a problem we won't have.
2025-07-07 11:57:09 +08:00
Jerico
e6b48fcc95 Issue #2106 - Part 3: Add 'contain' as user-select value, retain 'element' 2025-07-07 11:56:37 +08:00
Francis Dominic Fajardo
f0b8d1df2c Issue #2045 - Part 10: Regenerate devtools CSS database and include the revert keyword in related devtools code 2025-07-07 11:56:21 +08:00
Francis Dominic Fajardo
5346e55655 Issue #2045 - Part 9: Include the revert keyword in the list of accepted values for CSS properties returned by inDOMUtils 2025-07-07 11:56:06 +08:00
Francis Dominic Fajardo
a47f44e93d Issue #2045 - Part 8: Remap revert keyword values to a higher cascade level 2025-07-07 11:55:40 +08:00
Francis Dominic Fajardo
166e98d2b9 Issue #2045 - Part 7: Override revert values during presentation hint cascade 2025-07-07 11:55:24 +08:00
Francis Dominic Fajardo
c4b6135c99 Issue #2045 - Part 6: Treat "revert" values as the same as "unset" when encountered in the rule node 2025-07-07 11:21:14 +08:00
Francis Dominic Fajardo
801d4a2db8 Issue #2045 - Part 5: Serialize shorthands using "revert" like those containing "unset" 2025-07-07 11:20:56 +08:00
Francis Dominic Fajardo
9105c58a30 Issue #2045 - Part 4: Parse "revert" in property values wherever "unset" is allowed 2025-07-07 11:20:42 +08:00
Francis Dominic Fajardo
b0f0972314 Issue #2045 - Part 3: Implement cascade origin tracking to CSS parser
The CSS parser already knows the cascade origin, but it is using a different enum for storing it.
2025-07-07 11:20:23 +08:00
Francis Dominic Fajardo
7f3f90eed4 Issue #2045 - Part 2: Add handling and storage for the revert unit and value 2025-07-07 11:20:09 +08:00
Francis Dominic Fajardo
dd2cf17d30 Issue #2045 - Part 1: Revert "Temporarily force hidden elements to be actually hidden."
This reverts commit 1692fa52914012b051484c51caaed8e227334558.
2025-07-07 11:19:51 +08:00
Francis Dominic Fajardo
552cb8dbcc No issue - Fix mixing of tabs with space-indented code. 2025-07-07 11:19:34 +08:00
Jerico
17b594b705 Issue #2106 - Part 2: Align value names 2025-07-07 11:19:20 +08:00
Jerico
cc55a380f6 Issue #2106 - Part 1: Un-prefix -moz-user-select 2025-07-07 11:18:59 +08:00
Andy
4cc014cb6b Unprefix -moz-read-write / -moz-read-only 2025-07-04 22:27:22 +08:00
Francis Dominic Fajardo
e4630ce481 Issue #2765 - Follow-up: Avoid declaring RefPtr in the return statement 2025-06-29 00:15:21 +08:00
Francis Dominic Fajardo
6e358f1039 Issue #2765 - Follow-up: Fix UAF when returning the non-NAC style context from a frameless node 2025-06-29 00:15:02 +08:00
Francis Dominic Fajardo
af84337437 Issue #2765 - Follow-up: Make scrollbar width checks use the originating non-NAC style context on Linux and Mac 2025-06-29 00:14:43 +08:00
Francis Dominic Fajardo
d14972602f Issue #2764 - Fix several properties to return NeutralChange hint
This excludes the removal of the mBorderImageOutset change condition from triggering a repaint which doesn't make sense.
2025-06-27 23:33:27 +08:00
Francis Dominic Fajardo
2c704d1b8e No issue - Refactor nsStyleUIReset::CalcDifference to accumulate change hints
This was patched in m-c via an unrelated bug (bug 1370034).

Noted by dbaron in this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1370034#c69
2025-06-27 23:33:07 +08:00
Francis Dominic Fajardo
3ba0b10bb4 Issue #2765 - Part 3: Make scrollbar width checks use the originating non-NAC style context 2025-06-27 23:32:50 +08:00
Francis Dominic Fajardo
b2c435a189 Issue #2765 - Part 2: Create a helper function for resolving the non-NAC style context of a given NAC 2025-06-27 23:31:57 +08:00
Francis Dominic Fajardo
8236eec152 Issue #2765 - Part 1: Scrollbar width should be treated as a non-inherited property
Note: non-inherited properties are stored in "reset" style structs.

Previous implementation treats it as an inherited property, which
doesn't match the spec.

This also fixes the incorrect behavior when using the `unset` value
for this property by specifying SETVAL_UNSET_INITIAL in the mask.
2025-06-27 23:31:38 +08:00
Moonchild
80b542efc3 [XPCOM] Add Mac-specific executable extensions 2025-06-27 23:31:20 +08:00
Moonchild
5e12078904 [Layout] Hold stronger references to FontFaces. 2025-06-27 23:30:45 +08:00
Moonchild
0c2770ff7b [DOM] Update YouTube embed rewrites.
Youtube's usage patterns have changed regarding video embeds, so we can
remove special handling for the enablejsapi flag.
Applies YouTube embed URL replacement to the path component only.
2025-06-27 23:30:17 +08:00
Moonchild
1c8e994b65 Issue #2762 - Remove SVGZoomEvent interface.
Resolves #2762
2025-06-27 23:29:48 +08:00
Francis Dominic Fajardo
c91730dc7b Issue #2488 - Follow-up: Ensure container is initialized for cloned declaration blocks 2025-06-27 23:29:32 +08:00
Moonchild
3c2c7ce1e2 No issue - Escape < and > in element attribute values.
Per spec, extend escaping of attribute value characters to include
`<` and `>`. We already did this for text fragments, and it makes sense
to apply the same to attribute values. We are at parity with mainstream
that default-escape attribute values this way in current releases.
2025-06-27 23:29:12 +08:00
Moonchild
5960178802 Issue #2723 - Remove obsolete NPN prefs and callbacks.
NPN was removed from NSS a long time ago, this effectively does nothing.
ALPN also should be default-enabled (we do this by pref but the component
itself should have a sane default) so this was flipped as a drive-by fix.

Resolves #2723
2025-06-17 09:29:57 +08:00
Moonchild
51022b98b2 Issue #2734 - Add base-64 grammar check to CSP nonces where applicable.
Resolves #2734
2025-06-17 09:29:05 +08:00
Moonchild
5ae40cfe47 No issue - Update SQLite lib to 3.50.1 and require it as syslib. 2025-06-17 09:28:43 +08:00
Moonchild
2782cded29 Issue #2752 - Change DOMMatrix Rotate{Self}() to the current spec.
This changes Rotate{Self}(angle, translateX, translateY) to
Rotate{Self}(rotateX, rotateY, rotateZ) per the spec.
The resulting matrix will be a 3DMatrix

Resolves #2752
2025-06-17 09:26:52 +08:00
Moonchild
321b75a391 Issue #2751 - Use rounded interpolation value when interpolating the Integer type and Font stretch type, per spec.
Resolves #2751
2025-06-17 09:26:23 +08:00
Moonchild
9c69a34da4 Issue #2721 - Remove nsILinkHandler include from /mailnews 2025-06-17 09:26:05 +08:00
Moonchild
3b1fe322f7 Issue #2721 - Simplify CheckHandleEventForAnchorsPreconditions.
The special case check is no longer necessary after our changes in this
issue and #2732 where <A> no longer applies as a link inside image maps.
2025-06-17 09:25:18 +08:00
Moonchild
c3f1c0cdba Issue #2721 - Remove nsILinkHandler.
This interface inly has a single implementation behind it, which is also
only used in 2 places after the previous commit. That's a lot of
additional complexity and compiler indirection for no good reason.
This change removes the interface and uses direct nsDocShell::Cast calls
instead of going through the interface in the few places left now that
we no longer build on a presentation context for links.
2025-06-17 09:25:00 +08:00
Moonchild
37de431ac0 Issue #2721 - Create special case exception for <A>.Click() outside of DOM
This removes the requirement for there to be a non-null PresShell to
dispatch `Click()` events on `<A>` elements (only), since the exception
to the rule has propagated to the spec.

With these changes it should now be possible do create an anchor and
`Click()` on it from JS without actually first attaching it to the DOM
of the presented document, as abused by scripted downloads in pages
(instead of using the A attribute to custom-name downloads).
2025-06-17 09:24:44 +08:00
yup
72a17a5284 Fix loop for column picker's drop-down menu (#2758)
This fixes an oversight in the loop going over column enumeration for column selection.

Resolves #2759

Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2758
Co-authored-by: yup <yup@no-reply.palemoon.org>
Co-committed-by: yup <yup@no-reply.palemoon.org>
2025-06-17 09:24:10 +08:00
Moonchild
7d099a8080 [devtools] Improve special character escaping for curl 2025-06-17 09:23:44 +08:00
Moonchild
91a026ea65 No issue - Set device contrast to an acceptable value if OOB.
On Mac and Win+DW, enhanced device contrast can possibly not be set.
This throws Skia for a loop by passing in an OOB scalar to its init.
Work around this by setting an accepted average value that helps
prevent font wash-out while not causing fringing.
2025-06-17 09:23:10 +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