Граф коммитов

6849 Коммитов

Автор SHA1 Сообщение Дата
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
Neil Deakin 0de8be3ac6 Bug 1759604, check CanDropLink during the drop event as sites can cancel the dragover event causing the drop event to still fire, r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154896
2022-08-19 22:15:50 +00:00
Sean Feng 011405bf32 Bug 1785227 - Consider all browsing context as non-synthetic when we don't want to hide image document for <object> and <embed> r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154997
2022-08-18 20:04:59 +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
Olli Pettay 4aea9c65b6 Bug 1784387 - Crash in [@ nsDocShell::Reload] in ContentChild::RecvReload, r=mccr8
No test, since the patch is based on the crash reports. Creating a test which relies on some race conditions through IPC is hard.

Differential Revision: https://phabricator.services.mozilla.com/D154634
2022-08-15 15:50:27 +00:00
Emilio Cobos Álvarez ef562aae0a Bug 774398 - Hack to make print and viewport media query listeners fire when printing. r=geckoview-reviewers,owlish,dholbert
This still doesn't fire on print settings changes, so it uses the
default page size. Which is probably better than nothing, but...

To make viewport-size media-query listeners work more generally for
printed documents, we would need to re-clone the top document
unconditionally for all print settings changes, which needs front-end
work at least, and is dubious if the page changes dynamically.

Differential Revision: https://phabricator.services.mozilla.com/D150499
2022-08-11 23:11:37 +00:00
Daisuke Akatsuka df2d3b5da0 Bug 1744243: Fallback to nsIHandlerService if don't trust nsIExternalProtocolService. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D153836
2022-08-10 22:38:45 +00:00
Sandor Molnar 087b91b1a1 Backed out changeset d744fed63a45 (bug 1744243) for causing xpc failures in test_URIFixup_external_protocol_fallback. CLOSED TREE 2022-08-10 01:21:46 +03:00
Daisuke Akatsuka e211074002 Bug 1744243: Fallback to nsIHandlerService if don't trust nsIExternalProtocolService. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D153836
2022-08-09 21:30:48 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +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
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Daisuke Akatsuka fe1785170f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-08-01 00:27:50 +00:00
Butkovits Atila 665e518c7f Backed out 2 changesets (bug 1776609) for causing failures at browser_topsites_annotation.js. CLOSED TREE
Backed out changeset cac795fd16d2 (bug 1776609)
Backed out changeset 88ec1cca8540 (bug 1776609)
2022-08-01 00:52:35 +03:00
Daisuke Akatsuka 971ff4bfb6 Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-31 20:26:30 +00:00
Butkovits Atila 900cbd85bd Backed out 2 changesets (bug 1776609) for causing gtest failures. CLOSED TREE
Backed out changeset 7630fea97777 (bug 1776609)
Backed out changeset 426cbe0fac73 (bug 1776609)
2022-07-29 13:42:33 +03:00
Daisuke Akatsuka 7c02dae76f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-29 09:24:28 +00:00
Emilio Cobos Álvarez a3f163322d Bug 1781936 - Propagate GeckoView settings on BrowsingContext replacement. r=nika
This should be a better fix. GeckoView assumes these don't change on .top
unless they are explicitly set.

I don't have an Android build environment handy, but I'll try to confirm.

Also, remove an unused flag while at it.

Differential Revision: https://phabricator.services.mozilla.com/D153107
2022-07-29 00:30:24 +00:00
Peter Van der Beken 41331aab95 Bug 1769155 - Null-check win in setter for IsActiveBrowserWindowInternal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148914
2022-07-28 17:55:15 +00:00
Gijs Kruitbosch 92d44f3713 Bug 1737043 - add a suggestion for 'example.com' in the network error page for 'example', r=mak,eemeli,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D129156
2022-07-19 03:27:18 +00:00
Iulian Moraru 5e7070f988 Backed out changeset 89d291a9ee9b (bug 1737043) for causing xpcshell failures on test_URIFixup_check_host.js. CLOSED TREE 2022-07-17 20:47:23 +03:00
Gijs Kruitbosch 393bdf2f46 Bug 1737043 - add a suggestion for 'example.com' in the network error page for 'example', r=mak,eemeli,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D129156
2022-07-17 16:48:44 +00:00
Cathy Lu df9bafbf73 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-15 20:44:55 +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
James Teow b09009da4c Bug 1679556 - Toggle browser.fixup.alternate.enabled and add telemetry, r=mak
The suggested solution for this bug is to disable browser.fixup.alternate.enabled
unless toggled by the user, and to add telemetry to the preference so that if we
find users rarely use the option, we can safely remove the feature in a future release.

Many tests rely on expecting URI's to be modified, so I modified them so that they
should not expect the prefix or suffix to be modified.

Differential Revision: https://phabricator.services.mozilla.com/D147795
2022-07-15 19:08:56 +00:00
Tom Schuster 17c4e9c29f Bug 1774866 - Support error stacks in window.postMessage. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D150625
2022-07-13 12:42:31 +00:00
criss 95f4f0498b Backed out changeset 67fae8447273 (bug 1734394) for causing Assertion failures on StaticPrefList_browser.h. CLOSED TREE 2022-07-12 09:00:39 +03:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Cathy Lu c89057028e Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-12 02:50:01 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +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
Kagami Sascha Rosylight 714012aea9 Bug 1769290 - Part 12: Apply mozilla-js-handle-rooted-typedef against docshell r=andi
Differential Revision: https://phabricator.services.mozilla.com/D150794
2022-07-04 20:57: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
Nika Layzell 97e3eb888a Bug 1758115 - Part 1: Clean up locking in ObservedDocShell, r=smaug
This simplifies some of the locking in ObservedDocShell, annotates the mutex,
and reduces the scope of the problematic critical section.

Differential Revision: https://phabricator.services.mozilla.com/D150442
2022-06-29 15:01:50 +00:00
Kris Maglione 289588883e Bug 1776207: Part 1 - Remove obsolete _xpcom_factory definitions. r=mccr8
They only work with `generateNSGetFactory` definitions, which don't exist
anymore.

Differential Revision: https://phabricator.services.mozilla.com/D150191
2022-06-27 21:19:51 +00:00
Andrew McCreight 10bfb74f38 Bug 1766305, part 2 - Return a wireframe with GetLayoutHistoryState. r=smaug,mconley
The main goal here is to get the wireframe test to work with
parent-controlled navigation.

This means we don't need to collect the wireframe any more in
PersistLayoutHistoryState, I think, because it is redundant.

I think we need to clear the wireframe in finish restore for
when we navigate back.

As a result of these changes, the two todo subtests in the
wireframe test now pass.

Differential Revision: https://phabricator.services.mozilla.com/D146252
2022-06-27 12:02:48 +00:00
Noemi Erli d6440ec5b2 Backed out changeset 56a33c1c3210 (bug 1734394) for causing build bustages in GeckoBundleUtils.cpp CLOSED TREE 2022-06-24 22:01:02 +03:00
Cathy Lu 617487c8c7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-24 18:34:28 +00:00
Marian-Vasile Laza 63b59e32d4 Backed out changeset 39559c43173a (bug 1734394) for causing bustages on GeckoBundleUtils.cpp. CLOSED TREE 2022-06-23 20:05:54 +03:00
Cathy Lu 4d149860a7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-23 16:44:32 +00:00
Mirko Brodesser b90b8d0110 Bug 1744524: part 2) Add `WindowContext::GetUserGestureStart` and remove `WindowContext::LastUserGestureTimeStamp`. r=edgar
Preparation for part 3).

The return type of `GetUserGestureStart` is a class, the return type of
`LastUserGestureTimeStamp` a `double`. Hence using the former is safer.

Differential Revision: https://phabricator.services.mozilla.com/D148758
2022-06-16 14:43:40 +00:00
Peter Van der Beken c55748ac0b Bug 1773192 - Referrer header missing after calling history.replaceState and clicking back button. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D149176
2022-06-15 11:32:16 +00:00
Andreas Farre 05083dfb80 Bug 1756995 - Optimize docshell load end session store collection. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D146207
2022-06-15 11:15:35 +00:00
Emilio Cobos Álvarez ee23efc9b5 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 15:01:52 +00:00