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

8359 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 5850226b47 Bug 1688941 - Enforce and document that mTimingData is always non-null. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103007
2021-01-27 19:24:19 +00:00
Barret Rennie 409c413fb6 Bug 1688082 - Record time delta between content process launches r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D102684
2021-01-26 18:46:10 +00:00
Barret Rennie 26cde2a81c Bug 1688079 - Record maximum content process count per session r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D102683
2021-01-27 15:37:14 +00:00
Dorel Luca b5c5a81751 Backed out changeset 4e317086de97 (bug 1672330) for Mochitest failures in dom/tests/mochitest/pointerlock/test_pointerlock_focus.html. CLOSED TREE 2021-01-27 14:05:29 +02:00
Edgar Chen b81855eeb2 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 10:08:29 +00:00
Alexis Beingessner 892361c25c Bug 1625801 - grab the lock when creating and destroying RefMessageBodyService. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D102944
2021-01-26 17:15:26 +00:00
Nika Layzell 415960c80b Bug 1643450 - Part 1: Allow creating windows from closing tabs, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D100165
2021-01-14 19:42:07 +00:00
Edgar Chen 48c01f0a8b Bug 1688105 - Part 2: Get rid of dom.w3c_pointer_events.enabled; r=smaug
Depends on D102668

Differential Revision: https://phabricator.services.mozilla.com/D102669
2021-01-25 16:22:44 +00:00
Mats Palmgren b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Christoph Kerschbaumer bb776a0333 Bug 1687890: Relax Principal Validation in Content Parent until we have Telemetry Pings r=nika
Differential Revision: https://phabricator.services.mozilla.com/D102569
2021-01-22 08:10:12 +00:00
Neil Deakin 7c97e0940d Bug 1644911, add notification bar when a subframe crashes that allows submitting a crash report, r=mconley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D97346
2021-01-21 08:44:51 +00:00
Neil Deakin 2ae4d6a15b Bug 1644911, add access to the childID from the frame crashed event, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98206
2021-01-21 08:44:51 +00:00
Henri Sivonen 0e936b95f1 Bug 1659383 - Check if focus() is allowed even when Window_Binding::focus() delegates to BrowsingContext::Focus(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100005
2021-01-18 12:48:42 +00:00
Csoregi Natalia 76177ae407 Backed out changeset d2c7360e9d01 (bug 1659383) for failures on iframe-focuses-parent-different-site.html. CLOSED TREE 2021-01-18 12:36:49 +02:00
Henri Sivonen 5a70da036b Bug 1659383 - Check if focus() is allowed even when Window_Binding::focus() delegates to BrowsingContext::Focus(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100005
2021-01-18 07:45:29 +00:00
Masatoshi Kimura a29e207781 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 12:07:16 +00:00
Christoph Kerschbaumer 4f1c28e9e4 Bug 1671166: Validate received Principal in ContentParent r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96071
2021-01-15 10:10:28 +00:00
Narcis Beleuzu 0322452233 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 04:04:37 +02:00
Masatoshi Kimura b384f14cde Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 04:02:41 +02:00
Dorel Luca 9ed19e2828 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 02:45:34 +02:00
Masatoshi Kimura 87e50835c4 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-14 20:44:54 +00:00
Paul Zuehlcke 547f195fc5 Bug 1679512 - Move contentBlockingAllowListPrincipal to WindowGlobalParent. r=timhuang,nika
We only use the contentBlockingAllowListPrincipal for excluding sites from content
blocking for top level documents. We don't need it in the content process and should
not compute it for every document.

Differential Revision: https://phabricator.services.mozilla.com/D100781
2021-01-14 20:37:35 +00:00
Andreas Farre 78e800dabe Bug 1612147 - Don't store FeaturePolicy in BrowsingContext. r=smaug
Syncing the container FeaturePolicy across BrowsingContext is actually
a bit more heavy-handed than necessary. We only ever need a container
FeaturePolicy when inheriting a FeaturePolicy in exactly the document
the container contains. Not every process that the tree the container
is a part of. So instead of storing a FeaturePolicy in a synced field,
we manually send it to the correct WindowGlobalChild (which
corresponds to a document) and retrieve it from there.

Differential Revision: https://phabricator.services.mozilla.com/D61479
2021-01-14 11:15:24 +00:00
Alexis Beingessner b1d3b28ef7 Bug 1683730 - disabled tests failing with tsan full shutdown. r=decoder
Seems like all timeouts at various levels.

Differential Revision: https://phabricator.services.mozilla.com/D100269
2021-01-08 20:08:29 +00:00
Emilio Cobos Álvarez cbe57e88f7 Bug 1683188 - BrowserChild::MakeHidden() shouldn't mess with tab state. r=nika
I flagged this as sketchy before (though it was trying to preserve
existing behavior).

However now that that state propagates to the parent process and races
with the state that the parent process reads, it started causing
correctness issues.

Just remove this line, it shouldn't be needed. I'm not sure how to write
a test for this, unfortunately :(

Differential Revision: https://phabricator.services.mozilla.com/D100971
2021-01-08 00:48:26 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Sylvestre Ledru b58ddc19df Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with Debian clang-format version 11.0.1-1

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100934
2021-01-06 17:17:23 +00:00
Mihai Alexandru Michis 67eecb03bf Backed out changeset 5eacf74bc04f (bug 1643450) for causing android mochitest failures in test_window_open_from_closing.html
CLOSED TREE
2021-01-06 19:44:21 +02:00
Nika Layzell 6f44867564 Bug 1643450 - Allow creating windows from closing tabs, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D100165
2021-01-06 15:19:32 +00:00
Jean-Yves Avenard dfb40277e0 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-06 09:05:31 +00:00
Mihai Alexandru Michis f8a41209af Backed out 6 changesets (bug 1681043) for causing multiple failures.
CLOSED TREE

Backed out changeset ea075101dc94 (bug 1681043)
Backed out changeset 64d8abe2104d (bug 1681043)
Backed out changeset 5ecb208a85d3 (bug 1681043)
Backed out changeset 9319fdd0389c (bug 1681043)
Backed out changeset 25a015e84cc4 (bug 1681043)
Backed out changeset e8fac91d4012 (bug 1681043)
2021-01-04 07:43:08 +02:00
Jean-Yves Avenard ff614fdaa3 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-03 23:21:54 +00:00
Jean-Yves Avenard a68d444ad0 Bug 1681043 - P1. Launch RDD process early. r=alwu
We can launch the RDD process early now that it is a fully asynchronous process and doesn't block anything.

This will allow to retrieve the decoding capabilities of the RDD process right away.

Ideally, we should have been able to start the RDD process at the same time as the GPU process; however setting up the RDD sandbox is dependent of having mozilla::SandboxBroker::GeckoDependentInitialize() called first ; and it is called in the most awkward of places; so finding a place suitable for all platforms gets affected.
For now we will ensure it's been started around the time the first content process is started.

Differential Revision: https://phabricator.services.mozilla.com/D100304
2021-01-03 23:20:38 +00:00
Jonathan Kew 809ac36608 Bug 1676966 - Don't block layout on global font fallback; load character maps asynchronously, and then reflow when available. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98904
2020-12-31 00:33:48 +00:00
Cosmin Sabou 74039caf3c Backed out changeset 345d6be71db1 (bug 1676966) for mochitest without e10s failures. CLOSED TREE 2020-12-30 15:36:10 +02:00
Jonathan Kew c19e845492 Bug 1676966 - Don't block layout on global font fallback; load character maps asynchronously, and then reflow when available. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98904
2020-12-30 12:34:49 +00:00
Masayuki Nakano 525ffa0f23 Bug 1683226 - part 16: Get rid of `WidgetPluginEvent` r=smaug
Depends on D100389

Differential Revision: https://phabricator.services.mozilla.com/D100390
2020-12-29 21:19:45 +00:00
Mihai Alexandru Michis d50d8d795e Backed out changeset 52eb1fa54b88 (bug 1676966) for causing mochitest failures in AsyncCompositionManager.cpp 2020-12-30 00:16:44 +02:00
Jonathan Kew 12c934e612 Bug 1676966 - Don't block layout on global font fallback; load character maps asynchronously, and then reflow when available. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98904
2020-12-29 16:03:45 +00:00
Razvan Maries 0cb7aac5bd Backed out changeset 4a6818e6c81a (bug 1676966) for perma failures on AsyncCompositionManager.cpp. CLOSED TREE 2020-12-29 04:06:23 +02:00
Robert Mader 820fe68cd4 Bug 1681030 - Fix some regressions from bug 1645528, r=emilio
This fixes a bunch of regressions:
 - a wrong calculation in `GetIdleDeadlineHint()`, leading to pageload
regressions.
 - in certain situations we'd use `StartupRefreshDriverTimer` instead
of `VsyncRefreshDriverTimer` when initializing timers early
 - unnecessary use of `BrowserChild` on backends that don't opt for
per-browser-child vsync - i.e. all but Wayland.

This is partly done by reverting to pre-1645528 behaviour, although
with some code simplifications.

FTR: I also played with some more radical changes, but given the
complexity of the code involved I found the regression potential too
big. Thus this is the most conservative solution I could come up with.

Differential Revision: https://phabricator.services.mozilla.com/D100471
2020-12-26 23:26:49 +00:00
Narcis Beleuzu 49264e13c2 Backed out changeset f64bb4f21c91 (bug 1681030) for causing crashes. 2020-12-28 19:51:40 +02:00
Emilio Cobos Álvarez ebb8fa1e75 Bug 1684352 - Don't assume that there's a vsync dispatcher handy when observing. r=rmader
My guess is that if Observe() gets called too early, we can receive the
message before updating the vsync source the first time, which would
trigger this crash.

With this patch, we handle it nicely and UpdateVsyncSource will
re-observe as needed.

It's not 100% clear to me if this is actually the issue (and thus
whether this patch is the right solution), since I haven't been able to
repro locally, though. There might be a more subtle race.

Differential Revision: https://phabricator.services.mozilla.com/D100501
2020-12-28 14:34:30 +00:00
Jonathan Kew 9e08463270 Bug 1676966 - Don't block layout on global font fallback; load character maps asynchronously, and then reflow when available. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98904
2020-12-28 13:15:02 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Robert Mader 31f99b1a13 Bug 1681030 - Fix some regressions from bug 1645528, r=emilio
This fixes a bunch of regressions:
 - a wrong calculation in `GetIdleDeadlineHint()`, leading to pageload
regressions.
 - in certain situations we'd use `StartupRefreshDriverTimer` instead
of `VsyncRefreshDriverTimer` when initializing timers early
 - unnecessary use of `BrowserChild` on backends that don't opt for
per-browser-child vsync - i.e. all but Wayland.

This is partly done by reverting to pre-1645528 behaviour, although
with some code simplifications.

FTR: I also played with some more radical changes, but given the
complexity of the code involved I found the regression potential too
big. Thus this is the most conservative solution I could come up with.

Differential Revision: https://phabricator.services.mozilla.com/D100471
2020-12-26 23:26:49 +00:00
Jonathan Kew 73688b3c3d Bug 1669855 - Return a boolean from InitOtherFamilyNames to indicate whether the initialization is complete. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D96393
2020-12-26 17:11:44 +00:00
Masayuki Nakano 44dced1d87 Bug 1683226 - part 13: Get rid of `nsIWidget::StartPluginFocused()` r=m_kato,ipc-reviewers,mccr8
Depends on D100386

Differential Revision: https://phabricator.services.mozilla.com/D100387
2020-12-24 02:46:46 +00:00
Masayuki Nakano 968d02a1a9 Bug 1683226 - part 12: Get rid of `nsIWidget::SetPluginFocus()` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100386
2020-12-24 02:46:02 +00:00
Sean Feng 851fe92332 Bug 1682866 - Always use normal priority for DelayedDeleteRunnable r=smaug
DelayedDeleteRunnable would schedule itself twice and use input priority
for the second time because it only wants to run after everything
that could possibly touch this tab. This was needed because we were
strict with IPC messages. However, this is no longer needed because
IPC messages with destroyed actors will be discarded nowadays, so
we don't have to use input priority anymore.

Another reason for making this change is that input events could be
suspended when the runnable is about to run, so we need to either
use a different priority or resume input events.

Differential Revision: https://phabricator.services.mozilla.com/D100345
2020-12-22 17:56:28 +00:00
Masayuki Nakano f13852f795 Bug 1683226 - part 10: Get rid of `nsIWidget::EnableIMEForPlugin()` r=m_kato
This is used only on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D100122
2020-12-21 06:31:16 +00:00
Masayuki Nakano deee66043a Bug 1683226 - part 6: Get rid of the path of `DefaultProcOfPluginEvent` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100118
2020-12-21 06:13:09 +00:00
Masayuki Nakano b20f4bb5c2 Bug 1683226 - part 5: Get rid of the path setting candidate window position from plugin on Windows r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100117
2020-12-21 06:03:33 +00:00
Masayuki Nakano d27602eee6 Bug 1683226 - part 1: Make `IMEState::Enabled` an enum class r=m_kato,geckoview-reviewers
Before deleting `IMEState::Enabled::PLUGIN`, let's make it an enum class
for making the change safer.  Almost all of this change is done by
"replace" of VSCode.

Differential Revision: https://phabricator.services.mozilla.com/D100100
2020-12-21 05:52:03 +00:00
Edgar Chen 2b16b12d46 Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-18 18:21:23 +00:00
Masatoshi Kimura 6a43b71a1d Bug 1679087 - Remove ability to create non-Unicode widgets. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D100007
2020-12-17 18:21:39 +00:00
Razvan Maries a7af908f30 Backed out changeset 5e9006d8c218 (bug 1680405) for perma failures on PresShell.cpp and browser_mouse_enterleave_switch_tab.js. CLOSED TREE 2020-12-17 13:24:39 +02:00
Edgar Chen 45ea02297b Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-17 09:28:00 +00:00
Masatoshi Kimura 3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00
Cameron McCormack 6b2ba19c4c Bug 1672097 - Part 2: Cache FullLookAndFeel data. r=karlt
This avoids us doing the full work of ExtractData every time a new content
process is created.  That work is probably not super expensive, but without
this caching it does trip up
browser/base/content/test/performance/browser_preferences_usage.js due to
looking up a non-mirrored pref.

Differential Revision: https://phabricator.services.mozilla.com/D98990
2020-12-16 04:41:46 +00:00
Jed Davis 907aa1cd3c Bug 1470983 - Remote all LookAndFeel values for the Gtk backend. r=spohl,jld
This adds a new LookAndFeel implementation, RemoteLookAndFeel, which can
be used in content processes and is supplied with all of its values by the
parent process.

Co-authored-by: Cameron McCormack <cam@mcc.id.au>

Differential Revision: https://phabricator.services.mozilla.com/D97977
2020-12-16 04:17:36 +00:00
Dorel Luca c7cf087b6e Backed out changeset 7253a9d881d0 (bug 1680405) for assertion failures in worker/checkouts/gecko/layout/base/PresShell.cpp. CLOSED TREE 2020-12-16 07:19:44 +02:00
Edgar Chen 9b5d278abd Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-16 00:29:40 +00:00
Narcis Beleuzu c0c4294b27 Backed out changeset 291ebf5c18d0 (bug 1679589) for assertion failure on test/browser/abouthomecache . CLOSED TREE 2020-12-16 00:14:29 +02:00
Agi Sferro 046d5367f2 Bug 1679589 - Invalidate cached resources when a navigation error occurs. r=emilio,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D98650
2020-12-15 18:28:25 +00:00
Peter Van der Beken 63cf9eea6d Bug 1681729 - Pass the right value for aCloneChildren to AddChildSHEntryHelper with SHIP. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99481
2020-12-15 15:02:33 +00:00
Simon Giesecke b9d6edb0d7 Bug 1673424 - Fix includes in RefMessageBodyService.h and PromiseWorkerProxy.h. r=kmag
Specifically, remove the include of StructuredCloneHolder.h from
RefMessageBodyService.h, and that of WorkerRunnable.h from PromiseWorkerProxy.h
and add other required includes instead.

Differential Revision: https://phabricator.services.mozilla.com/D94764
2020-12-14 15:59:56 +00:00
Dimi Lee 1507ffef24 Bug 1582499 - P1. Add isLocalIP to WindowContext r=nika
When a user clicks a form, the password manager popups a warning when the
form is not in a secure context. However, there is an exception when
a form is in an iframe. When both the url of the iframe and the top-level
are both local ip addresses, we consider it is safe.

This patch adds isLocalIP to WindowContext and WindowGlobalActor.webidl
so password manager can identify whether the top-level url is a local ip
address under fission.

Differential Revision: https://phabricator.services.mozilla.com/D99041
2020-12-10 20:45:54 +00:00
Olli Pettay e7796f89f1 Bug 1671839 - [Fission] Fix and re-enable back.py and navigate.py for Fission, r=peterv
I think there could be still other issues with persist handling (or at least it could be simplified),
but this should be pretty much the minimal patch to fix the issue when
about:newtab url is changed to about:blank (without a redirect, but magical about: handling).
So we need to check persisted handling later than currently.

I'd prefer to land something like this first and then consider if there are better ways to handle
both about: url changes and proper redirects.

Depends on D93899

Differential Revision: https://phabricator.services.mozilla.com/D98871
2020-12-14 14:37:25 +00:00
Matt Woodrow 4e7f9b4789 Bug 1678684 - Initialize DXVA on the media thread, remove the mostly-unused dll blocklist, and the crashguard. r=jya
The main-thread requirements for DXVA appear to have been needed when we initialized a crash guard. We now only run DXVA in the GPU and RDD processes, which don't support crash guards. This removes the main thread dispatch and the crashguard code, and enforces that we're in the GPU/RDD process to init DXVA.

This also removes the DLL blocklist code. This was disabled via pref when in the GPU process, which should be the majority of the time. In rare cases we would have been running DXVA in the RDD process (on older win7 when the GPU process isn't available). In these cases we can just do the same as the GPU process, allowing crashes and recovering from them (and disabling DXVA).

Differential Revision: https://phabricator.services.mozilla.com/D98036
2020-12-14 06:04:13 +00:00
Makoto Kato ddeba05428 Bug 1671764 - Part 1. Use ACString for dictionary language instead. r=masayuki
Actually, our locale service doesn't use UTF-16 for locale name and it will
be ASCII. Although dictionary name of spell checker is locale/language name,
it still uses UTF-16. To use locale API, I should replace it with `ACString`.

Differential Revision: https://phabricator.services.mozilla.com/D99336
2020-12-14 03:01:05 +00:00
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Masayuki Nakano 8dcfc485ef Bug 1681667 - Make `BrowserChild` never coalesce/discard synthesized mouse events for test r=smaug
Every synthesized mouse event for tests are important.  So, they should never
be coalesced.  This is required to write mochitests which synthesize `mousemove`
events via the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D99317
2020-12-11 06:43:44 +00:00
Cameron McCormack 5e3e854648 Bug 1668106 - Store subdocument intrinsic size and ratio on content rather than frame. r=dholbert
This avoids a problem where we receive the IPC message from the child
with updated intrinsics before an <embed> or <object> has had its frame
constructed in the parent, and drop the update.

Differential Revision: https://phabricator.services.mozilla.com/D99304
2020-12-10 21:34:38 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Emilio Cobos Álvarez 9c5e37f7c2 Bug 1681095 - Add a privileged API to tell the print dialog whether a selection belongs to the previewed page vs. an iframe. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D98991
2020-12-10 10:52:41 +00:00
Christoph Kerschbaumer 8c7ebbbc65 Bug 1681504: Remove unused argument aPrincipal from AddGeolocationListener() in Pcontent.ipdl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99217
2020-12-10 09:09:19 +00:00
Christoph Kerschbaumer 92319b0661 Bug 1681510: Remove unused argument aPrincipal from CopyFavicon() in Pcontent.ipdl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99226
2020-12-10 05:53:17 +00:00
Simon Giesecke e06a2d56fc Bug 1680269 - Fix build when building without MOZ_GECKO_PROFILER. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D99063
2020-12-09 08:58:06 +00:00
Andrew McCreight 2bff6d8c82 Bug 1680389 - Only call SetMultiprocessMode once in the main process. r=pbone
This was being called every time we created a ContentParent, which meant
that we'd get races with non-main-thread logging in the parent
process. This patch fixes it by only calling it once during process
startup.

The original goal was to avoid making logging noisier with process
information when e10s was not enabled, but given that e10s is the default
now, that is no longer relevant.

Differential Revision: https://phabricator.services.mozilla.com/D98935
2020-12-09 00:48:51 +00:00
Bogdan Tara ade4d82c59 Backed out changeset 98c3e6255c58 (bug 1597600) for browser_installssl.js failures CLOSED TREE 2020-12-07 21:01:50 +02:00
Christoph Kerschbaumer 01b80dad31 Bug 1680768: Remove unused argument aPrincipal within closeAlert() in nsIAlertsService.idl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98776
2020-12-07 17:44:34 +00:00
R. Martinho Fernandes c99fe51d2d Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2020-12-07 17:10:52 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Sylvestre Ledru bbb5f8a339 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D98301
2020-12-07 10:17:57 +00:00
Butkovits Atila df75ae580c Backed out changeset 8c0e2919f6b2 (bug 1678684) for causing Bug 1680661. CLOSED TREE 2020-12-04 11:26:44 +02:00
Matt Woodrow d58b85c3c9 Bug 1678684 - Initialize DXVA on the media thread, remove the mostly-unused dll blocklist, and the crashguard. r=jya
The main-thread requirements for DXVA appear to have been needed when we initialized a crash guard. We now only run DXVA in the GPU and RDD processes, which don't support crash guards. This removes the main thread dispatch and the crashguard code, and enforces that we're in the GPU/RDD process to init DXVA.

This also removes the DLL blocklist code. This was disabled via pref when in the GPU process, which should be the majority of the time. In rare cases we would have been running DXVA in the RDD process (on older win7 when the GPU process isn't available). In these cases we can just do the same as the GPU process, allowing crashes and recovering from them (and disabling DXVA).

Differential Revision: https://phabricator.services.mozilla.com/D98036
2020-12-04 00:49:27 +00:00
Kagami Sascha Rosylight cd517fc839 Bug 1680167 - Part 5: MOZ_CAN_RUN_SCRIPT_BOUNDARY in dom/* r=masayuki
Depends on D98627

Differential Revision: https://phabricator.services.mozilla.com/D98628
2020-12-03 21:34:06 +00:00
Hiroyuki Ikezoe 870c98bec4 Bug 1615151 - Don't set the chrome offset for OOP iframe's browser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D98557
2020-12-03 10:42:55 +00:00
Emilio Cobos Álvarez a49800a500 Bug 1679706 - Communicate to the front-end whether there are no visible pages at all. r=jfkthame
This will allow them to react however they want to empty page ranges as
a result of another setting change.

Differential Revision: https://phabricator.services.mozilla.com/D98183
2020-12-02 21:48:03 +00:00
Robert Mader 5d2847fe7f Bug 1645528 - Code cleanups r=mattwoodrow
Remove dead code that was left in D93173 so file histories would
get preserved.

Depends on D93173

Differential Revision: https://phabricator.services.mozilla.com/D96934
2020-12-02 09:02:45 +00:00
Robert Mader 529f433f65 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Depends on D98254

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-12-02 09:47:53 +00:00
Masayuki Nakano 912a5bc76d Bug 1678553 - part 13: Make `WidgetQueryContentEvent` use `Maybe` to store some data r=m_kato,geckoview-reviewers
Sorry for this big patch.

This makes `WidgetQueryContentEvent::Reply` is stored with `Maybe` to get
rid of `WidgetQueryContentEvent`.  And `Reply` stores offset and string
with `Maybe` and ``OffsetAndData<uint32_t>`, and also tentative caret offset
with `Maybe`.  Then, we can get rid of `WidgetQueryContentEvent::NOT_FOUND`.

Note that I tried to make `OffsetAndData` have a method to create `NSRange`
for cocoa widget.  However, it causes the column limit`to 100 or longer
and that causes unrelated changes in `TextEvents.h` and `IMEData.h`.
Therefore, I create an inline function in `TextInputHandler.mm` instead.

Differential Revision: https://phabricator.services.mozilla.com/D98264
2020-12-02 05:32:19 +00:00
Narcis Beleuzu 012f0b504c Backed out 2 changesets (bug 1645528) for wdspec failures on user_prompts.py CLOSED TREE
Backed out changeset 986bd930bab7 (bug 1645528)
Backed out changeset 2fbe8c11cecb (bug 1645528)
2020-11-30 06:08:18 +02:00
Robert Mader fad80ebaf0 Bug 1645528 - Code cleanups r=mattwoodrow
Remove dead code that was left in D93173 so file histories would
get preserved.

Depends on D93173

Differential Revision: https://phabricator.services.mozilla.com/D96934
2020-11-29 19:13:38 +00:00
Robert Mader 5ccb38b25c Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-29 19:13:40 +00:00
Bogdan Tara 7d0503248d Backed out 2 changesets (bug 1645528) for scroll related mochitest failures CLOSED TREE
Backed out changeset 08cd8d747c33 (bug 1645528)
Backed out changeset 4bc8953d9bed (bug 1645528)
2020-11-28 04:21:50 +02:00
Robert Mader 2e779228b5 Bug 1645528 - Code cleanups r=mattwoodrow
Remove dead code that was left in D93173 so file histories would
get preserved.

Depends on D93173

Differential Revision: https://phabricator.services.mozilla.com/D96934
2020-11-26 22:15:31 +00:00
Robert Mader 0d501f3c38 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-27 23:33:18 +00:00
Noemi Erli c5213774a6 Backed out changeset 3a9dce735340 (bug 1645528) for causing crashes with nsRefreshDriver CLOSED TREE 2020-11-26 22:57:56 +02:00
Robert Mader a84aa40ad4 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-26 19:15:04 +00:00
Narcis Beleuzu efbd3dc42f Backed out 2 changesets (bug 1645528) for leakcheck failures on nsTArray. CLOSED TREE
Backed out changeset df3577321bfe (bug 1645528)
Backed out changeset fbc13c3ea551 (bug 1645528)
2020-11-25 02:59:47 +02:00
Robert Mader ab78a14b26 Bug 1645528 - Code cleanups r=mattwoodrow
Remove dead code that was left in D93173 so file histories would
get preserved.

Depends on D93173

Differential Revision: https://phabricator.services.mozilla.com/D96934
2020-11-24 22:15:17 +00:00
Robert Mader d2fe090741 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-24 23:47:54 +00:00
Narcis Beleuzu 0d0dc5c19a Backed out changeset 1f42c376724d (bug 1645528) for leakcheck failures on nsTArray. CLOSED TREE 2020-11-25 01:28:12 +02:00
Robert Mader 5f53d70c95 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-24 22:20:35 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 6f7b6986d5 Bug 1673424 - Fix includes around StructuredCloneData.h.
Differential Revision: https://phabricator.services.mozilla.com/D94763

Depends on D94762
2020-11-23 16:07:01 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke 7fb8706dc5 Bug 1660470 - Avoid including MediaControlIPC.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93564

Depends on D93563
2020-11-23 16:06:19 +00:00
Simon Giesecke 4c341a9024 Bug 1660470 - Avoid including MediaSessionIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93563

Depends on D93560
2020-11-23 16:06:14 +00:00
Simon Giesecke 6d43fb5a29 Bug 1660470 - Avoid including URIUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93560

Depends on D93559
2020-11-23 16:06:09 +00:00
Simon Giesecke 2fcd87a716 Bug 1660470 - Avoid including PropertyBagUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93559

Depends on D93558
2020-11-23 16:06:03 +00:00
Simon Giesecke d3f2ef0d0c Bug 1660470 - Avoid including ReferrerInfoUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93558

Depends on D93557
2020-11-23 16:05:56 +00:00
Simon Giesecke 866e539ff0 Bug 1660470 - Avoid including CSPMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93557

Depends on D93556
2020-11-23 16:05:50 +00:00
Simon Giesecke 31d9321c57 Bug 1660470 - Avoid including BindingIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93556

Depends on D93555
2020-11-23 16:05:44 +00:00
Simon Giesecke 9ba9bb72c5 Bug 1660470 - Avoid including PermissionMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93552

Depends on D93550
2020-11-23 16:05:33 +00:00
Simon Giesecke dc800202a2 Bug 1660470 - Split SerializedStructuredCloneBuffer.h from IPCMessageUtils.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93550

Depends on D93546
2020-11-23 16:05:26 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke 9f20781c35 Bug 1660470 - Avoid including nsGUIEventIPC.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93246

Depends on D93245
2020-11-23 16:04:44 +00:00
Simon Giesecke d2bd9f1c46 Bug 1660470 - Avoid including PermissionDelegateIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93245

Depends on D93244
2020-11-23 16:04:39 +00:00
Simon Giesecke a8e63182fe Bug 1660470 - Avoid including DataStorageIPCUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93244

Depends on D93243
2020-11-23 16:04:34 +00:00
Simon Giesecke 1ffd69fbb6 Bug 1660470 - Avoid including DocShellMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93239

Depends on D93238
2020-11-23 16:04:08 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke c3c25a8337 Bug 1660470 - Avoid including GfxMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93234

Depends on D93233
2020-11-23 16:03:38 +00:00
Simon Giesecke 93dd261db8 Bug 1660470 - Include C++ header files only from cpp file. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93233

Depends on D87865
2020-11-23 16:03:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Noemi Erli e52ab350ac Backed out changeset b21f364898eb (bug 1678389) for causing Android gv-unit failures CLOSED TREE 2020-11-22 04:24:23 +02:00
Emilio Cobos Álvarez ec7eb5b86a Bug 1678389 - Use transient user activation for <input> file/color picker. r=edgar
This matches other browsers, see [1], and should fix this and other
similar bugs like bug 1610726.

[1]: https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/html/forms/file_input_type.cc;l=163;drc=8a5de62dd01360cfe3d150640d3ff4d974bbe842

Differential Revision: https://phabricator.services.mozilla.com/D97640
2020-11-22 00:20:03 +00:00
Jon Bauman 6af16546a9 Bug 1675987 - No derogatory language: Remove references to "crazy" in dom module. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97654
2020-11-20 23:37:01 +00:00
Steven MacLeod 6cd960cfb3 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.

With this change `:-moz-window-inactive` is now fission compatible.

Differential Revision: https://phabricator.services.mozilla.com/D86422
2020-11-20 15:16:58 +00:00
Anny Gakhokidze 7804c5bdd9 Bug 1661833 - Fix duplicate OnStateChange events during process switches, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96228
2020-11-19 23:21:04 +00:00
Kris Maglione e01b754b29 Bug 1672263: Use ThrowInvalidStateError with useful messages in JSWindowActorChild. r=nika
Currently, when JS callers try to access certain JSWindowActors before an
actor is initialized, or after it's destroyed, we throw a generic
`NS_ERROR_INVALID_STATE_ERROR` exception without any useful information about
the failure.

This patch changes that to use `ThrowInvalidStateError`, with a message
including the property name, the actor name, and details about whether the
error occurred because the actor has not been initialized or because it has
already been destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D96628
2020-11-10 22:04:49 +00:00
Emilio Cobos Álvarez c839b29aa8 Bug 1676996 - Don't try to process-switch a remote frame to local. r=nika
The guess in comment 3 is basically right, here's the relevant bits that
happen in that trace in order:

[content] nsFrameLoaderOwner::ChangeRemotenessCommon:
  frame becomes remote for the content process.
[parent] WindowGlobalParent::SendMakeFrameLocal (mIsDocumentLoad=true)
[content] ContentChild::SendCloneDocumentTreeInto
[parent] ContentParent::RecvCloneDocumentTreeInto
[content] WindowGlobalChild::RecvMakeFrameLocal

So basically the source frame we're cloning is mid-switch-to-local:
local already from the parent process POV, but still remote for the
child.

I think ignoring the clone in this case is fine (which will make the
print iframe just about:blank).

I've decided it to handle it in ChangeRemoteness but I could also handle
it in RecvCloneDocumentTreeInto with a check like

    if (cp->GetRemoteType() == GetRemoteType())

or such I think. Let me know if you'd prefer that.

Differential Revision: https://phabricator.services.mozilla.com/D97144
2020-11-19 17:44:30 +00:00
Johann Hofmann fc8398626e Bug 1650095 - Part 2 - Implement SessionHistoryEntry::Get/SetHasUserInteraction. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93346
2020-11-18 11:51:00 +00:00
Gerald Squelart b3314a1582 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-18 21:56:57 +00:00
Gerald Squelart cc0abcfaee Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-18 21:54:13 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Edgar Chen cfb9240156 Bug 1673530 - Make ReleaseAllPointerCapture use same priority as mouse event; r=smaug
While pointer lock happens in a different process than pointer capturing process,
we would notify pointer capturing process to release pointer capture, and it relies
on subsequent eMouseExitFromWidget event to generate lostpointercaptre event.
So make them use the same priority to ensure the order.

Differential Revision: https://phabricator.services.mozilla.com/D95266
2020-11-17 22:42:56 +00:00
Gerald Squelart ced008cc9f Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 22:26:20 +00:00
Gerald Squelart 786dd07114 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 22:23:38 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart f8c24dd6a4 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 11:40:46 +00:00
Gerald Squelart 7e40dbb3c5 Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96052
2020-11-17 11:38:06 +00:00
Noemi Erli 60669a2ed8 Backed out changeset 18448a7ebf82 (bug 1585070) for causing failures in test_cocoa_window_focus.html CLOSED TREE 2020-11-17 06:09:50 +02:00
Steven MacLeod 2c4c433439 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.

With this change `:-moz-window-inactive` is now fission compatible.

Differential Revision: https://phabricator.services.mozilla.com/D86422
2020-11-16 22:37:51 +00:00
Kartikaya Gupta 58f3191c3d Bug 1674382 - Further restrict where we record APZ_ZOOM_ACTIVITY. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96894
2020-11-16 22:38:46 +00:00
Kartikaya Gupta 4610c824d1 Bug 1674382 - Fix typo in function name. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96893
2020-11-13 18:29:31 +00:00
Emilio Cobos Álvarez 295535a2b2 Bug 1676632 - Throw more descriptive actor errors. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D96704
2020-11-16 21:18:49 +00:00
Henri Sivonen 96ae695458 Bug 1618386 - Add action ids to filter out stale active browsing context updates. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94969
2020-11-16 19:16:20 +00:00
Valentin Gosu bd132e112d Bug 1658097 - [fission] Send resource timing data for cross-origin frames to the correct process r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D96754
2020-11-13 13:48:00 +00:00
Emilio Cobos Álvarez 0ebfee88c4 Bug 1676932 - Remove VisibilityChange/nsIContentPermissionRequestCallback. r=nika
Also unused.

Differential Revision: https://phabricator.services.mozilla.com/D96884
2020-11-13 20:55:17 +00:00
sefeng f1c6f1d2ea Bug 1634437 - Dispatch NativeInit as an idle runnable on Linux r=heycam
EnsureInit takes a long time to run on Linux, in addition to it's
timing, it also runs within a critical path of MSG_ConstructBrowser.
Scheduling it as an idle runnable gives it a chance to run
before MSG_ConstructBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D83230
2020-11-12 20:04:53 +00:00
Emilio Cobos Álvarez 1239692187 Bug 1676932 - Remove nsIContentPermissionRequester.getVisibility. r=nika
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D96881
2020-11-12 19:10:10 +00:00
Emilio Cobos Álvarez 0205c49eb4 Bug 1676721 - Fix an incorrect assertion. r=mattwoodrow
See the comment as for why.

Differential Revision: https://phabricator.services.mozilla.com/D96788
2020-11-12 02:22:02 +00:00
Jed Davis 96f7c5cf5c Bug 1657401 - Change LookAndFeel IPC to use IPDL structs. r=spohl
Aside from automating boilerplate, this will allow reusing some of these
structs for full LookAndFeel remoting in bug 1470983.

Differential Revision: https://phabricator.services.mozilla.com/D94531
2020-11-11 23:26:51 +00:00
Tim Huang 0de41786ee Bug 1641270 - Part 8: Make the Drag&Drop to use the correct cookieJarSettings to download the url. r=smaug,dimi
Differential Revision: https://phabricator.services.mozilla.com/D95618
2020-11-11 11:14:05 +00:00
Tim Huang bc798e0690 Bug 1641270 - Part 4: Expose the cookieJarSettings to the browser object. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D95614
2020-11-11 11:14:14 +00:00
Mihai Alexandru Michis 4038013e6f Backed out 9 changesets (bug 1641270) for causing dt failures in browser_jsonview_save_json.js
CLOSED TREE

Backed out changeset 89a6dab92f1a (bug 1641270)
Backed out changeset 5f9c5af66b77 (bug 1641270)
Backed out changeset dfeb879f4131 (bug 1641270)
Backed out changeset 143728b1b1ab (bug 1641270)
Backed out changeset 265ae2953416 (bug 1641270)
Backed out changeset 55ea7810c160 (bug 1641270)
Backed out changeset 7bef9112f296 (bug 1641270)
Backed out changeset 2663dc1e9a3e (bug 1641270)
Backed out changeset fcba6dba3649 (bug 1641270)
2020-11-11 13:10:11 +02:00
Tim Huang 4cdeceaaf8 Bug 1641270 - Part 8: Make the Drag&Drop to use the correct cookieJarSettings to download the url. r=smaug,dimi
Differential Revision: https://phabricator.services.mozilla.com/D95618
2020-11-10 21:11:14 +00:00
Tim Huang ed61dc5da5 Bug 1641270 - Part 4: Expose the cookieJarSettings to the browser object. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D95614
2020-11-11 08:38:59 +00:00
Kris Maglione cfebcd3fd2 Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-11-10 20:35:04 +00:00
Neil Deakin c5eff66205 Bug 1649843, remove now unused legacy actor code, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D95206
2020-11-06 15:46:11 +00:00
Nika Layzell 8f1ae314b8 Bug 1673711 - Part 3: Handle LaunchSubprocessResolve on an already-dead content process, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D95891
2020-11-05 19:28:57 +00:00
Nika Layzell 1eff455532 Bug 1673711 - Part 2: Use CanSend instead of mIPCOpen in ContentParent, r=kmag
mIPCOpen would incorrectly be `true` before the actual IPC channel had been
opened. By instead using the IPC-provided CanSend() method, we can avoid this.

Differential Revision: https://phabricator.services.mozilla.com/D95890
2020-11-05 19:26:19 +00:00
Nika Layzell f5dcbe1c65 Bug 1673711 - Part 1: Don't shutdown processes before launching, r=jesup
Previously, it was possible to accidentally shut down a content process while it
was still launching if the process switch which requested the switch was
cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D95889
2020-11-05 19:25:40 +00:00
Nika Layzell f17e6c21c5 Bug 1657028 - Mark as dead earlier during shutdown, r=kmag
Previously we would call RemoveFromList, without calling MarkAsDead, when
ShutDownProcess was called called from ContentParent::LaunchSubprocessResolve.
This tripped some assertions in BrowsingContextGroup's host code.

Differential Revision: https://phabricator.services.mozilla.com/D95888
2020-11-05 19:29:48 +00:00
Nika Layzell 1825576064 Bug 1669160 - Have BrowserParent keep BrowsingContextGroup alive, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D94887
2020-11-04 20:50:28 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Jean-Yves Avenard c938c7416c Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Jean-Yves Avenard bedf73be6e Bug 1674043 - P5. Don't attempt to synchronize preferences until ContentParent has compleded initialization. r=nika
Initialization of the ContentParent could modify some preferences, and we wouldn't be ready to send them to the ContentChild yet.
So we split a ALIVE into another INITIALIZED state to distinguist the two.

Differential Revision: https://phabricator.services.mozilla.com/D95244
2020-11-02 15:32:59 +00:00
Jean-Yves Avenard 57cc7b894c Bug 1674043 - P2. Remove stray header declaration. r=mattwoodrow
Depends on D95240

Differential Revision: https://phabricator.services.mozilla.com/D95241
2020-10-30 22:29:52 +00:00
Christoph Kerschbaumer f6868ae514 Bug 1672648: Add SiteOriginPrincipal to ContentParent r=nika
Differential Revision: https://phabricator.services.mozilla.com/D95156
2020-11-03 07:25:41 +00:00
Olli Pettay 1856a4dec3 Bug 1671962 - Iframes loaded from restored session are loaded out of order when Fission enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D94904
2020-10-30 22:10:15 +00:00
Narcis Beleuzu 8042432b13 Backed out 2 changesets (bug 1673947, bug 1671962) for wpt failure on nested-context-navigations-iframe.html . CLOSED TREE
Backed out changeset 8c71945d53bd (bug 1673947)
Backed out changeset 84ed543cd810 (bug 1671962)
2020-10-30 21:05:41 +02:00
Olli Pettay d07f915174 Bug 1671962 - Iframes loaded from restored session are loaded out of order when Fission enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D94904
2020-10-30 11:48:23 +00:00
Neil Deakin 3239c28e6e Bug 1662771, remove willDestroy callback from JSActors, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94906
2020-10-29 14:24:43 +00:00
Kartikaya Gupta 8ee9f46d79 Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond
The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.

Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.

Differential Revision: https://phabricator.services.mozilla.com/D94624
2020-10-28 22:48:57 +00:00
Mihai Alexandru Michis 48192aab09 Backed out changeset 952da6bff887 (bug 1660054) for causing bc failures in browser_test_reset_scaling_zoom.js
CLOSED TREE
2020-10-28 23:00:15 +02:00
Kartikaya Gupta c75bed1584 Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond
The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.

Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.

Differential Revision: https://phabricator.services.mozilla.com/D94624
2020-10-28 19:14:18 +00:00
Andi-Bogdan Postelnicu f01b2a6215 Bug 1671641 - Make `dom/ipc` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94964
2020-10-28 12:31:35 +00:00
Emilio Cobos Álvarez e5a63697bf Bug 1673707 - Simplify handling of the suspendMediaWhenInactive flag. r=nika
Make it a synced field on the top browsing context. This handling the
propagation right and is much simpler.

This should fix cases where we don't look at the top level docshell to
figure out if we should suspend media.

Differential Revision: https://phabricator.services.mozilla.com/D94878
2020-10-27 19:55:47 +00:00
Emilio Cobos Álvarez 7163fddbe0 Bug 1673710 - Remove PBrowser.NotifyCompositorTransaction. r=sefeng
It's dead.

Differential Revision: https://phabricator.services.mozilla.com/D94881
2020-10-27 19:33:52 +00:00
alwu a6451ce0ab Bug 1346880 - part8 : ensure audio context is already running before doing next step. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D94780
2020-10-27 12:32:05 +00:00
Emilio Cobos Álvarez d622f54db0 Bug 1668875 - Distinguish theme changes that can and cannot affect style/layout. r=tnikkel
This should make the optimization landed earlier in this bug apply for
some of the NotifyThemeChanged() calls in nsWindow.cpp which are causing
all the extra invalidations.

If we know that system colors/fonts didn't change, we can avoid doing a
bunch of reflow work and the patch from earlier in the bug can avoid
re-rasterizing images too.

Differential Revision: https://phabricator.services.mozilla.com/D94425
2020-10-27 10:24:40 +00:00
Edgar Chen d3681664c5 Bug 1655239 - Make pointer capture fission compatible; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D94297
2020-10-26 21:00:50 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Edgar Chen 60998d6d23 Bug 1665752 - Do not send IPC to request focus if the browsing context already has the focus; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D94678
2020-10-26 14:19:59 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Randell Jesup 904b53869f Bug 1670848: Handling aborting history navigations when others run r=smaug
Handles edge cases around history.go() with one event loop spin

Differential Revision: https://phabricator.services.mozilla.com/D93302
2020-10-23 20:27:50 +00:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Nika Layzell 3431ce7dd1 Bug 1672444 - Null-check docShell in BrowserChild::RecvLoadURL, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D94601
2020-10-23 15:53:57 +00:00
Kris Maglione 7f1732b64e Bug 1671773: Add ContentParent to ContentProcessManager before we call InitInternal. r=nika
Otherwise, if we return early, it will never get added, and we will crash when
trying to remove it when it's destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D94487
2020-10-22 21:34:43 +00:00
Csoregi Natalia 22aaaaef5c Backed out changeset 77c34aa0aaf3 (bug 1669961) for causing crashtests. CLOSED TREE 2020-10-22 23:13:31 +03:00
Kris Maglione d219ced983 Bug 1671031: Add IsSameOriginWith() helper to WindowGlobalChild. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D94367
2020-10-22 19:42:33 +00:00
Kris Maglione 11382660dc Bug 1588503: Don't load AutoCompleteChild.jsm before necessary. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D93834
2020-10-22 19:26:58 +00:00
Kris Maglione 3cf334a80a Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-10-22 19:05:04 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
alwu 6ea535704b Bug 1669434 - part1 : update default metadata if needed when page title changes. r=chunmin,nika
When a page doesn't have a non-empty media session metadata, we would use its title as a default metadata, which would display as an artist name on the virtual control interface.

Therefore, when a page changes its title, we should also notify media controller (if it's been created) in order to update the default metadata as well.

Differential Revision: https://phabricator.services.mozilla.com/D93670
2020-10-21 17:25:34 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Dan Glastonbury 77bf32c70e Bug 1595994 - P9: Allow LaunchRDDProcess() to be called from MainThread without hanging. r=mattwoodrow
Depends on D54880

Differential Revision: https://phabricator.services.mozilla.com/D54882
2020-10-20 23:26:33 +00:00
Tom Tung 45a97b5b83 Bug 1654080 - Use PBackground for syncing SessionStorageCache and use LSWriteOptimizer to send data changes; r=dom-workers-and-storage-reviewers,janv,nika
This patch does:
- Use LSWriteOptimizer
- Remove SessionStorageService since it's unused.
- Move IPC from PContent to PBackground
(by SessionStorageManager{Child, Parent} and SessionStorageCache{Child, Parent}).
- Extract SessionStorageManagerBase and add PBackgroundSessionStorageManager.
- Expose a getter function to get a BackgroundParentManager for top context id
on the parent.

IPC
- Before this patch:
  - Copy from parent while loading a document.
    - Mark cache entry on the parent process as loaded by the child id.
  - Update change on checkpoint.
  - Unmark cache entry on the parent process as unloaded for the child id while
  the parent actor is destorying.
- After this patch:
  - Sync IPC load in the first SessionStorage operation.
  - Update change on checkpoint

`BackgroundSessionStorageManager`'s lifecycle on the parent process.
- Create by `SessionStorageManagerParent` and register to the `sManagers`.
- Hold by `SessionStorageManagerParent` and `sManagers`.
- Remove from the `sManagers` while the corresponding `BrowsingContext` is
destructed (on the parent process).

Depends on D89341

Differential Revision: https://phabricator.services.mozilla.com/D89342
2020-10-14 00:19:33 +00:00
Nika Layzell 6e69a9db71 Bug 1660539 - Make StructuredCloneData args optional in JSActor RawMessage, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D93122
2020-10-13 17:43:56 +00:00
Aaron Klotz 3a1effb0ce Bug 1668376: Part 2 - On Android, do not mark content processes as dead in ContentParent::NotifyTabDestroying; r=nika
Because GeckoView content processes are hosted inside Android `Service`s, and because
there is a hard limit on those services, we cannot assume that it is safe to launch
a new content process while another one is still in the process of shutting down.

Calling `ContentParent::MarkAsDead` from `ContentParent::NotifyTabDestroying`
triggers such a scenario. By excluding this code from GeckoView builds, we
ensure that content processes remain live until GeckoView (or Android itself)
forcibly terminates them.

Differential Revision: https://phabricator.services.mozilla.com/D92650
2020-10-13 15:55:16 +00:00
Aaron Klotz 865e038207 Bug 1668376: Part 1 - Rename GeckoProcessManager::MarkAsDead to GeckoProcessManager::ShutdownProcess; r=geckoview-reviewers,necko-reviewers,agi,dragana
Since the semantics of `ContentParent::MarkAsDead` are significantly different
from `GeckoProcessManager::MarkAsDead`, let's rename the latter to better
reflect what it actually does.

Differential Revision: https://phabricator.services.mozilla.com/D92649
2020-10-06 20:25:02 +00:00
Jonathan Kew a85cb4bb2b Bug 1668253 - Convert hyphenation from ipc::SharedMemoryBasic to base::SharedMemory, and freeze blocks before sharing to content processes. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D91945
2020-10-12 10:24:06 +00:00
Kartikaya Gupta 6d47eac4ee Bug 1666802 - Remove LayersLogging.*. r=mattwoodrow
The remaining functions are moved to be with their brethren in xpcom.

Differential Revision: https://phabricator.services.mozilla.com/D93146
2020-10-11 21:20:46 +00:00
Cameron McCormack 18ffe7c642 Bug 1656114 - Part 4: Accumulate page use counters in the parent process. r=emilio,nika
This changes the way we deal with page use counters so that we can
handle out of process iframes.

Currently, when a parent document is being destroyed, we poke into all
of the sub-documents to merge their use counters into the parent's page
use counters, which we then report via Telemetry.  With Fission enabled,
the sub-documents may be out of process.  We can't simply turn these
into async IPC calls, since the parent document will be destroyed
shortly, as might the content processes holding the sub-documents.

So instead, each document during its initialization identifies which
ancestor document it will contribute its page use counters to, and
stores its WindowContext id to identify that ancestor.  A message is
sent to the parent process to notify it that page use counter data will
be sent at some later point.  That later point is when the document
loses its window.  It doesn't matter if the ancestor document has
already been destroyed at this point, since all we need is its
WindowContext id to uniquely identify it.  Once the parent process has
received all of the use counters it expects to accumulate to a given
WindowContext Id, it reports them via Telemetry.

Reporting of document use counters remains unchanged and is done by each
document in their content process.

While we're here, we also:

* Limit use counters to be reported for a pre-defined set of document
  URL schemes, rather than be based on the document principal.

* Add proper MOZ_LOG logging for use counters instead of printfs.

Differential Revision: https://phabricator.services.mozilla.com/D87188
2020-10-11 22:03:43 +00:00
Neil Deakin af842b5083 Bug 1670134, remove message manager reference from LightweightThemeChild.jsm, by getting chromeOuterWindowId from BrowserChild instead, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93043
2020-10-09 17:36:22 +00:00
Razvan Maries 5dcad9e9b5 Backed out changeset 428c9c1eabb8 (bug 1655866) for multiple failures. CLOSED TREE 2020-10-09 22:28:00 +03:00
Kris Maglione 824fb768e1 Bug 1655866: Part 9 - Use the same PermitUnloadAction enum in WGP and nsIContentViewer. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90939
2020-10-09 18:29:34 +00:00
Emilio Cobos Álvarez 4e68e78542 Bug 1669925 - Add a printing.trigger keyed scalar to record what triggers a particular print dialog. r=jwatt,marionette-reviewers,maja_zf
In order to avoid over/under-counting, we need to treat window.print()
specially. The new UI was using aOpenWindowInfo.isForPrintPreview for
that, but that doesn't quite work for the old UI (because it will
trigger a regular print, not a preview).

But since isForPrintPreview was only really needed to distinguish
window.print(), just rename it and set it to true when the old UI is
triggered by window.print() as well.

Differential Revision: https://phabricator.services.mozilla.com/D92925
2020-10-09 14:59:46 +00:00
Nika Layzell c69565e02f Bug 1661364 - Part 6: Give the recycled process background process priority, r=kmag,jesup
Differential Revision: https://phabricator.services.mozilla.com/D89485
2020-09-14 13:45:49 +00:00
Nika Layzell b772ba7bfb Bug 1661364 - Part 5: Remove MarkAsTroubled, r=kmag
This method has no implementation, and is unused.

Differential Revision: https://phabricator.services.mozilla.com/D88629
2020-09-14 13:45:49 +00:00
Nika Layzell bc478ec278 Bug 1661364 - Part 4: Disable process recycling when prealloc is disabled, r=kmag,jesup
Various tests disable process preallocation in order to get "stable" process
counts for testing purposes. In order to keep this behaviour, we need to disable
and shut down the recycled E10S process whenever the preallocator is disabled.

This is accomplished by having the preallocator expose its enabled status to
ContentParent, and by having the preallocator trigger ContentParent shutdown
when it is disabled.

This also has the benefit of hooking the recycler back into memory pressure
notifications, meaning it will be shut down if not in use when a memory pressure
event occurs.

Differential Revision: https://phabricator.services.mozilla.com/D88628
2020-09-14 13:45:48 +00:00
Nika Layzell 6659bba1f6 Bug 1661364 - Part 3: Add a MaybeBeginShutDown method, r=kmag,jesup
This helper method abstracts over the common tasks performed in every normal
shutdown codepath. This will be useful for making process recycling respect
preallocation being disabled.

Differential Revision: https://phabricator.services.mozilla.com/D88627
2020-09-14 13:45:48 +00:00
Nika Layzell 8ba59b4f56 Bug 1661364 - Part 2: Don't recycle web processes with Fission enabled, r=kmag,jesup
It is uncommon to have long-lived "web" processes when Fission is enabled, so in
general we probably don't want to be performing content process recycling.

We also skip recycling web processes when E10s is disabled, as the process
preallocator would be disabled in that case, so recycling processes can lead to
mochitest-chrome test failures.

Differential Revision: https://phabricator.services.mozilla.com/D88626
2020-09-14 13:45:48 +00:00
Nika Layzell bdeb969b66 Bug 1661364 - Part 1: Don't remove recycled content processes from the pool, r=kmag,jesup
Previously, we would use the PreallocatedProcessManager to handle recycled
"web" content processes, which would remove them from the pool and try to make
them act like "prealloc" content processes.

Unlike true preallocated content processes, we can end up having content loaded
in recycled "web" content processes, such as due to a new pop-up being created
at an inconvenient time during process teardown. The complexity around this
semi-prealloc state caused some assertion failures in other related code.

This new approach doesn't remove the recycled process from the process selection
pool. Instead, after process selection decides to spawn a new "web" process, a
pointer to the specific "recycled" content process is fetched and returned by
the process selection algorithm before asking the preallocator.

This new approach should have similar behaviour, but avoids some of the pitfalls
caused by removing the entry from the process selection pool after it has begun
hosting content.

Differential Revision: https://phabricator.services.mozilla.com/D88625
2020-09-14 13:45:48 +00:00
Nika Layzell a008f5cdae Bug 1660342 - Add more assertions around host state, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D87928
2020-09-16 04:43:54 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Simon Giesecke e19b65b863 Bug 1663924 - Replace output parameter of PromptIfNeeded by return value. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D91158
2020-10-06 08:39:40 +00:00
julianwels 341416588c Bug 1653026 - Added HTTPS-Only Mode upgrade info to browser UI state. r=mattwoodrow,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86566
2020-10-06 00:34:55 +00:00
Kris Maglione a20d386028 Bug 1669175: Fix another null deref in beforeunload code. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D92468
2020-10-05 19:40:54 +00:00
Kris Maglione a23b146c96 Bug 1655866: Part 8 - Remove expired onbeforeunload histograms. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90935
2020-09-30 12:51:58 +00:00
Olli Pettay 1c44b2f115 Bug 1668577 - Make child process to send offset to parent process, not index, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92074
2020-10-02 16:15:47 +00:00
Peter Van der Beken ff96b9b188 Bug 1668052 - Pass the BrowserParent's browsing context to UpdateSessionStore instead of getting it from the frame element's frameloader. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91766
2020-10-04 08:55:07 +00:00
Brindusan Cristian 2a9b39efce Backed out 2 changesets (bug 1653026) for mochitest failures at WindowGlobalParent.cpp. CLOSED TREE
Backed out changeset 54c69c99b241 (bug 1653026)
Backed out changeset e70649f78910 (bug 1653026)
2020-10-03 10:49:04 +03:00
julianwels 30a6225652 Bug 1653026 - Added HTTPS-Only Mode upgrade info to browser UI state. r=mattwoodrow,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86566
2020-10-03 01:22:19 +00:00
Razvan Maries 59c799b78f Backed out changeset a3cbffeb24a3 (bug 1668577) for perma failures on location_reload.html. CLOSED TREE 2020-10-02 19:11:53 +03:00
Olli Pettay 29e269dd12 Bug 1668577 - Make child process to send offset to parent process, not index, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92074
2020-10-02 12:05:57 +00:00
Kris Maglione 6911cfe5e9 Bug 1666670: Fix beforeunload timeout handling to ignore prompt. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91351
2020-10-01 02:46:45 +00:00
Gerald Squelart ee701f64d7 Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 11:02:23 +00:00
Bogdan Tara ababae891b Backed out 2 changesets (bug 1667915) for platform related bustage CLOSED TREE
Backed out changeset e7a0788a1741 (bug 1667915)
Backed out changeset d34505b2d81b (bug 1667915)
2020-10-01 12:34:39 +03:00
Gerald Squelart e07ae06a1d Bug 1667915 - Separate marker category from marker options - r=gregtatum
The `category.WithOptions(...)` syntax was a bit strange and difficult to explain.

Now the category and options are separate parameters. Default options can be specified with `MarkerOptions{}` or just `{}`.

As a special case, defaulted-NoPayload functions don't need `<>`, and defaulted-NoPayload functions and macros don't even need `{}` for default options, e.g.:
`profiler_add_marker("name", OTHER); PROFILER_MARKER_UNTYPED("name", OTHER);`

Differential Revision: https://phabricator.services.mozilla.com/D91680
2020-10-01 01:44:47 +00:00
Narcis Beleuzu 4fa3a7f995 Backed out changeset 6cf959e2de7b (bug 1666670) for wpt failures on scroll-behavior-smooth.html . CLOSED TREE 2020-10-01 05:20:54 +03:00
Kris Maglione 90d7f5d0ee Bug 1633132: Add requestCompleteLog() to browser_CrashService_crash.js.
Differential Revision: https://phabricator.services.mozilla.com/D91987
2020-09-30 20:30:51 +00:00
Kris Maglione 49bc543261 Bug 1666670: Fix beforeunload timeout handling to ignore prompt. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D91351
2020-09-30 19:39:56 +00:00
Peter Van der Beken fb9ae54dbd Bug 1659102 - Fix fragment navigation for session history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91593
2020-09-29 12:09:59 +00:00
Peter Van der Beken 7a59804081 Bug 1659102 - Merge SetActiveSessionHistoryEntryForTop and SetActiveSessionHistoryEntryForFrame. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91592
2020-09-29 12:04:20 +00:00
Edgar Chen 3af8ce6d7a Bug 1667081 - Part 1: Replace usage of nsIFocusManager with nsFocusManager; r=hsivonen
This patch is bascially done by:
perl -p -i -e "s/nsIFocusManager\* /nsFocusManager* /g;" $( find . -name *.cpp )
perl -p -i -e "s/nsCOMPtr<nsIFocusManager>/RefPtr<nsFocusManager>/g;" $( find . -name *.cpp )

Differential Revision: https://phabricator.services.mozilla.com/D91287
2020-09-29 07:21:09 +00:00
Bogdan Tara 8f6c53bdf5 Backed out 9 changesets (bug 1667081) for assertion failure on nsFocusManager CLOSED TREE
Backed out changeset 156ab3eba505 (bug 1667081)
Backed out changeset 2e37f347082c (bug 1667081)
Backed out changeset 8f59cef879ae (bug 1667081)
Backed out changeset 1298ff140218 (bug 1667081)
Backed out changeset 91342c822425 (bug 1667081)
Backed out changeset aafb1878c590 (bug 1667081)
Backed out changeset 2252e975f0d7 (bug 1667081)
Backed out changeset c3bac5f407d2 (bug 1667081)
Backed out changeset b1e6e81396ae (bug 1667081)
2020-09-28 20:02:52 +03:00
Edgar Chen 6abd74544d Bug 1667081 - Part 1: Replace usage of nsIFocusManager with nsFocusManager; r=hsivonen
This patch is bascially done by:
perl -p -i -e "s/nsIFocusManager\* /nsFocusManager* /g;" $( find . -name *.cpp )
perl -p -i -e "s/nsCOMPtr<nsIFocusManager>/RefPtr<nsFocusManager>/g;" $( find . -name *.cpp )

Differential Revision: https://phabricator.services.mozilla.com/D91287
2020-09-28 14:04:12 +00:00
Olli Pettay 97778cf44a Bug 1667449 - Hide fission.sessionHistoryInParent pref getter behind a function r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91462
2020-09-28 12:01:12 +00:00