Commit Graph

1994 Commits

Author SHA1 Message Date
Dan Robertson
9366764be0 Bug 1733981: Allow single range header values without preflight. r=twisniewski,necko-reviewers,kershaw
The Range header was added as a safe-listed header as long as the value
is in a particular format. Update IsCORSSafelistedRequestHeader
implementations to account for this.

Differential Revision: https://phabricator.services.mozilla.com/D182861
2023-07-10 12:03:29 +00:00
Norisz Fay
9ac3ab923d Backed out changeset 87f35bfe2247 (bug 1733981) for causing failures on general.any.serviceworker.html CLOSED TREE 2023-07-09 16:14:45 +03:00
Dan Robertson
e2f05941e1 Bug 1733981: Allow single range header values without preflight. r=twisniewski,necko-reviewers,kershaw
The Range header was added as a safe-listed header as long as the value
is in a particular format. Update IsCORSSafelistedRequestHeader
implementations to account for this.

Differential Revision: https://phabricator.services.mozilla.com/D182861
2023-07-09 03:00:27 +00:00
Cosmin Sabou
e95c3a2ccb Backed out changeset ee68eebc7bfd (bug 1733981) for causing range related wpt unexpected passes. CLOSED TREE 2023-07-08 17:43:27 +03:00
Dan Robertson
a366c27aa0 Bug 1733981: Allow single range header values without preflight. r=twisniewski,necko-reviewers,kershaw
The Range header was added as a safe-listed header as long as the value
is in a particular format. Update IsCORSSafelistedRequestHeader
implementations to account for this.

Differential Revision: https://phabricator.services.mozilla.com/D182861
2023-07-08 13:07:02 +00:00
Sean Feng
16ad52a74f Bug 1792110 - Update the common ancestor finding logic for mouseup with mousedown r=edgar
The existing function doesn't not work for cases like when mousedown
and mouseup were happened in the same hierarchy but the mousedown target
was a different interactive element than the mouseup target. This
could be easily accomplished by setting `pointer-events: none` or
`display: none` to the `active` pseudo-class of the mousedown target.

This patch fixes this by when the logic tries to find the event target
tree of the mousedown target, it continues building up (by recursively looking
up the parents) the tree instead of stopping at the first interactive element.

Differential Revision: https://phabricator.services.mozilla.com/D178844
2023-07-07 19:08:40 +00:00
Nika Layzell
b783e25bea Bug 1840647 - Part 1: Fix callers of GetWebExposedOriginSerialization in AntiTracking, r=smaug,anti-tracking-reviewers,timhuang
I have done my best to figure out what these specific call-sites
actually want to be using, however I do not understand the AntiTracking
implementation. Please look over these callers somewhat carefully to
make sure this is actually the desired behaviour.

It seems like the majority of these cases are in places where
`OriginNoSuffix` has been mixed up with
`GetWebExposedOriginSerialization`. This makes sense, as these will be
identical strings for the majority of web-exposed URLs. The big
differences between the two are with other URL types, like null
principals.

The logic seems somewhat inconsistent about its handling of origin
attributes, which was also confusing when reading through it. I've tried
to align with the existing code when possible.

Differential Revision: https://phabricator.services.mozilla.com/D182226
2023-07-07 17:08:35 +00:00
Norisz Fay
b6b72da567 Backed out 5 changesets (bug 1792110) for causing ThreadSanitizer related failures CLOSED TREE
Backed out changeset 66ee3cdf67e0 (bug 1792110)
Backed out changeset 510ddee05cfc (bug 1792110)
Backed out changeset c29961741ee1 (bug 1792110)
Backed out changeset 9cfe7f3b3e3e (bug 1792110)
Backed out changeset d492bd7d93d7 (bug 1792110)
2023-07-06 23:02:57 +03:00
Sean Feng
76e3357bf9 Bug 1792110 - Update the common ancestor finding logic for mouseup with mousedown r=edgar
The existing function doesn't not work for cases like when mousedown
and mouseup were happened in the same hierarchy but the mousedown target
was a different interactive element than the mouseup target. This
could be easily accomplished by setting `pointer-events: none` or
`display: none` to the `active` pseudo-class of the mousedown target.

This patch fixes this by when the logic tries to find the event target
tree of the mousedown target, it continues building up (by recursively looking
up the parents) the tree instead of stopping at the first interactive element.

Differential Revision: https://phabricator.services.mozilla.com/D178844
2023-07-06 17:04:51 +00:00
Adam Vandolder
ef3648dda8 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-28 16:28:27 +00:00
avandolder
f102e83b63 Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-28 04:31:22 +00:00
Tom Ritter
c85ef80084 Bug 1825561: Add in the ETP Toggle check to the ShouldRFP callgraph r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D174166
2023-06-28 04:05:59 +00:00
Nika Layzell
30c48eac49 Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

This new name is long, but explicit. The string returned from this
function corresponds to the "serialization of an origin" from the WHATWG
html spec:
https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin

Differential Revision: https://phabricator.services.mozilla.com/D181794
2023-06-27 19:59:15 +00:00
Tom Ritter
15951df9ce Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-27 03:31:02 +00:00
Butkovits Atila
657a392da8 Backed out 9 changesets (bug 1830070) for causing failures at browser_hwconcurrency_popups_blob_noopener.js. CLOSED TREE
Backed out changeset 62f439f5b2ad (bug 1830070)
Backed out changeset 92b5f8af326f (bug 1830070)
Backed out changeset ae685d3825b7 (bug 1830070)
Backed out changeset 4800b1312e99 (bug 1830070)
Backed out changeset 7ea9676f22ae (bug 1830070)
Backed out changeset 7a86f85ae0e8 (bug 1830070)
Backed out changeset 0a2d5f339e41 (bug 1830070)
Backed out changeset 7e5b72c73304 (bug 1830070)
Backed out changeset e4490bf3d040 (bug 1830070)
2023-06-27 00:12:07 +03:00
Tom Ritter
a8188fe583 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-26 17:04:40 +00:00
Tim Huang
0adcccb7d5 Bug 1834622 - Don't check originAttributes for addon principals in nsContentUtils::ShouldResistFingerprinting(). r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181863
2023-06-26 08:20:43 +00:00
Emilio Cobos Álvarez
529c9ee321 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Emilio Cobos Álvarez
a1007b18c6 Bug 1839223 - Remove nsMappedAttributes. r=smaug
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.

A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.

Differential Revision: https://phabricator.services.mozilla.com/D181549
2023-06-22 17:22:03 +00:00
Cristian Tuns
f54a728824 Backed out changeset a3e55d5f9f13 (bug 1839223) for causing multiple failures in Document.cpp CLOSED TREE 2023-06-22 11:34:15 -04:00
Emilio Cobos Álvarez
a28183ac0e Bug 1839223 - Remove nsMappedAttributes. r=smaug
Instead, lazily schedule evaluation of them before styling, much like we
were doing for SVG.

A subtle tweak is that we only remain scheduled while in the document.
This allows us to use the "in document" bit plus the "mapped attributes
dirty" bit to know our scheduled status. It also prevents doing silly
work for disconnected elements, and having to do hashmap lookups on
adoption and node destruction.

Differential Revision: https://phabricator.services.mozilla.com/D181549
2023-06-22 14:31:16 +00:00
Narcis Beleuzu
cc4bdd4642 Backed out changeset 2d7083c6241d (bug 1834703) for bc failure on browser_wpi_isolate_high_value.js 2023-06-21 14:11:57 +03:00
CanadaHonk
fd18a19c85 Bug 1834703 - Return null origin of "blob:" URL containing disallowed inner schemes r=smaug,valentin
Return null origin of a blob URL containing an inner URL which is not of
some schemes (https, http, file per spec) to comply with new spec changes.
Allowed schemes also include moz-extension for our own purposes.

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

16 WPT subtests newly pass 🎉

Differential Revision: https://phabricator.services.mozilla.com/D179400
2023-06-21 07:01:49 +00:00
Iulian Moraru
946fa366f4 Backed out changeset 9fb58fa7b8b6 (bug 1556358) for causing wpt failures on ElementInternals-setFormValue.html. CLOSED TREE 2023-06-20 08:16:50 +03:00
avandolder
ebc03e8550 Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-20 01:29:58 +00:00
Natalia Csoregi
b7b52b54bd Backed out 8 changesets (bug 1830070) for causing assertion failures on nsAboutProtocolUtils.h. CLOSED TREE
Backed out changeset 05c4b06857fb (bug 1830070)
Backed out changeset f264c5b9c200 (bug 1830070)
Backed out changeset 45032e474c29 (bug 1830070)
Backed out changeset fa89c51ef6fc (bug 1830070)
Backed out changeset f0f70e7c8250 (bug 1830070)
Backed out changeset 785e1775c13d (bug 1830070)
Backed out changeset 582e28b83b50 (bug 1830070)
Backed out changeset de379bee27d0 (bug 1830070)
2023-06-19 23:51:04 +03:00
Tom Ritter
70a1fd7aae Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-19 20:03:27 +00:00
Cristian Tuns
cb04ba3bc5 Backed out 8 changesets (bug 1830070) for causing build bustages in nsContentUtils.cpp CLOSED TREE
Backed out changeset e1fea00fd3d4 (bug 1830070)
Backed out changeset 2b18a4962ce4 (bug 1830070)
Backed out changeset db1529c19fb3 (bug 1830070)
Backed out changeset c84325c71e91 (bug 1830070)
Backed out changeset dc7d31b22ca7 (bug 1830070)
Backed out changeset 7cf935920d9a (bug 1830070)
Backed out changeset e41d8c2f85df (bug 1830070)
Backed out changeset e962979d701e (bug 1830070)
2023-06-19 14:25:09 -04:00
Natalia Csoregi
0b693ec882 Backed out changeset 08f12e7fa5f0 (bug 1556358) for causing bustage on ElementInternals.cpp. CLOSED TREE 2023-06-19 21:15:17 +03:00
Tom Ritter
c5bee5007d Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-19 18:08:04 +00:00
avandolder
23dce8037c Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-19 17:22:01 +00:00
Norisz Fay
496c99b742 Backed out changeset 1680323680fe (bug 1556358) for causing Bb bustages on ElementInternals.cpp CLOSED TREE 2023-06-19 18:33:35 +03:00
Adam Vandolder
c1d69f579f Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Depends on D175542

Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-19 13:44:15 +00:00
Stanca Serban
3b192df9e2 Backed out 3 changesets (bug 1556358) for causing Bb build bustages in ElementInternals.cpp. CLOSED TREE
Backed out changeset f7e94ea82252 (bug 1556358)
Backed out changeset c80f29a9cefc (bug 1556358)
Backed out changeset 413225d91666 (bug 1556358)
2023-06-16 19:46:02 +03:00
Adam Vandolder
2e19750c08 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-16 15:02:11 +00:00
Adam Vandolder
de0a2c439f Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Depends on D175542

Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-16 15:02:11 +00:00
Cristian Tuns
a2f225ddb0 Backed out 8 changesets (bug 1830070) for causing build bustages in nsContentUtils.cpp CLOSED TREE
Backed out changeset 4726b70822cf (bug 1830070)
Backed out changeset dd73f3c56f5e (bug 1830070)
Backed out changeset 3628e8b8d28a (bug 1830070)
Backed out changeset dfbd51c0a3a6 (bug 1830070)
Backed out changeset 3d372cedcfdb (bug 1830070)
Backed out changeset 443d83b8fe70 (bug 1830070)
Backed out changeset 3ed6c302f108 (bug 1830070)
Backed out changeset 919b884d5a2b (bug 1830070)
2023-06-14 23:37:36 -04:00
Tom Ritter
30f9637d62 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-15 03:08:15 +00:00
Noemi Erli
4d4d467468 Backed out 3 changesets (bug 1556358) for causing bustages in ElementInternals.cpp CLOSED TREE
Backed out changeset 0ebda393786b (bug 1556358)
Backed out changeset c41794eef66a (bug 1556358)
Backed out changeset a07e3e226569 (bug 1556358)
2023-06-15 01:32:38 +03:00
Adam Vandolder
1d87566f58 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-14 20:59:29 +00:00
Adam Vandolder
138ee92ee6 Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Depends on D175542

Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-14 20:59:29 +00:00
Tom Schuster
9169aac584 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting_dangerous non-optional. r=tjr,cookie-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D180668
2023-06-14 13:34:59 +00:00
Tom Schuster
7014e9b592 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with justification non-optional. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180667
2023-06-14 13:34:59 +00:00
Tom Schuster
56e8912bca Bug 1837153 - Make RFPTarget parameter of bare ShouldResistFingerprinting non-optional. r=tjr,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D180666
2023-06-14 13:34:59 +00:00
Tom Schuster
1ef8bc1220 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with nsILoadInfo non-optional. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180431
2023-06-14 13:34:59 +00:00
Olli Pettay
f6792e72e5 Bug 1838248 - don't assume docshell's GetDocument returns non-null, r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D180868
2023-06-13 20:15:17 +00:00
Tom Schuster
8f9c47f362 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with nsIChannel non-optional. r=tjr,cookie-reviewers,timhuang,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180199
2023-06-13 19:32:17 +00:00
Cristian Tuns
f44bc90cc2 Backed out 4 changesets (bug 1837582, bug 1837153) for causing build bustages in nsGlobalWindowInner.cpp on Android CLOSED TREE
Backed out changeset e17bfa5f8959 (bug 1837153)
Backed out changeset 662b7f7504b9 (bug 1837582)
Backed out changeset 7c5fa154397d (bug 1837153)
Backed out changeset b447d95efe6e (bug 1837153)
2023-06-12 06:23:38 -04:00
Tom Schuster
3b3ad36319 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with nsILoadInfo non-optional. r=tjr
Depends on D180430

Differential Revision: https://phabricator.services.mozilla.com/D180431
2023-06-12 09:48:03 +00:00
Tom Schuster
122e372683 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with nsIChannel non-optional. r=tjr,cookie-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D180199
2023-06-12 09:48:03 +00:00