Commit Graph

2030 Commits

Author SHA1 Message Date
Norisz Fay
ed41d4347b Backed out changeset 34c5add98599 (bug 1834703) for causing xpcshell failure on test_BrowserUtils_urlFormatting.js CLOSED TREE 2023-05-30 18:13:14 +03:00
CanadaHonk
95143008d3 Bug 1834703 - Return null origin of "blob:" URL containing inner non-"http(s):" URL r=smaug,valentin
Return null origin of a blob URL containing an inner URL which is not of
http/https schemes to comply with new spec change.

Examples:
- "blob:blob:https://example.org/" - inner blob URL
- "blob:ws://example.org/" - inner non-http(s) URL

Spec PR: https://github.com/whatwg/url/pull/771
WPT tests: https://github.com/web-platform-tests/wpt/pull/40133

New WPT tests are not merged into central yet, so tested manually
instead and results are as expected with WPTs.

Differential Revision: https://phabricator.services.mozilla.com/D179400
2023-05-30 14:27:11 +00:00
Emilio Cobos Álvarez
0112dd8e60 Bug 1832528 - Make cors mode part of the image cache key. r=tnikkel
So that we can hold entries loaded with different CORS modes, such as
masks and backgrounds.

Differential Revision: https://phabricator.services.mozilla.com/D177759
2023-05-25 22:25:31 +00:00
Tom Schuster
eca6f717a4 Bug 1825250 - Remove the enum value RFPTarget::IgnoreTargetAndReturnCachedValue and instead indicate changes as a return value. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D176297
2023-05-24 09:38:25 +00:00
Sean Feng
b8c8157d3c Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 18:00:18 +00:00
Norisz Fay
e476e08413 Backed out changeset 6fa00ccfe7e0 (bug 1816287) for causing bustages on LocationBase.cpp CLOSED TREE 2023-05-17 20:11:39 +03:00
Sean Feng
79b4c118c0 Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 16:34:57 +00:00
Edgar Chen
55b21c684d Bug 1832701 - Part 2: Add IPCTransferable for clipboard write parameters; r=nika
Move IPCTransferable* into a separated file to avoid circular dependency and
use `hg cp` in order to keep the history.

Differential Revision: https://phabricator.services.mozilla.com/D178070
2023-05-16 21:25:37 +00:00
Edgar Chen
26bd98cff3 Bug 1832701 - Part 1: Rename IPCDataTransfer* to IPCTransferable*; r=nika
Since IPCDataTransfer* is actually used for nsITransferable, so rename them to
IPCTransferable* as follows,
- Rename IPCDataTransfer to IPCTransferableData.
- Rename IPCDataTransferItem to IPCTransferableDataItem.
- Rename IPCDataTransferData to IPCTransferableDataType.
- Rename IPCDataTransferString to IPCTransferableDataString.
- Rename IPCDataTransferCString to IPCTransferableDataCString.
- Rename IPCDataTransferInputStream to IPCTransferableDataInputStream.
- Rename IPCDataTransferImageContainer to IPCTransferableDataImageContainer.
- Rename IPCDataTransferBlob to IPCTransferableDataBlob.

Differential Revision: https://phabricator.services.mozilla.com/D178069
2023-05-16 21:25:37 +00:00
Iulian Moraru
020a15b35d Backed out 2 changesets (bug 1832701) for causing bc failures on browser_test_clipboardcache.js. CLOSED TREE
Backed out changeset 888814f19788 (bug 1832701)
Backed out changeset 1946d69582b0 (bug 1832701)
2023-05-16 15:54:58 +03:00
Edgar Chen
71159baafb Bug 1832701 - Part 2: Add IPCTransferable for clipboard write parameters; r=nika
Move IPCTransferable* into a separated file to avoid circular dependency and
use `hg cp` in order to keep the history.

Differential Revision: https://phabricator.services.mozilla.com/D178070
2023-05-16 10:51:13 +00:00
Edgar Chen
87ed98a471 Bug 1832701 - Part 1: Rename IPCDataTransfer* to IPCTransferable*; r=nika
Since IPCDataTransfer* is actually used for nsITransferable, so rename them to
IPCTransferable* as follows,
- Rename IPCDataTransfer to IPCTransferableData.
- Rename IPCDataTransferItem to IPCTransferableDataItem.
- Rename IPCDataTransferData to IPCTransferableDataType.
- Rename IPCDataTransferString to IPCTransferableDataString.
- Rename IPCDataTransferCString to IPCTransferableDataCString.
- Rename IPCDataTransferInputStream to IPCTransferableDataInputStream.
- Rename IPCDataTransferImageContainer to IPCTransferableDataImageContainer.
- Rename IPCDataTransferBlob to IPCTransferableDataBlob.

Differential Revision: https://phabricator.services.mozilla.com/D178069
2023-05-16 10:51:13 +00:00
Cristian Tuns
e284336382 Backed out 2 changesets (bug 1832701) for causing build bustages in ipc_message_utils.h CLOSED TREE
Backed out changeset cf53463469ba (bug 1832701)
Backed out changeset 2147a1728010 (bug 1832701)
2023-05-15 16:23:32 -04:00
Edgar Chen
c99ffb66a0 Bug 1832701 - Part 2: Add IPCTransferable for clipboard write parameters; r=nika
Move IPCTransferable* into a separated file to avoid circular dependency and
use `hg cp` in order to keep the history.

Differential Revision: https://phabricator.services.mozilla.com/D178070
2023-05-15 19:12:19 +00:00
Edgar Chen
ae1d51e6b2 Bug 1832701 - Part 1: Rename IPCDataTransfer* to IPCTransferable*; r=nika
Since IPCDataTransfer* is actually used for nsITransferable, so rename them to
IPCTransferable* as follows,
- Rename IPCDataTransfer to IPCTransferableData.
- Rename IPCDataTransferItem to IPCTransferableDataItem.
- Rename IPCDataTransferData to IPCTransferableDataType.
- Rename IPCDataTransferString to IPCTransferableDataString.
- Rename IPCDataTransferCString to IPCTransferableDataCString.
- Rename IPCDataTransferInputStream to IPCTransferableDataInputStream.
- Rename IPCDataTransferImageContainer to IPCTransferableDataImageContainer.
- Rename IPCDataTransferBlob to IPCTransferableDataBlob.

Differential Revision: https://phabricator.services.mozilla.com/D178069
2023-05-15 19:12:19 +00:00
Masayuki Nakano
d8b4f4d3a2 Bug 1829570 - part 1: Create a static method version of AsyncEventDispatcher::RunDOMEventWhenSafe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D176486
2023-05-15 01:07:29 +00:00
Tim Huang
f95a53875d Bug 1831304 - Don't check originAttributes for the system principal in nsContentUtils::ShouldResistFingerprinting(). r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D177157
2023-05-08 13:10:14 +00:00
Emilio Cobos Álvarez
e18825a41e Bug 1830986 - Fix 32-bit builds.
MANUAL PUSH: Trivialish fix CLOSED TREE
2023-05-03 13:33:50 +02:00
Emilio Cobos Álvarez
6f21a57ec6 Bug 1830986 - Make a more precise decision on the StringBuilder unit size. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D177001
2023-05-03 10:44:22 +00:00
Emilio Cobos Álvarez
080e45dc7d Bug 1830986 - Minor StringBuilder clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D177000
2023-05-03 10:44:22 +00:00
Emilio Cobos Álvarez
ee100ae705 Bug 1830986 - Avoid a bunch of allocations in innerHTML / outerHTML getter. r=smaug
One thing that stands out of the profiles in bug 1827132 are a ton of
allocations and attribute lookups.

While the root cause of that performance issue is likely to be a
DOMSubtreeModified event that Chrome doesn't fire or so, those are
rather easy to optimize and might be more generally useful.

I removed handling of `<br type="">`, because editor no longer uses it.
Maybe we can also remove some of the other of the prefixed attribute
shenanigans.

Differential Revision: https://phabricator.services.mozilla.com/D176956
2023-05-03 10:44:22 +00:00
Sean Feng
7ba5b17770 Bug 1830794 - Add the WebIDL support for LargestContentfulPaint r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D167816
2023-05-02 22:12:47 +00:00
Sean Feng
0b97755792 Bug 1830778 - Rename some contentful paint related variables/functions to make it clear they are based on FirstContentfulPaint r=emilio
Currently these functions and related variables are based on
FirstContentfulPaint, however the naming are too generic. With the
LargestContentfulPaint implementation, they will not only
handle paints for FirstContentfulPaint but also LargestContentfulPaint,
so we need to rename them.

Differential Revision: https://phabricator.services.mozilla.com/D151077
2023-05-01 22:11:40 +00:00
Olli Pettay
cf59e24450 Bug 1828293 - don't use AsyncEventDispatcher for dispatching events if not needed, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D175561
2023-04-18 06:46:59 +00:00
Emilio Cobos Álvarez
12594a977d Bug 1827856 - Improve docs of IsInSameAnonymousTree. r=smaug
Depends on D175353

Differential Revision: https://phabricator.services.mozilla.com/D175354
2023-04-14 19:25:24 +00:00
Sean Feng
6b1f172608 Bug 13093 - Don't change cursor when mouseover links during selection r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175055
2023-04-13 11:45:57 +00:00
Tom Ritter
1125c0f97b Bug 1825616: Improve ShouldResistFingerprinting()'s callgraph and documentation r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D174150
2023-04-11 17:15:38 +00:00
Tom Ritter
83df61141b Bug 1824235: Remove testGranularityMask from RFP and rename RFPLite r=timhuang
- Rename RFPLite to privacy.fingerprintingProtection (FPP)
 - Create two pbmode prefs that will enable RFP/FPP in PBMode
   only. The original prefs will enable it in both modes.
 - Make exempting Web Extensions the default behavior
 - If there are website exemptions in the exemptedDomains pref,
   exempt them unconditionally
 - Use the timezone testing pref to determine whether or not we
   call _tzset on Windows

Differential Revision: https://phabricator.services.mozilla.com/D174014
2023-04-11 17:15:35 +00:00
Olli Pettay
b1764a8410 Bug 1819769 - don't dispatch a11y related events when there are no listeners, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D175016
2023-04-11 09:24:21 +00:00
Cristian Tuns
e14196c3ed Backed out 9 changesets (bug 1824235, bug 1825616) for causing xpcshell failures in test_resistfingerprinting_exempt.js CLOSED TREE
Backed out changeset 94c0de377ff6 (bug 1825616)
Backed out changeset eb956b7a7d61 (bug 1824235)
Backed out changeset ffedfd68b8eb (bug 1824235)
Backed out changeset 3a4323845b80 (bug 1824235)
Backed out changeset 6dd6dd7c7eaa (bug 1824235)
Backed out changeset c67d6cdac35d (bug 1824235)
Backed out changeset 99b39ad39149 (bug 1824235)
Backed out changeset 4fa248349496 (bug 1824235)
Backed out changeset 75dae793ba7e (bug 1824235)
2023-04-10 13:43:00 -04:00
Tom Ritter
c1234b4988 Bug 1825616: Improve ShouldResistFingerprinting()'s callgraph and documentation r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D174150
2023-04-10 16:37:50 +00:00
Tom Ritter
f82c04acbc Bug 1824235: Remove testGranularityMask from RFP r=timhuang
- Create two pbmode prefs that will enable RFP/RFPLite in PBMode
   only. The original prefs will enable it in both modes.
 - Make exempting Web Extensions the default behavior
 - If there are website exemptions in the exemptedDomains pref,
   exempt them unconditionally
 - Use the timezone testing pref to determine whether or not we
   call _tzset on Windows

Differential Revision: https://phabricator.services.mozilla.com/D174014
2023-04-10 16:37:46 +00:00
Tom Ritter
8e410957a3 Bug 1824433: Handle TRRServiceChannel in ShouldResistFingerprinting r=timhuang,tschuster
If the CookieJarSettings is not implemented, return false.

Also, change the error behavior to also return false - we
don't need to immediately return true on error here, because
it may be the case that something else indicates we should not
Resist Fingerprinting (e.g. maybe the TRR connection is to an
exempted domain.)

Because we are no longer returning early, we need to check if
principal is null, as sometimes it might be now.

Differential Revision: https://phabricator.services.mozilla.com/D173564
2023-04-03 19:58:51 +00:00
Tom Ritter
8126391f4d Bug 1815307: Make all ShouldRFP functions take a RTPTarget r=timhuang
The default value for the target is Unknown, so all callsites
keep working.

We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later.  (The later
computations will still check the Target, but won't need to do the
other expensive checks.)

Differential Revision: https://phabricator.services.mozilla.com/D170891
2023-03-21 14:14:48 +00:00
Tom Ritter
e65d9788d7 Bug 1815307: Reconfigure the headers so types will be accessible in the right place without conflicts r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170890
2023-03-21 14:14:47 +00:00
Tom Ritter
b757fad479 Bug 1815307: Lay the groundwork for the IsRFPEnabledFor function r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170889
2023-03-21 14:14:47 +00:00
Emilio Cobos Álvarez
f69a397491 Bug 1449669 - Remove IsNodeOfType. r=longsonr
Depends on D172893

Differential Revision: https://phabricator.services.mozilla.com/D172894
2023-03-17 19:22:14 +00:00
Cristina Horotan
1b7f31569f Backed out 7 changesets (bug 1815307) for causing mochitest failures at test_bug1729861.html CLOSED TREE
Backed out changeset 18c8ae091952 (bug 1815307)
Backed out changeset df49c162e4ad (bug 1815307)
Backed out changeset a22d49909ffa (bug 1815307)
Backed out changeset 371d1d626984 (bug 1815307)
Backed out changeset 7f4b594cf468 (bug 1815307)
Backed out changeset 83d79fcbded5 (bug 1815307)
Backed out changeset 337dfbf6a1f9 (bug 1815307)
2023-03-16 17:51:56 +02:00
Tom Ritter
c3c3d10155 Bug 1815307: Make all ShouldRFP functions take a RTPTarget r=timhuang
The default value for the target is Unknown, so all callsites
keep working.

We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later.  (The later
computations will still check the Target, but won't need to do the
other expensive checks.)

Differential Revision: https://phabricator.services.mozilla.com/D170891
2023-03-16 13:53:13 +00:00
Tom Ritter
44a40bc059 Bug 1815307: Reconfigure the headers so types will be accessible in the right place without conflicts r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170890
2023-03-16 13:53:12 +00:00
Tom Ritter
81ae31b49c Bug 1815307: Lay the groundwork for the IsRFPEnabledFor function r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170889
2023-03-16 13:53:12 +00:00
Christoph Kerschbaumer
a57b34007c Bug 1819898: Use internal content policy types for determining IsUpgradableDisplayType, r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D171569
2023-03-06 10:08:00 +00:00
Ms2ger
a67edf23e6 Bug 1819287 - Make nsContentUtils::StringifyJSON more flexible; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171215
2023-03-02 15:47:40 +00:00
Ms2ger
cdcc699d45 Bug 1819287 - Move helper function for nsContentUtils::StringifyJSON and remove no-op casts; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171214
2023-03-02 15:47:39 +00:00
Ms2ger
030a035a20 Bug 1819287 - Pass an immutable Handle to nsContentUtils::StringifyJSON; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D171212
2023-03-02 15:47:38 +00:00
Edgar Chen
32e340fa3b Bug 1817166 - Remove unused argument from nsContentUtils::TransferableToIPCTransferable; r=nika
After Bug 1781129, aChild is no longer needed to allocate Shmem, but aParent is
still needed to grant access for file in https://searchfox.org/mozilla-central/rev/b579290e6b830d1b3f0a941203b0c0e1e56c42a3/dom/base/nsContentUtils.cpp#8171-8182.

Differential Revision: https://phabricator.services.mozilla.com/D170063
2023-02-16 16:56:53 +00:00
Sean Feng
e34e4f4a5a Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Spec: https://html.spec.whatwg.org/#the-autofocus-attribute

Differential Revision: https://phabricator.services.mozilla.com/D160127
2023-02-15 20:08:36 +00:00
Csoregi Natalia
35e053d28d Backed out 7 changesets (bug 1444491, bug 1801761) for causing failures on autofocus-attribute.svg. CLOSED TREE
Backed out changeset 1cee414009cb (bug 1444491)
Backed out changeset 30f786b79191 (bug 1444491)
Backed out changeset ce06375518a7 (bug 1801761)
Backed out changeset 64c8bb293e5c (bug 1444491)
Backed out changeset 94aa0ce630f2 (bug 1444491)
Backed out changeset 80010eabc0c1 (bug 1444491)
Backed out changeset 7d8da1f44177 (bug 1444491)
2023-02-15 19:03:59 +02:00
Sean Feng
6be4df850b Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Spec: https://html.spec.whatwg.org/#the-autofocus-attribute

Differential Revision: https://phabricator.services.mozilla.com/D160127
2023-02-15 14:13:40 +00:00
Andreas Farre
04070c95dc Bug 1795312 - Don't Base64 encode principals when serializing. r=peterv
Base64 encoding is done to top-level principal and the sub-principals
of expanded principals. Getting rid of the Base64 encoding entirely
also lets us use jsoncpp consider expanded principals to be entirely
serialized as JSON.

Differential Revision: https://phabricator.services.mozilla.com/D166783
2023-02-14 10:17:16 +00:00