8625 Commits

Author SHA1 Message Date
John Schanck
6028a138e9 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-28 19:48:06 +00:00
Peter Van der Beken
1d54b66900 Bug 1766131 - Always synchronize layout history state on the previous page when restoring a page from BFCache. r=smaug
This fixes docshell/test/chrome/bug321671_window.xhtml running with SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D144517
2022-04-28 09:54:36 +00:00
Seinlin
e1304c5ced Bug 1766718 - Add NS_PRINT to prevent build break. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D144888
2022-04-28 08:09:14 +00:00
Butkovits Atila
94e2a597f6 Backed out changeset 0599b2a0913a (bug 1691122) for causing failures at test_peerConnection_basicAudioNATRelayTLS.html. CLOSED TREE 2022-04-28 03:58:05 +03:00
John Schanck
ea5479a8d7 Bug 1691122 - Remove subject common name fallback support in CertVerifier. r=keeler,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D143808
2022-04-27 20:57:31 +00:00
Nika Layzell
642b5e7837 Bug 1756980 - Part 3: Clarify "process switch" parameters in DocumentLoadListener, r=smaug
This clarifies some of the members and arguments which were used in
DocumentLoadListener to make them more clear, adding documentation.

In addition to the simplifications of logic and improved naming, this
patch also moves the responsibility of managing StreamFilterRequest out
of DisconnectListeners so that stream listeners behave more
consistently, as the existing flag doesn't map well to whether or not
they should be cleared.

This was kept seperate from part 1 as it is largely a clarity
improvement, and may make it harder to see the important changes in that
part.

Depends on D143676

Differential Revision: https://phabricator.services.mozilla.com/D144747
2022-04-27 15:22:01 +00:00
Nika Layzell
e834665924 Bug 1756980 - Part 1: Redirect internally-handled attachment loads into new tabs, r=Gijs,smaug,necko-reviewers,dragana
This patch changes how we handle document loads which are being handled
internally but have Content-Disposition: attachment specified at the
DocumentLoadListener layer. This was done as process switching is
currently the only place during a load where we can change the target
BrowsingContext which the load will complete in.

The only situation where we should currently continue to deliver a
successful request to the default content-viewer despite
Content-Disposition: attachment being specified is when we choose to
handle a downloaded PDF internally, so this shouldn't impact other
cases.

The change is handled by forcing a process switch under the hood, and
opening a new browser window asynchronously to handle the process
switch, similar to how object and embed load upgrades are handled. This
is done using nsIBrowserDOMWindow to attempt to respect the user's
window opening preferences.

A small change to browser.js was also made to try to encourage the new
tab to be opened next to the previous tab, as well as to avoid starting
unnecessary new processes when creating the new browser window.

Differential Revision: https://phabricator.services.mozilla.com/D143675
2022-04-27 15:22:00 +00:00
Mark Banner
d276554fa2 Bug 1766230 - Fix a couple of incorrect uses of Services.* properties in docshell tests. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144552
2022-04-27 11:41:10 +00:00
Edgar Chen
b838774cf3 Bug 1766582 - Expose last user gesture timestamp; r=sgalich,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144590
2022-04-27 08:26:56 +00:00
Mike Hommey
af7d5859d7 Bug 1766377 - Fix some sign-compare warnings by using ProcessId more consistently. r=nika,necko-reviewers,kershaw
dom/media/ipc/RDDProcessManager.cpp(320,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
      gpuProcessPid != -1 ? gpuProcessPid : base::GetCurrentProcId();
      ~~~~~~~~~~~~~ ^  ~~
dom/media/ipc/RDDProcessManager.cpp(332,21): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
  if (gpuProcessPid != -1) {
      ~~~~~~~~~~~~~ ^  ~~
gfx/layers/ipc/SharedSurfacesParent.cpp(360,38): error: comparison of integers of different signs: 'base::ProcessId' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
    if (!gpm || gpm->GPUProcessPid() != -1) {
                ~~~~~~~~~~~~~~~~~~~~ ^  ~~
ipc/glue/MessageChannel.cpp(2145,13): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const base::ProcessId' (aka 'const unsigned long') [-Werror,-Wsign-compare]
    if (pid != base::kInvalidProcessId &&
        ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144688
2022-04-27 07:45:19 +00:00
Jonathan Watt
ea773f7d3c Bug 1763989. Remove the PPrinting and nsPrintingProxy code. r=bobowen
Bug 1757395 basically removed the reason for PPrinting to exist. What remained
essentially just added an unnecessary layer of complexity/indirection to the
creation of PRmotePrintJob actors.

Differential Revision: https://phabricator.services.mozilla.com/D143330
2022-04-26 14:30:29 +00:00
Paul Zuehlcke
1e4838aeeb Bug 1735746 - Block external protocol navigation from sandboxed contexts. r=nika,ckerschb,Gijs,smaug
Differential Revision: https://phabricator.services.mozilla.com/D141131
2022-04-20 11:06:50 +00:00
Andreas Farre
8b02a9cde2 Bug 1739450 - Part 2: Collect session history when wireframes are collected. r=peterv,mconley
Because wireframes are collected together with the session history
entry for its docshell, we need to collect session history to make
sure that collected wireframes show up.

Differential Revision: https://phabricator.services.mozilla.com/D143368
2022-04-19 15:19:22 +00:00
Andreas Farre
e4c062012a Bug 1739450 - Part 1: Move ownership of session store scroll and form data to platform. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D130389
2022-04-19 15:19:22 +00:00
Olli Pettay
327cb58d26 Bug 1763617, GetPerformance may return null, so null-check it before use in bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D143506
2022-04-19 13:34:52 +00:00
Mike Conley
c120197d06 Bug 1764790 - Remove TopLevelNavigationDelegate support. r=nika
Depends on D143926

Differential Revision: https://phabricator.services.mozilla.com/D143927
2022-04-18 17:46:10 +00:00
Mike Conley
eec700aee9 Bug 1764790 - Remove TopLevelNavigationDelegate tests. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D143926
2022-04-18 17:46:09 +00:00
Peter Van der Beken
3e9eedaad9 Bug 1763833 - Fixes for tests with SHIP without Fission and/or on Android. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143303
2022-04-16 09:24:52 +00:00
Peter Van der Beken
f568cf2298 Bug 1763598 - Fixes for docshell/test/chrome tests with session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143160
2022-04-15 20:44:38 +00:00
Peter Van der Beken
926498605f Bug 1763598 - Fix docshell_helpers.js for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143159
2022-04-15 20:44:38 +00:00
Mike Conley
b3f08bf9bd Bug 1763672 - Introduce targetTopLevelLinkClicksToBlank on BrowsingContext. r=nika
This property defaults to false. When set to true, user-initiated link clicks in
the top-level BrowsingContext will default target to _blank. This is similar to what
we do for App Tabs, but is slightly more aggressive in that in will also occur for
same-origin navigations.

Differential Revision: https://phabricator.services.mozilla.com/D143374
2022-04-13 16:00:27 +00:00
criss
a1b5f9b20d Backed out changeset 2e69a9d98234 (bug 1763672) for causing bustages on nsDocShell.cpp. CLOSED TREE 2022-04-13 18:03:11 +03:00
Mike Conley
91cacbd5ef Bug 1763672 - Introduce targetTopLevelLinkClicksToBlank on BrowsingContext. r=nika
This property defaults to false. When set to true, user-initiated link clicks in
the top-level BrowsingContext will default target to _blank. This is similar to what
we do for App Tabs, but is slightly more aggressive in that in will also occur for
same-origin navigations.

Differential Revision: https://phabricator.services.mozilla.com/D143374
2022-04-13 13:16:38 +00:00
Paul Zuehlcke
c102462ad6 Bug 1746383 - Set URLBar pageProxyState to invalid for onLocationChange triggered by SessionStore. r=nika,dao
Differential Revision: https://phabricator.services.mozilla.com/D138823
2022-04-12 14:41:06 +00:00
Jens Stutte
5a26859ea7 Bug 1696771: Always null check the ContentProcessManager singleton before use. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143180
2022-04-08 11:57:05 +00:00
Norisz Fay
c463ca58c7 Backed out changeset 2531ddbeeffa (bug 1696771) for causing multiple failures CLOSED TREE 2022-04-08 10:44:55 +03:00
Jens Stutte
3c00871162 Bug 1696771: Always null check the ContentProcessManager singleton before use. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143180
2022-04-08 06:20:19 +00:00
Dana Keeler
6502ebf4b6 Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Frederik Braun
86ba751d18 Bug 1577122 - mozJSComponentLoader::Import() should only work for internal URLs, and update some tests r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D140058
2022-04-06 14:36:47 +00:00
Butkovits Atila
393fc50e58 Backed out 4 changesets (bug 1735746) for causing failures at browser_protocol_custom_sandbox.js. CLOSED TREE
Backed out changeset 703dfd92c775 (bug 1735746)
Backed out changeset 3b06ed08d93b (bug 1735746)
Backed out changeset 9968278b9efe (bug 1735746)
Backed out changeset 49f2e283115d (bug 1735746)
2022-04-05 16:04:29 +03:00
Paul Zuehlcke
720e7605fe Bug 1735746 - Block external protocol navigation from sandboxed contexts. r=nika,ckerschb,Gijs,smaug
Differential Revision: https://phabricator.services.mozilla.com/D141131
2022-04-05 11:31:53 +00:00
Emilio Cobos Álvarez
6553f27967 Bug 1762298 - Inherit used color-scheme from embedder <browser> elements. r=nika,dao,Gijs
This allows popups and sidebars to use the chrome preferred
color-scheme.

This moves the responsibility of setting the content-preferred color
scheme to the appropriate browsers to the front-end (via tabs.css).

We still return the PreferredColorSchemeForContent() when there's no
pres context (e.g., for display:none in-process iframes). We could
potentially move a bunch of the pres-context data to the document
instead, but that should be acceptable IMO as for general web content
there's no behavior change in any case.

Differential Revision: https://phabricator.services.mozilla.com/D142578
2022-04-04 18:22:04 +00:00
Jonathan Watt
82ca8925d2 Bug 1757657. Remove some about:printpreview cruft that was missed in 1702501. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D139993
2022-04-04 17:19:24 +00:00
Cosmin Sabou
ae056f8313 Backed out changeset f255030d86d8 (bug 1577122) for causing talos crashes in Bug 1762611. 2022-04-01 23:30:12 +03:00
Cathy Lu
104eb166e9 Bug 1753700 - Rename ActivityChanged to BrowserPriorityChanged. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D141531
2022-04-01 14:42:41 +00:00
Frederik Braun
e926167702 Bug 1577122 - mozJSComponentLoader::Import() should only work for internal URLs, and update some tests r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D140058
2022-04-01 09:27:06 +00:00
Gijs Kruitbosch
8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay
acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Edgar Chen
e475cac8cc Bug 1752250 - Part 2: [SHIP] Don't restore form data when reload a page with a no-store header; r=peterv
Sync mSaveLayoutState to child process, so when the LayoutHistoryState is created
and add into SessionHistoryInfo in child process, we could update its
mScrollPositionOnly flag directly.

Differential Revision: https://phabricator.services.mozilla.com/D141365
2022-03-29 20:27:09 +00:00
Edgar Chen
87adb15d3b Bug 1752250 - Part 1: Refactor form restoration test; r=peterv
to make adding new tests easier.

Differential Revision: https://phabricator.services.mozilla.com/D141364
2022-03-29 20:27:09 +00:00
Emilio Cobos Álvarez
8885ef4b8d Bug 1760674. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D141958
2022-03-29 12:15:52 +00:00
Cristian Tuns
9bd0c3604e Backed out changeset ddf7a48e3bf1 (bug 1760674) for causing mochitest failures on Link.cpp CLOSED TREE 2022-03-29 07:39:21 -04:00
Emilio Cobos Álvarez
0d56184e9d Bug 1760674. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D141958
2022-03-29 10:56:50 +00:00
Henri Sivonen
8dca2aaa89 Bug 1712928 - Gather telemetry about encoding-unlabeled pages and about Repair Text Encoding usage situations. r=emk
In particular, gather telemetry to evaluate the impact of unlabeled UTF-8
and how detector-triggered reloads would change if ASCII-only at initial
guess was treated as UTF-8.

Differential Revision: https://phabricator.services.mozilla.com/D140818
2022-03-29 08:04:25 +00:00
Butkovits Atila
f60ac86be0 Backed out 2 changesets (bug 1728331) for causing failures at RTCPeerConnection-videoDetectorTest.html. CLOSED TREE
Backed out changeset b6649f0253c5 (bug 1728331)
Backed out changeset e9242af1224d (bug 1728331)
2022-03-29 00:04:47 +03:00
Nika Layzell
66b31a7ed2 Bug 1728331 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2022-03-28 16:18:04 +00:00
Tim Huang
7e5160909f Bug 1760009 - Don't strip the URL query parameters if there is no triggering principal. r=smaug
In the case where the triggering principal doesn't exist, calling
nsDocShellLoadState::MaybeStripTrackerQueryStrings() will crash. It's
becuase we will access the triggering principal in the function.

The patch makes the function to return early if the triggering prinicpal
doesn't exist. In this case, we cannot decide if we need to strip the
URL because the information from the triggering principal is lacking.
Therefore, we can only return and don't strip the URL. Also, this can
avoid crashing Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D141594
2022-03-22 08:45:19 +00:00
Jamie Nicol
5178584a8a Bug 1759990 - Add about:crashgpu redirector to cause GPU process crash. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D141337
2022-03-21 20:55:56 +00:00
Nika Layzell
c14c6bb509 Bug 1647892 - Improve the reliability of test_double_submit.html, r=farre
Unlike the previous implementation, this new version performs the
waiting before sending response headers, meaning that it delays
OnStartRequest rather than just delaying the response body. As the
double-submission prevention currently only waits for OnStartRequest,
this should improve the reliability of the test.

Because the test no longer requires large amounts of data for delay
purposes, it has also been simplified to not generate random large
payloads anymore.

Differential Revision: https://phabricator.services.mozilla.com/D141427
2022-03-21 20:19:45 +00:00