Commit graph

1,810 commits

Author SHA1 Message Date
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
roytam1
a88fbfa671 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-31 07:41:04 +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
roytam1
4c1a4a4402 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-29 10:44:33 +08:00
MeladJM
429e05c8a1 Issue #2790 - Cleanup: Correct whitespaces 2025-07-29 10:44:03 +08:00
MeladJM
70cbf0dfd3 Issue #2790 - Cleanup: Remove whitespaces 2025-07-29 10:41:22 +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
roytam1
7e0ddfef73 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-25 20:53:55 +08:00
Francis Dominic Fajardo
e05d4d8306 Issue #2828 - Part 5: Implement child rule processors 2025-07-25 20:50:57 +08:00
Francis Dominic Fajardo
03f29e75ec Issue #2828 - Part 3: Refactor selector matching and rule cascade data into separate files/classes 2025-07-25 20:47:06 +08:00
roytam1
be6796bb20 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-25 07:33:44 +08:00
Moonchild
f902d2ad0e [DOM] Make object loading use an explicit scheme whitelist. 2025-07-25 07:33:16 +08:00
Moonchild
0a8f50fafa No issue - Adjust CSP URI reporting more closely with the spec.
According to the W3C discussion we should allow websocket URIs to be
reported aside from http/https/ftp ones.
This rewrites things slightly and updates comments to clarify.
We do retain the non-standard reduction to origin only in case the
report is for cross-origin URIs (stops leaking full URIs to the CSP
reported destination).
See https://github.com/w3c/webappsec-csp/issues/735
2025-07-25 07:30:32 +08:00
roytam1
b59402a1f9 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-16 15:39:18 +08:00
Francis Dominic Fajardo
c8608ad5cf Issue #2736 - Follow-up: Stop using worker thread-only functions for checking if CSP is enabled
Should stop the barrage of worker thread assertions on debug builds.
2025-07-16 15:21:31 +08:00
MeladJM
5e8e1208e7 Issue #2499 - Part 3: Add CSS clip overflow support with serialization fixes 2025-07-16 15:20:45 +08:00
roytam1
fbb39ce322 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-08 10:02:11 +08:00
Andy
b11affbdf3 Issue #2106 - Clean-up: Un-prefix -moz-user-select in Comments 2025-07-08 10:01:21 +08:00
Andy
abb891ff26 Issue #2106 - Follow-up: Un-prefix DOM Attribute MozUserSelect 2025-07-08 10:00:32 +08:00
Andy
1a5b3dcae6 Issue #2106 - Follow-up: Additional Un-prefixing 2025-07-08 10:00:02 +08:00
roytam1
bd335d6284 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-07 11:59:17 +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
roytam1
9175504ffc Merge remote-tracking branch 'origin/tracking' into custom 2025-07-04 22:28:17 +08:00
Andy
4cc014cb6b Unprefix -moz-read-write / -moz-read-only 2025-07-04 22:27:22 +08:00
roytam1
f4d2bf6c3d Merge remote-tracking branch 'origin/tracking' into custom 2025-06-27 23:33:55 +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
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
roytam1
6414271c91 Merge remote-tracking branch 'origin/tracking' into custom 2025-06-17 09:32:50 +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
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
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
roytam1
4cb39ffa48 webaudio: don't use C++17 std::clamp, use std::min(max, std::max(min, v)) instead. 2025-05-27 23:48:17 +08:00
roytam1
7f3ccb5dc3 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-27 23:22:51 +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
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
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