Commit graph

1,600 commits

Author SHA1 Message Date
roytam1
0d1cf674f0 Merge remote-tracking branch 'origin/tracking' into custom 2024-07-10 14:55:58 +08:00
Moonchild
7cc4dcb680 Issue #2546 - Part 6: Remove canvas.imagebitmap_extensions.enabled preference. 2024-07-10 14:51:38 +08:00
Moonchild
aaf2dd416c Issue #2546 - Part 5: Remove tests 2024-07-10 14:51:18 +08:00
Moonchild
b1e5955ceb Issue #2546 - Part 4: Remove mappedDataLength and findOptimalFormat 2024-07-10 14:50:59 +08:00
Moonchild
1bc0eda791 Issue #2546 - Part 3: Remove mapDataInto 2024-07-10 14:50:41 +08:00
Moonchild
2b8d75e136 Issue #2546 - Part 2: Remove special FoxEye CreateImageBitmap method. 2024-07-10 14:50:16 +08:00
Moonchild
60fbaa2155 Issue #2546 - Part 1: Remove BufferSource support in CreateImageBitmap. 2024-07-10 14:50:00 +08:00
Moonchild
fffe6c4996 Issue #2542 - Part 7: Move SecFetch.* to /netwerk where it belongs. 2024-07-10 14:49:06 +08:00
Moonchild
53149ed646 Issue #2542 - Part 6: Add Sec-Fetch-User header for all requests that are the direct result of a system principal request.
This means navigation resulting from interaction with the browser UI
should result in a -user header (address bar navigation, bookmarks, etc.)
2024-07-10 14:48:35 +08:00
Moonchild
0ef8b05101 Issue #2542 - Part 5: Assume browser-initiated requests for unspecified content types to always be user-triggered. 2024-07-10 14:48:15 +08:00
Moonchild
9846090a38 Issue #2542 - Part 4b: Fix pointer mess-up. 2024-07-10 14:47:58 +08:00
Moonchild
65a588ba17 Issue #2542 - Part 4: Use BasePrincipal's IsSameOrigin() in SecFetch. 2024-07-10 14:47:20 +08:00
Moonchild
8ee9e3bc52 Issue #2542 - Part 2b: Fix typo in pref check 2024-07-10 14:46:36 +08:00
Moonchild
8076de8965 Issue #2542 - Part 2: Base implementation of Sec-Fetch-* header code.
Currently following Mozilla putting stuff in /dom for additional porting,
but it's actually the wrong location since it belongs in /netwerk with
the other code that deals with http headers.
2024-07-10 14:45:39 +08:00
Moonchild
1f4b858be2 Issue #2542 - Part 1b: Fix dom.securecontext.whitelist code issues
Some minor bugfixes (wrong condition and string type)
2024-07-10 14:44:56 +08:00
Moonchild
0c71a6ada0 Issue #2542 - Part 1: Factor out Potentially Trustworthy URI checks.
For sake of ease of use, converted to boolean functions that just assume "false"
in case of errors.

Note: Mozilla makes special arrangements for .onion addresses as well but
we explicitly do not adopt that. TOR browser can do that all day if it wants.
2024-07-10 14:44:37 +08:00
roytam1
c416859636 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-24 23:12:00 +08:00
Moonchild
af227c4574 Issue #2534 - Part 2: Update tests 2024-06-24 23:11:39 +08:00
Moonchild
fb16b1b4ae Issue #2534 - Part 1: window.postMessage should provide a trusted MessageEvent 2024-06-24 23:11:25 +08:00
Moonchild
22f745761b Issue #2536 - Re-implement plugin enumeration shuffle.
Resolves #2536
2024-06-24 23:11:06 +08:00
roytam1
a2f81bc791 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-17 16:15:30 +08:00
Moonchild
6a200d5284 No Issue - Add navigator.webdriver attribute.
This patch adds an enumerable, configurable, readonly attribute "webdriver" to
the Navigator object. The attribute is always false because we do not support
WebDriver or scripted automation.

The navigator.webdriver attribute is meant as an indication to web authors that
a document is visited by WebDriver. It is important to stress that it is not
meant as a way to detect that a website is being visited by a browser automation
tool or bot, but as a tool for web documents to take alternate code paths.

On the off-chance exposing navigator.webdriver turns out to be catastrophic,
we put it behind a new preference dom.webdriver.enabled that controls its
exposure.
2024-06-17 16:14:48 +08:00
Moonchild
1db268ef50 Issue #2532 - Align dialog submission triggered by form.submit() with the spec.
Submission in click handler of submit button should not be deferred
per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog

See Bug 1719872
2024-06-17 16:12:14 +08:00
Moonchild
f50948c82a Issue #2532 - Fix a null pointer crash while doing dialog form submission
See Bug 1652699
2024-06-17 16:11:29 +08:00
Moonchild
f598fe63cd Issue #2532 - Default pref check to true 2024-06-17 16:11:07 +08:00
Moonchild
6ee3f46900 Issue #2532 - Implement form[method=dialog]
See bug 1557303
2024-06-17 16:10:50 +08:00
roytam1
d835b252d7 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-13 11:32:08 +08:00
Moonchild
a2417d573b [DOM] Clone video info properly. 2024-06-13 11:28:58 +08:00
roytam1
a30e0e7448 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-11 10:15:00 +08:00
Moonchild
359a4a2069 Issue #2524 - Implement smart granularity for canvas poisoning.
User-configurable time interval between 1s and 8h. Default 5 minutes.
Resolves #2524
2024-06-11 10:14:09 +08:00
roytam1
75b0995d95 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-06 14:13:50 +08:00
Moonchild
91fc5614ec Issue #1749 - Remove restriction of SVG width/height element attributes.
According to the original SVG spec, the SVG element in documents had to follow
special rules as to what was allowed for width/height attributes. This is no
longer the case, so we can decouple it from whatever internal units SVG/XML
language uses and allow all units like every other element.
2024-06-06 14:11:31 +08:00
roytam1
5f2d0b3c95 Merge remote-tracking branch 'origin/tracking' into custom 2024-06-04 10:16:58 +08:00
Moonchild
7381521cf7 Issue #2518 - Make various arguments optional in XPathEvaluator/XPathExpression.
Resolves #2518
2024-06-04 10:16:17 +08:00
roytam1
f8f3b3ee43 Merge remote-tracking branch 'origin/tracking' into custom 2024-05-22 15:26:11 +08:00
Moonchild
22830d18cf [DOM] Clean up ReportLoadError and normalize error messages. 2024-05-22 15:21:54 +08:00
roytam1
390799012c Merge remote-tracking branch 'origin/tracking' into custom 2024-05-08 10:05:44 +08:00
Brian Smith
de8213f561 Issue #2472 - Part 8: Fix conflicting defines on Mac. 2024-05-08 10:03:58 +08:00
Moonchild
87a7cf7332 Issue #2472 - Part 6: Fire cancel event and close modal <dialog> on [ESC]
This implementation is different than Mozilla, not indirectly queueing cancel
tasks to be arbitrarily ordered, but rather synchronously close in reverse
top layer order.
2024-05-08 09:57:53 +08:00
Moonchild
7d34b285e0 Issue #2472 - Part 5: Make modal versions of <dialog> work, and tune styles.
This adds a pseudo-class `:-moz-modal-dialog` to be able to track whether the
dialog is in the top layer in CSS.
This implements default styling for modal dialogs following the HTML standard.
Slightly off-extreme color scheme chosen for unstyled <dialog> elements.
2024-05-08 09:57:29 +08:00
Moonchild
7a04afab4a Issue #2472 - Part 4: Make TopLayer{Push|Pop} part of nsIDocument. 2024-05-08 09:55:38 +08:00
Moonchild
79c7489bb0 Issue #2472 - Part 3: Refactor Fullscreen stack to Top Layer stack
Fullscreen stack isn't part of the spec anymore; it's been changed to a more
generic version called Top Layer stack, which is being used by both full-screen
APIs and dialog elements.

This patch refactors it to Top Layer stack so that it can be reused for dialog
elements.

Top Layer stack spec: https://fullscreen.spec.whatwg.org/#new-stacking-layer
2024-05-08 09:55:18 +08:00
Moonchild
3058bef840 Issue #2472 - Part 1: Add helper method to directly dispatch events to widgets. 2024-05-08 09:53:11 +08:00
roytam1
552db66da0 Merge remote-tracking branch 'origin/tracking' into custom 2024-04-19 09:37:04 +08:00
Moonchild
9eaee03eb4 [dom media] Avoid a potential issue when assigning a media data buffer. 2024-04-19 09:35:53 +08:00
roytam1
aed4ca8fc5 Merge remote-tracking branch 'origin/tracking' into custom 2024-04-16 15:16:58 +08:00
Moonchild
35d7a1fe5a Issue #2503 - Part 1: add CPU IS support flags to Navigator interface 2024-04-16 14:58:41 +08:00
Moonchild
2811d30051 [DOM] Add nullcheck on mDoc in GetEventTargetParent 2024-04-16 14:58:23 +08:00
roytam1
0acd996e03 dom: check mDoc before use, as it can be null 2024-04-14 20:39:31 +08:00
roytam1
5479b6d9c0 Merge remote-tracking branch 'origin/tracking' into custom 2024-04-11 15:58:11 +08:00