Commit Graph

422 Commits

Author SHA1 Message Date
Masayuki Nakano
25bc05a445 Bug 1232918 - Map Windows Logo keys in Win/Linux to Meta and rename OSLeft/OSRight to MetaLeft/MetaRight r=smaug,webdriver-reviewers,jdescottes,media-playback-reviewers,karlt
When we implement `KeyboardEvent.key`, its value for Windows Logo key was
declared as `OS`, but now the spec declares it as `Meta`.

When we implement `KeyboardEvent.code`, its value for Windows Logo keys in
Win/Linux and Command keys in macOS are declared as `OSLeft`/`OSRight`, but
now the spec declares them as `MetaLeft`/`MetaRight`.

This patch remaps and renames them.

Differential Revision: https://phabricator.services.mozilla.com/D183481
2023-08-07 01:03:58 +00:00
Cristian Tuns
02ef83ec78 Backed out 2 changesets (bug 1266437, bug 1232918) for causing mochitest failures in test_autoplay_policy_key_blacklist.html CLOSED TREE
Backed out changeset 33e3c6593d4b (bug 1232918)
Backed out changeset 1b56e99dd221 (bug 1266437)
2023-08-03 23:29:52 -04:00
Masayuki Nakano
763fa124d0 Bug 1232918 - Map Windows Logo keys in Win/Linux to Meta and rename OSLeft/OSRight to MetaLeft/MetaRight r=smaug,webdriver-reviewers,jdescottes
When we implement `KeyboardEvent.key`, its value for Windows Logo key was
declared as `OS`, but now the spec declares it as `Meta`.

When we implement `KeyboardEvent.code`, its value for Windows Logo keys in
Win/Linux and Command keys in macOS are declared as `OSLeft`/`OSRight`, but
now the spec declares them as `MetaLeft`/`MetaRight`.

This patch remaps and renames them.

Differential Revision: https://phabricator.services.mozilla.com/D183481
2023-08-04 00:10:12 +00:00
Tom Schuster
2454d6dc41 Bug 1843841 - Make navigator.appName constant. r=dom-worker-reviewers,webidl,smaug,timhuang
This is supposed to constant per https://html.spec.whatwg.org/#client-identification.

Differential Revision: https://phabricator.services.mozilla.com/D183723
2023-07-19 17:00:53 +00:00
Masatoshi Kimura
35fb68a780 Bug 1841425 - Re-enable 32-bit Windows UA tests. r=necko-reviewers,jesup,cpeterson
Differential Revision: https://phabricator.services.mozilla.com/D182892
2023-07-07 09:40:04 +00:00
Chris Peterson
d22d8518c3 Bug 1841215 - Hard code UA string's macOS version as 10.15. r=necko-reviewers,jesup
Firefox 115 is the last version to support macOS versions < 10.15 (bug 1836375). Firefox (like Safari and Chrome) already caps the UA string's macOS version at 10.15 to avoid webcompat breakage from sites not expecting macOS versions >= 11.0 (bug 1679929).

Since the UA string's macOS version will no longer be < 10.15 or > 10.15, we can now hard code the UA string's macOS version as 10.15.

Differential Revision: https://phabricator.services.mozilla.com/D182585
2023-07-04 17:19:27 +00:00
Tom Ritter
55f6064d6a Bug 1825561: Add a test case for the weird RFP/FPP combination case r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179251
2023-06-28 04:05:59 +00:00
Tom Ritter
3c8db1eac5 Bug 1825561: Refactor the test suite harness to support PBM tests, and add some to the ETP test r=timhuang
I had to trial-and-error my way through using BrowserTestUtils
but I think the result is a bit easier to read and understand.
Although the diff is pretty ugly.

Differential Revision: https://phabricator.services.mozilla.com/D179250
2023-06-28 04:05:59 +00:00
Tom Ritter
64583755a0 Bug 1825561: Add a test for FPP r=timhuang
This adds the infrastructure for a simpleFPP test into head.js

Then it adds the test for browser_hwconcurrency_etp_iframes.js
that behaves differently from the simpleRFP test.

And then it adds the simpleFPP test to every hardware concurrency
test just to double check things.

Depends on D179108

Differential Revision: https://phabricator.services.mozilla.com/D179249
2023-06-28 04:05:59 +00:00
Tom Ritter
d0216b9f0c Bug 1825561: Add a test for the ETP toggle exempting RFP r=timhuang
Depends on D179107

Differential Revision: https://phabricator.services.mozilla.com/D179108
2023-06-28 04:05:59 +00:00
Tom Ritter
d77033d907 Bug 1830070: Add a test for opening a blob URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179106
2023-06-27 03:31:02 +00:00
Tom Ritter
a9fa6b211a Bug 1830070: Add a test for opening a data URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179105
2023-06-27 03:31:02 +00:00
Tom Ritter
10f03e6822 Bug 1830070: Add a test for opening a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178977
2023-06-27 03:31:02 +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
Tom Ritter
1f14b7422d Bug 1830070: Add a test for popup that is an about:blank document r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178865
2023-06-27 03:31:02 +00:00
Tom Ritter
21ac7df196 Bug 1830070: Add a test for a popup opening a blob url r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178686
2023-06-27 03:31:02 +00:00
Tom Ritter
b662a64bba Bug 1830070: Add a test for popup that is a data: uri r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178685
2023-06-27 03:31:01 +00:00
Tom Ritter
e04290f31c Bug 1830070: Add a test for an RFP test for a popup r=timhuang
I was able to adapt the simple iframe test to a popup
test with pretty minimal adaptations, so I did that.

Remains to be seen if I can do it for the others.

Differential Revision: https://phabricator.services.mozilla.com/D178684
2023-06-27 03:31:01 +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
db0071f401 Bug 1830070: Add a test for opening a blob URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179106
2023-06-26 17:04:40 +00:00
Tom Ritter
295f20b784 Bug 1830070: Add a test for opening a data URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179105
2023-06-26 17:04:40 +00:00
Tom Ritter
24f502fd35 Bug 1830070: Add a test for opening a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178977
2023-06-26 17:04:40 +00: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
Tom Ritter
f26f20d169 Bug 1830070: Add a test for popup that is an about:blank document r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178865
2023-06-26 17:04:39 +00:00
Tom Ritter
f23d0fe319 Bug 1830070: Add a test for a popup opening a blob url r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178686
2023-06-26 17:04:39 +00:00
Tom Ritter
604fcde305 Bug 1830070: Add a test for popup that is a data: uri r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178685
2023-06-26 17:04:39 +00:00
Tom Ritter
772fb540d6 Bug 1830070: Add a test for an RFP test for a popup r=timhuang
I was able to adapt the simple iframe test to a popup
test with pretty minimal adaptations, so I did that.

Remains to be seen if I can do it for the others.

Differential Revision: https://phabricator.services.mozilla.com/D178684
2023-06-26 17:04:39 +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
62e0b061f6 Bug 1830070: Add a test for opening a blob URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179106
2023-06-19 20:03:28 +00:00
Tom Ritter
336e4c13bd Bug 1830070: Add a test for opening a data URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179105
2023-06-19 20:03:28 +00:00
Tom Ritter
3a64ec3d9a Bug 1830070: Add a test for opening a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178977
2023-06-19 20:03:28 +00: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
Tom Ritter
e47f8a31a1 Bug 1830070: Add a test for popup that is an about:blank document r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178865
2023-06-19 20:03:27 +00:00
Tom Ritter
80392ab44d Bug 1830070: Add a test for a popup opening a blob url r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178686
2023-06-19 20:03:27 +00:00
Tom Ritter
790c165345 Bug 1830070: Add a test for popup that is a data: uri r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178685
2023-06-19 20:03:27 +00:00
Tom Ritter
fc022485df Bug 1830070: Add a test for an RFP test for a popup r=timhuang
I was able to adapt the simple iframe test to a popup
test with pretty minimal adaptations, so I did that.

Remains to be seen if I can do it for the others.

Differential Revision: https://phabricator.services.mozilla.com/D178684
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
Tom Ritter
7c0bfdb34a Bug 1830070: Add a test for opening a blob URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179106
2023-06-19 18:08:05 +00:00
Tom Ritter
e7a0e4a262 Bug 1830070: Add a test for opening a data URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179105
2023-06-19 18:08:05 +00:00
Tom Ritter
3ccc785746 Bug 1830070: Add a test for opening a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178977
2023-06-19 18:08:04 +00: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
Tom Ritter
b7293edfee Bug 1830070: Add a test for popup that is an about:blank document r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178865
2023-06-19 18:08:04 +00:00
Tom Ritter
f6969f8c9b Bug 1830070: Add a test for a popup opening a blob url r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178686
2023-06-19 18:08:04 +00:00
Tom Ritter
927d8bcc84 Bug 1830070: Add a test for popup that is a data: uri r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178685
2023-06-19 18:08:04 +00:00
Tom Ritter
0c343a31aa Bug 1830070: Add a test for an RFP test for a popup r=timhuang
I was able to adapt the simple iframe test to a popup
test with pretty minimal adaptations, so I did that.

Remains to be seen if I can do it for the others.

Differential Revision: https://phabricator.services.mozilla.com/D178684
2023-06-19 18:08:03 +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
5252988a87 Bug 1830070: Add a test for opening a blob URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179106
2023-06-15 03:08:16 +00:00
Tom Ritter
e6976635f2 Bug 1830070: Add a test for opening a data URI in a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D179105
2023-06-15 03:08:16 +00:00
Tom Ritter
5d7c4f192c Bug 1830070: Add a test for opening a popup with noopener r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178977
2023-06-15 03:08:16 +00:00
Tom Ritter
a7a2cdb288 Bug 1830070: Add a test for popup that is an about:blank document r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D178865
2023-06-15 03:08:15 +00:00