Commit graph

1502 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
c5ffe23435 Bug 1740989 - Implement focus fixup rule. r=smaug
This implements the proposal in the linked spec issue, and makes
it nightly-only pending resolution + edits.

Differential Revision: https://phabricator.services.mozilla.com/D155970
2022-08-31 17:10:17 +00:00
Sean Feng
712dda078c Bug 1750034 - Remove lazyload telemetry related code r=emilio
We have decided to use 600px in all directions, there's no need
to keep the telemetry stuff around.

Differential Revision: https://phabricator.services.mozilla.com/D155879
2022-08-30 16:00:11 +00:00
Dana Keeler
56e7ae8648 Bug 1781104 - replace error type booleans with error category in nsITransportSecurityInfo r=necko-reviewers,mixedpuppy,jschanck,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D154561
2022-08-26 18:48:38 +00:00
Dana Keeler
b4c45d4248 Bug 1781104 - remove unnecessary bits parameter from nsICertOverrideService r=djackson,necko-reviewers,geckoview-reviewers,extension-reviewers,kershaw,calu
Differential Revision: https://phabricator.services.mozilla.com/D152826
2022-08-26 18:48:38 +00:00
Edgar Chen
2a142eba28 Bug 1782211 - Init feature policy; r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D154161
2022-08-24 20:56:16 +00:00
Emilio Cobos Álvarez
c20ec755c9 Bug 1782751 - Make desktop viewport mode a synced BrowsingContext field. r=twisniewski
So that it's preserved properly across replacements (bug 1781936).

Differential Revision: https://phabricator.services.mozilla.com/D155274
2022-08-22 22:12:07 +00:00
Oriol Brufau
bea6d0d822 Bug 1781046 - Add internal ResizeObserver for last remembered size. r=emilio
In a follow-up, it will take care of updating the last remembered size
as described in https://drafts.csswg.org/css-sizing-4/#last-remembered

Differential Revision: https://phabricator.services.mozilla.com/D154325
2022-08-12 15:06:43 +00:00
Cosmin Sabou
eef1e137ae Backed out 6 changesets (bug 1781046, bug 1784575) for pressumably causing Bug 1784591 and Bug 1784625. a=backout
Backed out changeset 84e0f04d939c (bug 1781046)
Backed out changeset 84228a1b82da (bug 1781046)
Backed out changeset a0574f6e88e1 (bug 1781046)
Backed out changeset 6dc8a407aa1f (bug 1781046)
Backed out changeset a3724891b9c9 (bug 1781046)
Backed out changeset 617f9a8b7512 (bug 1784575)
2022-08-19 23:37:15 +03:00
Emilio Cobos Álvarez
c34fbf90e8 Bug 1785231 - Cleanup a bit Document.cpp. r=edgar
Remove useless this->, which are not common anywhere else.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D154887
2022-08-17 12:37:05 +00:00
Andreas Farre
4b493b6a30 Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-16 16:42:58 +00:00
Sandor Molnar
8aada8ee04 Backed out 2 changesets (bug 1595491) for causing build bustages in docshell/base/BrowsingContext.cpp CLOSED TREE
Backed out changeset 3687b7153c44 (bug 1595491)
Backed out changeset 91d87de145e3 (bug 1595491)
2022-08-12 19:50:20 +03:00
Benjamin VanderSloot
5eb779d9f9 Bug 1777497, part 3 - Require a grant (auto or manual) for the requestStorageAccessUnderSite permission, r=timhuang,pbz,anti-tracking-reviewers
Depends on D151279

Differential Revision: https://phabricator.services.mozilla.com/D151280
2022-08-12 16:12:06 +00:00
Benjamin VanderSloot
04fdece310 Bug 1777497, part 2 - Make "finalChecks" callback creation easier to use flexibly, r=anti-tracking-reviewers,pbz,timhuang
Depends on D151278

Differential Revision: https://phabricator.services.mozilla.com/D151279
2022-08-12 16:12:05 +00:00
Andreas Farre
ec3d91462e Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-12 15:48:26 +00:00
Oriol Brufau
cf76dc495f Bug 1781046 - Add internal ResizeObserver for last remembered size. r=emilio
In a follow-up, it will take care of updating the last remembered size
as described in https://drafts.csswg.org/css-sizing-4/#last-remembered

Differential Revision: https://phabricator.services.mozilla.com/D154325
2022-08-12 15:06:43 +00:00
Norisz Fay
c03af93699 Backed out 5 changesets (bug 1777497, bug 1782526) for causing build bustages on PContent.ipdl CLOSED TREE
Backed out changeset 64e16a70484e (bug 1782526)
Backed out changeset 381806d5afc3 (bug 1777497)
Backed out changeset 820f6f9c9cc3 (bug 1777497)
Backed out changeset f541ad605d6d (bug 1777497)
Backed out changeset 620681c22b83 (bug 1777497)
2022-08-11 03:20:29 +03:00
Benjamin VanderSloot
54d8159ea5 Bug 1777497, part 3 - Require a grant (auto or manual) for the requestStorageAccessUnderSite permission, r=timhuang,pbz,anti-tracking-reviewers
Depends on D151279

Differential Revision: https://phabricator.services.mozilla.com/D151280
2022-08-11 00:04:39 +00:00
Benjamin VanderSloot
8484a990ab Bug 1777497, part 2 - Make "finalChecks" callback creation easier to use flexibly, r=anti-tracking-reviewers,pbz,timhuang
Depends on D151278

Differential Revision: https://phabricator.services.mozilla.com/D151279
2022-08-11 00:04:39 +00:00
Christian Holler
146a80ecff Bug 1783844 - Remove IPC::Principal type remains from codebase. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D154091
2022-08-10 13:39:11 +00:00
Razvan Cojocaru
31923e13de Bug 1753814 - Add an option to configure the maximum amount of pinch zoom that is available. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D153888
2022-08-09 12:47:59 +00:00
Masayuki Nakano
bea9bf4233 Bug 1782852 - part 1: Get rid of unused editor commands in the wild r=smaug
`increaseFontSize`, `decreaseFontSize`, `gethtml`, `heading` and `readonly`
commands were disabled for a year in all channels, but no regression reports
have been filed.  Therefore, we can delete the commands and the telemetry
probes.

Note that `cmd_getContents` command which is the internal command of `gethtml`
is not used in comm-central too.  Therefore, this patch deletes the command
handler, `nsClipboardGetContentsCommand`, and `Command::GetHTML` too.

Differential Revision: https://phabricator.services.mozilla.com/D153720
2022-08-05 02:55:22 +00:00
Nika Layzell
d706a983ec Bug 1780614 - Track potential crossoriginisolated status on BCG, r=smaug,kmag
This patch changes how BrowsingContextGroups track CrossOriginIsolated
status such that it should be more consistently tracked and easier to
assert in the places which depend on it. In the new state of the world,
a flag is stored within the BCG's ID which tracks whether it was
created for cross-origin isolated documents, and that is also checked
when making decisions about how to isolate initial about:blank
documents, and whether to allow certain changes to
CrossOriginOpenerPolicy.

This flag is stashed within the ID, as it needs to be preserved if the
BCG is destroyed and then re-created from the ID (which may be e.g.
round-tripped through JS code). I also considered making the ID be a
string instead, to make it easier to include extra information like
this, and more clear where the information is stored, however :kmag
generally preferred using a bit within the integer ID.

These new assertions should now be less likely to spuriously fail due to
a DocShell disappearing or similar as well, which should help fix the
original issue.

Differential Revision: https://phabricator.services.mozilla.com/D152695
2022-08-03 15:58:27 +00:00
Iulian Moraru
4ef2e59bee Backed out 5 changesets (bug 1782526, bug 1777497) for causing gv-junit failures.
Backed out changeset bb4451a7b19c (bug 1782526)
Backed out changeset cbc8344b02ac (bug 1777497)
Backed out changeset 85e6b889e139 (bug 1777497)
Backed out changeset a64c8ee85a42 (bug 1777497)
Backed out changeset fd74aafff8a7 (bug 1777497)
2022-08-02 02:45:32 +03:00
Benjamin VanderSloot
218c28822c Bug 1777497, part 3 - Require a grant (auto or manual) for the requestStorageAccessUnderSite permission, r=timhuang,pbz,anti-tracking-reviewers
Depends on D151279

Differential Revision: https://phabricator.services.mozilla.com/D151280
2022-08-01 21:27:00 +00:00
Benjamin VanderSloot
f7517c54a8 Bug 1777497, part 2 - Make "finalChecks" callback creation easier to use flexibly, r=anti-tracking-reviewers,pbz,timhuang
Depends on D151278

Differential Revision: https://phabricator.services.mozilla.com/D151279
2022-08-01 21:26:59 +00:00
Nika Layzell
c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Sean Feng
288cbe9f46 Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-27 20:33:19 +00:00
Marian-Vasile Laza
2ab97e789a Backed out 2 changesets (bug 1778492) for causing eslint failures.
Backed out changeset 6c3ac3569d31 (bug 1778492)
Backed out changeset 34227495753a (bug 1778492)
2022-07-26 17:43:53 +03:00
Sean Feng
38f70ee5fc Bug 1778492 - Add an origin trial for coep: credentialless r=emilio,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D151381
2022-07-26 14:06:04 +00:00
Benjamin VanderSloot
746541a594 Bug 1777295 - document.requestStorageAccess error thrown even from static (plaintext) iframe content, r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D152171
2022-07-19 14:37:16 +00:00
Tiaan Louw
ba1631e81a Bug 1546612 - caretPositionFromPoint does not take iframe transformation into account r=emilio
Using nsLayoutUtils::TransformPoint instead of going through the widget takes the iframe's
transformations into account.

Differential Revision: https://phabricator.services.mozilla.com/D151995
2022-07-18 12:57:40 +00:00
Tom Ritter
1c40624193 Bug 1770498: Populate the RFP member of CookieJar Settings r=timhuang,geckoview-reviewers,owlish
CookieJarSettings frequently gets populated in a place
where we have ready access to the Document/Channel it
is being constructed for. This lets us populate the boolean
and pass it into CookieJarSetting's constructor easily.

When it is created for LoadInfo, we need to plumb the URI
through by adding it to LoadInfo::CreateForDocument.

Differential Revision: https://phabricator.services.mozilla.com/D150588
2022-07-15 20:39:19 +00:00
Tom Schuster
3400605cfd Bug 1740420 - Improve sandbox error message when accessing storages. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D150255
2022-07-15 16:33:46 +00:00
Thomas Wisniewski
d1c82fe05f Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-15 13:26:17 +00:00
Cristian Tuns
2f5fe88da3 Backed out 19 changesets (bug 1758745, bug 1758740, bug 1762462, bug 1779603) for causing mochitest failures on browser_partitionedConsoleMessage.js CLOSED TREE
Backed out changeset e3c8cd6f00b6 (bug 1779603)
Backed out changeset 4e46a6f209b4 (bug 1762462)
Backed out changeset 00c0c6314640 (bug 1762462)
Backed out changeset 8f11221f859f (bug 1762462)
Backed out changeset ffbf90e3bbab (bug 1762462)
Backed out changeset 0c760428dfec (bug 1762462)
Backed out changeset 7c99293cc8f9 (bug 1762462)
Backed out changeset 92bd237a95e1 (bug 1762462)
Backed out changeset 74539a3cc7fc (bug 1762462)
Backed out changeset acf08a10c6fb (bug 1762462)
Backed out changeset 0cf191a7739f (bug 1762462)
Backed out changeset 030c276d6669 (bug 1762462)
Backed out changeset a88a099c684d (bug 1762462)
Backed out changeset cbd69786a24b (bug 1762462)
Backed out changeset e5e0655206a8 (bug 1762462)
Backed out changeset 707f9dfed501 (bug 1762462)
Backed out changeset 619e4bb01a81 (bug 1762462)
Backed out changeset 02b7641683b0 (bug 1758745)
Backed out changeset a2f110442038 (bug 1758740)
2022-07-14 17:26:17 -04:00
Thomas Wisniewski
3f80260311 Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-14 19:26:26 +00:00
Norisz Fay
388468729f Backed out 18 changesets (bug 1762462, bug 1758745, bug 1758740) for causing mochitest failures on test_storage_copied.html
Backed out changeset a27ae15872a9 (bug 1762462)
Backed out changeset b7d979a36324 (bug 1762462)
Backed out changeset 6249efe40513 (bug 1762462)
Backed out changeset 1e81ed3014a0 (bug 1762462)
Backed out changeset 92cec5f5db1c (bug 1762462)
Backed out changeset fa3c45b4de5c (bug 1762462)
Backed out changeset 64df67f43ad7 (bug 1762462)
Backed out changeset d66dd76ec2b6 (bug 1762462)
Backed out changeset 4f8aaba02a03 (bug 1762462)
Backed out changeset 81eb7d60dea9 (bug 1762462)
Backed out changeset 01504f5f818a (bug 1762462)
Backed out changeset 2615b571c9ba (bug 1762462)
Backed out changeset 73ed8be3f117 (bug 1762462)
Backed out changeset edb94ba8ec59 (bug 1762462)
Backed out changeset 21dd6fdc672e (bug 1762462)
Backed out changeset 31a70f9ad879 (bug 1762462)
Backed out changeset 5261ee5a2368 (bug 1758745)
Backed out changeset ad6ffd85ef3c (bug 1758740)
2022-07-14 03:16:08 +03:00
Thomas Wisniewski
7a3c3e5c10 Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-13 22:44:57 +00:00
Benjamin VanderSloot
6b4c4bc2dd Bug 1774854, part 1 - Create new preferences and document member functions for the forward-declared SAAPI, r=timhuang,emilio
Differential Revision: https://phabricator.services.mozilla.com/D149660
2022-07-08 18:16:37 +00:00
smolnar
1547adcf3d Backed out 4 changesets (bug 1774854) for causing browser-chrome failures in antitracking/test/browser/browser_subResources.js
Backed out changeset 46884d2a4eb4 (bug 1774854)
Backed out changeset ee02080a80cc (bug 1774854)
Backed out changeset 5e01fd1a1423 (bug 1774854)
Backed out changeset 98244d30acff (bug 1774854)
2022-07-08 17:08:49 +03:00
Benjamin VanderSloot
5b9e145ce3 Bug 1774854, part 1 - Create new preferences and document member functions for the forward-declared SAAPI, r=timhuang,emilio
Differential Revision: https://phabricator.services.mozilla.com/D149660
2022-07-08 12:36:42 +00:00
Emilio Cobos Álvarez
a7e9f1597b Bug 1771150 - Make fullscreen modal. r=smaug
As per https://github.com/w3c/csswg-drafts/issues/7311.

Differential Revision: https://phabricator.services.mozilla.com/D150335
2022-07-06 00:16:28 +00:00
Dana Keeler
dc4ce8d406 Bug 1777366 - remove unused source and cached parameters from nsISiteSecurityService APIs r=rmf,necko-reviewers,kershaw
These parameters are no longer used and can be removed, along with the expired
telemetry HSTS_UPGRADE_SOURCE.

Differential Revision: https://phabricator.services.mozilla.com/D150786
2022-07-05 18:33:18 +00:00
Nika Layzell
8f236832ff Bug 1758115 - Part 2: Streamline locking, initialization and shutdown for TimelineConsumers, r=smaug
The current implementation of TimelineConsumers contains some unnecessary
complexity due to how it is initialized as a singleton, and the need for it to
be initialized and used in a threadsafe way. This patch attempts to simplify it
by making all members static, and removing the need to explicitly observe
shutdown for cleanup.

In addition, this approach avoids the risk of the type being accessed from
off-main-thread during initialization or shutdown.

Depends on D150442

Differential Revision: https://phabricator.services.mozilla.com/D150443
2022-06-29 15:01:51 +00:00
Andrew Osmond
091dc0483c Bug 1771493 - Part 4. Split FontFaceSetDocumentImpl from FontFaceSetImpl. r=emilio
This patch splits document specific functionality from FontFaceSetImpl
into a new class FontFaceSetDocumentImpl. This will make it easier to
fork FontFaceSetImpl for workers.

Differential Revision: https://phabricator.services.mozilla.com/D147819
2022-06-28 21:47:01 +00:00
Andrew Osmond
c9e5ad2c49 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 21:47:00 +00:00
Marian-Vasile Laza
dfecbedace Backed out 5 changesets (bug 1771493) for causing bustages on FontFaceSetDocumentImpl.obj. CLOSED TREE
Backed out changeset 07513973391f (bug 1771493)
Backed out changeset 22f567c00af3 (bug 1771493)
Backed out changeset 609a5d93bf08 (bug 1771493)
Backed out changeset 1f5b0b087930 (bug 1771493)
Backed out changeset aa5527055ad1 (bug 1771493)
2022-06-28 22:21:00 +03:00
Andrew Osmond
1eaa8eb15b Bug 1771493 - Part 4. Split FontFaceSetDocumentImpl from FontFaceSetImpl. r=emilio
This patch splits document specific functionality from FontFaceSetImpl
into a new class FontFaceSetDocumentImpl. This will make it easier to
fork FontFaceSetImpl for workers.

Differential Revision: https://phabricator.services.mozilla.com/D147819
2022-06-28 15:58:11 +00:00
Andrew Osmond
4dfc867556 Bug 1771493 - Part 2. Merge FontFaceSetImpl and gfxUserFontSet into a single class. r=emilio
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.

Differential Revision: https://phabricator.services.mozilla.com/D147817
2022-06-28 15:58:10 +00:00
Bogdan Szekely
c94fbd38ae Backed out 4 changesets (bug 1771493) for causing build bustages on FontFaceSet.cpp CLOSED TREE
Backed out changeset 3f2605087550 (bug 1771493)
Backed out changeset 5e6bf07c9c27 (bug 1771493)
Backed out changeset fbfb5b7dfb30 (bug 1771493)
Backed out changeset 93b7e171c74a (bug 1771493)
2022-06-28 17:57:11 +03:00