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

8238 Коммитов

Автор SHA1 Сообщение Дата
Alexandru Michis 0e762fb5f0 Backed out changeset 4736b477e8cf (bug 1704636) for causing multiple wpt failures.
CLOSED TREE
2021-04-26 19:50:05 +03:00
Joel Maher 1bab60f4c0 Bug 1704636 - run many windows 7-32 tests on windows10x64 via wow64. r=ahal,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112372
2021-04-26 14:43:31 +00:00
Olli Pettay 9b7e635703 Bug 1705489 - update docshell/test/browser/browser_bug1328501.js to pass on Fission+BFCache, r=peterv
The test is using a framescript to have an observer for "http-on-opening-request".
That is used for the actual testpage but we need to prevent the next page to enter bfcache, so that
when going back from the session history frameloader isn't changed.
So in this case disabling bfcache should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D112245
2021-04-20 11:33:16 +00:00
Emilio Cobos Álvarez 294d0f244e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
This removes some sketchy non-caching of cursors on windows while at it,
now that plugins are gone, but otherwise shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D112475
2021-04-20 09:47:32 +00:00
Masatoshi Kimura b09353a135 Bug 1234520 - Re-enable test_bug344861.html, test_bug369370.html, test_bug741266.html on Windows. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D112471
2021-04-19 23:01:39 +00:00
Peter Van der Beken f296f5bb9a Bug 1696158 - Move CanSavePresentation to the parent process. Make nsDocShell listen for background requests too. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112201
2021-04-19 14:50:57 +00:00
Peter Van der Beken cecda3f1ca Bug 1696158 - Move CanSavePresentation to the parent process. Add test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110235
2021-04-19 14:50:56 +00:00
Peter Van der Beken 302c37978b Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 14:50:56 +00:00
Peter Van der Beken 1c8872c7e2 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 14:50:55 +00:00
Peter Van der Beken 14377359b0 Bug 1696158 - Move CanSavePresentation to the parent process. Notify parent process of requests in the loadgroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110233
2021-04-19 14:50:55 +00:00
smolnar 84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken 3d4ba1d105 Bug 1696158 - Move CanSavePresentation to the parent process. Make nsDocShell listen for background requests too. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112201
2021-04-19 12:39:21 +00:00
Peter Van der Beken f594601d76 Bug 1696158 - Move CanSavePresentation to the parent process. Add test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110235
2021-04-19 12:39:21 +00:00
Peter Van der Beken 30c3bd8c7e Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 12:39:20 +00:00
Peter Van der Beken ed3b54b567 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 12:39:20 +00:00
Peter Van der Beken d68785db97 Bug 1696158 - Move CanSavePresentation to the parent process. Notify parent process of requests in the loadgroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110233
2021-04-19 12:39:20 +00:00
Emilio Cobos Álvarez dffb321319 Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
There's no reason to require a null-terminated string in imgLoader.

Differential Revision: https://phabricator.services.mozilla.com/D112478
2021-04-17 22:21:19 +00:00
Emilio Cobos Álvarez 9afefdd884 Bug 1705757 - Move FrameLoader.print to BrowsingContext.print. r=nika,remote-protocol-reviewers,marionette-reviewers,extension-reviewers,zombie
This makes it trivial to choose the right BrowserParent to print a
browsing context, by removing the OuterWindowID / FrameLoader
indirections.

Differential Revision: https://phabricator.services.mozilla.com/D112412
2021-04-17 18:41:11 +00:00
Emilio Cobos Álvarez be83013af7 Bug 1704651 - Fix base toolchains build.
MANUAL PUSH: Trivial bustage fix on a CLOSED TREE
2021-04-17 02:27:50 +02:00
Emilio Cobos Álvarez a4396a711c Bug 1704651 - Trigger stop notification on discard if waiting for it. r=nika
This is enough to fix the leak though perhaps the other patch also makes
sense.

Differential Revision: https://phabricator.services.mozilla.com/D112419
2021-04-16 23:16:41 +00:00
Olli Pettay 7decb1d196 Bug 1676181 - Fix docshell/test/browser/browser_browsingContext-01.js for Fission, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D111442
2021-04-15 13:54:12 +00:00
Hubert Boma Manilla eec8ef34ae Bug 1703786 - Use nsILoadInfo.sandboxFlags instead r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112154
2021-04-15 11:14:23 +00:00
Kashav Madan 4c840a38d9 Bug 1700963 - Add a "browsing-context-did-set-embedder" observer notification, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D111709
2021-04-14 23:36:10 +00:00
Dorel Luca b15d7d893e Backed out 3 changesets (bug 1700963) for Browser-chrome failures in docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js. CLOSED TREE
Backed out changeset cda35e554327 (bug 1700963)
Backed out changeset fbafd75b06d3 (bug 1700963)
Backed out changeset 8b922e4f612b (bug 1700963)
2021-04-14 23:26:05 +03:00
Kashav Madan b4a16788a0 Bug 1700963 - Add a "browsing-context-did-set-embedder" observer notification, r=nika
Depends on D110336

Differential Revision: https://phabricator.services.mozilla.com/D111709
2021-04-14 18:53:06 +00:00
Christoph Kerschbaumer e1c35fda94 Bug 1658924: Implement HTTPS-First and automatically fall back to http if secure top-level connection is not available r=necko-reviewers,JulianWels,mattwoodrow,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111686
2021-04-13 17:43:12 +00:00
Mike Conley cb50d40885 Bug 1686315 - Fix up the last few tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Critically, this makes sure SubDialog.abort calls SubDialog.close even if its contents haven't finished
loading. This prevents a shutdown leak.

Differential Revision: https://phabricator.services.mozilla.com/D111736
2021-04-13 15:51:49 +00:00
Mike Conley b29a236f04 Bug 1686315 - Fix up more tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Batch 2 of 2.

Differential Revision: https://phabricator.services.mozilla.com/D110483
2021-04-13 15:51:48 +00:00
Mike Conley 599de83389 Bug 1686315 - Fix up some tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Batch 1 of 2.

Differential Revision: https://phabricator.services.mozilla.com/D110342
2021-04-13 15:51:48 +00:00
Emilio Cobos Álvarez 3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Emilio Cobos Álvarez d1e4e528b2 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-10 03:29:36 +00:00
Narcis Beleuzu a7ec545704 Backed out 2 changesets (bug 1703291) for bc failures on BrowsingContext.cpp . CLOSED TREE
Backed out changeset 4d216ecbacd9 (bug 1703291)
Backed out changeset 51d244d886aa (bug 1703291)
2021-04-10 00:52:54 +03:00
Anny Gakhokidze 0985861202 Bug 1698601 - Part 2: Carry over restore data to new context after a process swap, r=smaug
Also, make sure we update layout history state from docshell before we load a
new URI, as it might be our last chance to do so before a process swap.

Differential Revision: https://phabricator.services.mozilla.com/D110994
2021-04-09 17:46:52 +00:00
Emilio Cobos Álvarez 85f92a8a49 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-09 17:33:50 +00:00
Nika Layzell 4bcdc094f9 Bug 1702714 - GetBrowserBridgeParent may be null after destroy, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D110827
2021-04-09 17:10:18 +00:00
lyavor 75c83b4a52 Bug 1702001 Https-only mode does not reload pages after clicking "Continue to HTTP Site", when url contains navigation r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D110395
2021-04-08 14:32:57 +00:00
Csoregi Natalia cfad2d513e Backed out changeset b09095eaf7d9 (bug 1702001) for causing failures on test_insecure_reload.html. CLOSED TREE 2021-04-08 12:28:19 +03:00
lyavor 3322a7eb35 Bug 1702001 Https-only mode does not reload pages after clicking "Continue to HTTP Site", when url contains navigation r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D110395
2021-04-08 08:21:34 +00:00
Emilio Cobos Álvarez 4401eff8fe Bug 1703472 - For window.focus, popup abuse level should be checked on the caller. r=smaug,hsivonen
Just like how for window.open() it's checked on the opener, of course.

Note that when sending the focus request via IPC, we trust the check
done on the child (bug 1677899).

Do we have a good test to extend to cover this case?

Differential Revision: https://phabricator.services.mozilla.com/D111107
2021-04-07 16:03:11 +00:00
Olli Pettay 378cc0689d Bug 1702608, ensure the same docshell is used in nsDSURIContentListener, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110599
2021-04-07 10:24:58 +00:00
David Parks 7a4e918916 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-06 19:28:18 +00:00
David Parks 271e591cdf Bug 1682030 - Remove NPAPI blocklisting r=Gijs,jmathies,mixedpuppy
Removes the PluginProvider and NPAPI plugin blocklist handling as part of removing all NPAPI support.  This allows us to remove nsIPluginHost.

Differential Revision: https://phabricator.services.mozilla.com/D107148
2021-04-06 19:28:14 +00:00
Neil Deakin 4ca286a995 Bug 1701668, remove onBeforeLinkTraversal implementations and handle links in docshell, r=kmag,mixedpuppy,geckoview-reviewers,agi
This also fixes links in top or in-process subframes and out-of-process subframes in extensions sidebars and panels so that they open in new tabs.

Differential Revision: https://phabricator.services.mozilla.com/D110102
2021-04-06 18:52:46 +00:00
Neil Deakin 54284e502d Bug 1701668, remove shouldLoadURI and shouldLoadURIInThisProcess methods now that all implementers return true, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110101
2021-04-06 18:52:46 +00:00
Andrew McCreight ba77e5e136 Bug 1702791 - Fix typos in comments BrowsingContextGroup.h. DONTBUILD r=farre
Differential Revision: https://phabricator.services.mozilla.com/D110700
2021-04-06 14:39:51 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks ef8f5b1e09 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-05 23:48:42 +00:00
David Parks 0e34d4d48b Bug 1682030 - Remove NPAPI blocklisting r=Gijs,jmathies,mixedpuppy
Removes the PluginProvider and NPAPI plugin blocklist handling as part of removing all NPAPI support.  This allows us to remove nsIPluginHost.

Differential Revision: https://phabricator.services.mozilla.com/D107148
2021-04-05 23:48:38 +00:00
Daisuke Akatsuka 316a92df5e Bug 1693503: Do search if the format inputed is user@host but might be intented as keyword. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D106748
2021-04-02 10:05:37 +00:00
Henri Sivonen 9c0fdd5c35 Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-04-01 08:45:14 +00:00
Nika Layzell 79ad077a6a Bug 1699721 - Part 3: Add test for switching back into unloading process, r=kmag
This was somewhat convoluted to get to both reliably reproduce and not timeout
after the fixes were applied. The test can't run without Fission, as it
requires a process switch to occur on the navigation to/from
http://example.com.

Without part 2 of this patch stack, this test will crash after the process
switch.

Differential Revision: https://phabricator.services.mozilla.com/D110003
2021-03-31 16:51:59 +00:00
Nika Layzell 274d7e3edd Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 16:51:58 +00:00
Nika Layzell 6959ab57ac Bug 1699721 - Part 1: Fully remove LegacyCheckOnlyOwningProcess, r=kmag
This is necessary as in part 2 the InFlightProcessId value will no longer be
tracked, so any remaining code which depends on it needs to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D110001
2021-03-31 16:51:58 +00:00
Andreea Pavel 4674e1b5e2 Backed out changeset 27d3d97f875f (bug 1696908) build bustage at nsFocusManager.cpp on a CLOSED TREE 2021-03-31 19:32:11 +03:00
Andreea Pavel 35eeef915f Backed out 3 changesets (bug 1699721) for failing test_bug1699721.html on a CLOSED TREE
Backed out changeset ed3feb801017 (bug 1699721)
Backed out changeset d6f212c67002 (bug 1699721)
Backed out changeset ef06d9764cf1 (bug 1699721)
2021-03-31 19:27:34 +03:00
Nika Layzell f65b0188c7 Bug 1699721 - Part 3: Add test for switching back into unloading process, r=kmag
This was somewhat convoluted to get to both reliably reproduce and not timeout
after the fixes were applied. The test can't run without Fission, as it
requires a process switch to occur on the navigation to/from
http://example.com.

Without part 2 of this patch stack, this test will crash after the process
switch.

Differential Revision: https://phabricator.services.mozilla.com/D110003
2021-03-31 15:37:49 +00:00
Nika Layzell 45d7327477 Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 15:37:49 +00:00
Nika Layzell dc0e1921c5 Bug 1699721 - Part 1: Fully remove LegacyCheckOnlyOwningProcess, r=kmag
This is necessary as in part 2 the InFlightProcessId value will no longer be
tracked, so any remaining code which depends on it needs to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D110001
2021-03-31 15:37:48 +00:00
Henri Sivonen 64b6a0c73b Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-03-31 14:56:48 +00:00
Olli Pettay 1c8586cc51 Bug 1689683 - Ensure docshell/test/mochitest/test_bug590573.html works with SHIP-BFCache, r=annyG
Better to use requestAnimationFrame to ensure the scrolling actually has occurred after popstate.

Differential Revision: https://phabricator.services.mozilla.com/D109975
2021-03-31 13:17:21 +00:00
Emilio Cobos Álvarez 168b2347b3 Bug 1700871 - Only allow focus move for links / form submission iff actually handling user input. r=smaug
The other navigation that allows focus moves (window.open) already goes
through the popup blocker, so that one is fine.

I think given how weird yet conservative other browsers are, this should
be a good trade-off to avoid false positives.

Differential Revision: https://phabricator.services.mozilla.com/D110196
2021-03-31 01:51:46 +00:00
Cosmin Sabou 128f4975a7 Backed out changeset 8df311a9bec0 (bug 1689683) for causing Bug 1701959. 2021-03-30 18:45:19 +03:00
Olli Pettay 07ba2fd435 Bug 1689686 - Ensure docshell/test/navigation/test_bug1326251.html works with SHIP-BFCache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D109945
2021-03-30 09:27:04 +00:00
Olli Pettay 0c43e7ec41 Bug 1689663 - Don't try to run docshell/test/navigation/test_bug1364364.html with SHIP-BFCache, r=peterv
I think this particular test doesn't make much sense in the new implementation.

Differential Revision: https://phabricator.services.mozilla.com/D109961
2021-03-30 09:25:41 +00:00
Olli Pettay 8f15f68443 Bug 1689669 - Ensure docshell/test/mochitest/test_bug1121701.html works with SHIP-BFCache, r=peterv
Depends on D109146

Differential Revision: https://phabricator.services.mozilla.com/D109886
2021-03-30 09:24:45 +00:00
Olli Pettay 1e523ef169 Bug 1699534 - Ensure beforeunload is called when the next page is coming from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D109146
2021-03-30 09:24:45 +00:00
Olli Pettay 2fab9ccddd Bug 1689683 - Ensure docshell/test/mochitest/test_bug590573.html works with SHIP-BFCache, r=annyG
Depends on D109756

Differential Revision: https://phabricator.services.mozilla.com/D109975
2021-03-29 14:38:18 +00:00
Olli Pettay cc185f2b74 Bug 1689685 - Ensure docshell/test/navigation/test_scrollRestoration.html works with SHIP-BFCache, r=peterv
Similarly to the old session history implementation, scroll position needs to be stored in HandleSameDocumentNavigation.
The relevant old implementation is couple of lines above the new code in nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D109756
2021-03-29 14:38:18 +00:00
lyavor 0eda688c65 Bug 1694932 - Https-only mode reloads the page in certain cases when there should be just a fragment navigation r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D107999
2021-03-29 12:56:33 +00:00
Olli Pettay 39c56ee58a Bug 1689684 - Ensure docshell/test/browser/browser_bug1347823.js works with SHIP-BFCache, r=peterv
Depends on D109312

Differential Revision: https://phabricator.services.mozilla.com/D109313
2021-03-26 19:15:02 +00:00
Olli Pettay 7da30119f6 Bug 1689664 - Ensure docshell/test/navigation/test_performance_navigation.html works with SHIP-BFCache, r=peterv
This is similar pref enabling as what landed to couple of other tests already
https://searchfox.org/mozilla-central/search?q=%2F%2F+If+Fission+is+disabled%2C+the+pref+is+no-op.&path=

Differential Revision: https://phabricator.services.mozilla.com/D109312
2021-03-26 19:15:01 +00:00
Kashav Madan 5c37b3d6b9 Bug 1700719 - Discard-check all ancestors before restoring, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109722
2021-03-26 16:24:47 +00:00
Andreas Farre f722be009c Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-26 08:59:33 +00:00
Andreas Farre a9991cb1dc Bug 1572084 - Part 1: Add enhanced Browsing Context traversal. r=nika
Make it possible to skip sub-trees in traversals, and abort traversals
entirely.

Differential Revision: https://phabricator.services.mozilla.com/D107813
2021-03-26 08:59:33 +00:00
Kris Maglione 5db2bf4bdb Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-25 19:47:02 +00:00
Kris Maglione 301532bc94 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-25 19:47:01 +00:00
Kris Maglione 8eff81f606 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-25 19:47:00 +00:00
smolnar 40ea4a43d4 Backed out changeset 51fc422f096f (bug 1700719) for causing browser-chrome failures in CanonicalBrowsingContext. CLOSED TREE 2021-03-25 20:54:18 +02:00
Bogdan Tara b1afbfca15 Backed out 2 changesets (bug 1689684, bug 1689664) for assertion failure at nsSHistory.cpp on fission CLOSED TREE
Backed out changeset 506586ec7b20 (bug 1689684)
Backed out changeset f7c03240d0cc (bug 1689664)
2021-03-25 19:34:47 +02:00
Bogdan Tara 8f9d044d0f Backed out 3 changesets (bug 1572084) for WindowGlobalParent.cpp related failures CLOSED TREE
Backed out changeset d42a68132e7e (bug 1572084)
Backed out changeset 4d5a5ac074e6 (bug 1572084)
Backed out changeset 5aa59e106a42 (bug 1572084)
2021-03-25 18:56:02 +02:00
Olli Pettay 88fe366ee5 Bug 1689684 - Ensure docshell/test/browser/browser_bug1347823.js works with SHIP-BFCache, r=peterv
Depends on D109312

Differential Revision: https://phabricator.services.mozilla.com/D109313
2021-03-25 16:40:50 +00:00
Olli Pettay 7188660617 Bug 1689664 - Ensure docshell/test/navigation/test_performance_navigation.html works with SHIP-BFCache, r=peterv
This is similar pref enabling as what landed to couple of other tests already
https://searchfox.org/mozilla-central/search?q=%2F%2F+If+Fission+is+disabled%2C+the+pref+is+no-op.&path=

Differential Revision: https://phabricator.services.mozilla.com/D109312
2021-03-25 16:40:50 +00:00
Kashav Madan a69f8cc71b Bug 1700719 - Discard-check both the top-level and current context before restoring, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109722
2021-03-25 15:59:50 +00:00
Andreas Farre 728f061c16 Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-25 15:36:38 +00:00
Andreas Farre a0d3aba220 Bug 1572084 - Part 1: Add enhanced Browsing Context traversal. r=nika
Make it possible to skip sub-trees in traversals, and abort traversals
entirely.

Differential Revision: https://phabricator.services.mozilla.com/D107813
2021-03-25 15:36:37 +00:00
Simon Giesecke 4f0b94ee34 Bug 708901 - Migrate to nsTHashSet in docshell. r=smaug,geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D108591
2021-03-25 08:04:20 +00:00
Olli Pettay 67eda3a866 Bug 1697838, explictly evict bfcache when doing a frameloader swap r=peterv
This is in practice the behavior already, because swap is really a move and removing the old tab, and
when removing the other tab, the bfcached frameloaders are destroyed. But they stay still in the session history.
So this patch clears session history explicitly.

As long as we have message managers, we can't really support bfcache in this case, since we can't swap message managers,
there are no corresponding managers on the other side.
Message managers need to stay always in the original window, since the listeners are from there.

WindowActors do move with frameloader/browsingcontext, but that leads easily to memory leaks.
https://bugzilla.mozilla.org/show_bug.cgi?id=1697918 is about that and it has nothing to do with bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D108273
2021-03-24 18:57:14 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke 6ba9da592e Bug 708901 - Migrate to nsTHashSet in docshell. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108591
2021-03-24 16:58:57 +00:00
ankur 32bf182577 Bug 1695253 - Replaced DTD/xhtml1-strict.dtd which lead to broken network loads. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D109379
2021-03-24 16:52:06 +00:00
Nika Layzell fa0ba706bb Bug 1699626 - Downgrade mWindowGlobalChild to a weak pointer, r=smaug
Theoretically this change shouldn't be necessary, however frequent
intermittents suggest that there are still cases where holding a strong
reference here can lead to memory leaks.

Differential Revision: https://phabricator.services.mozilla.com/D109445
2021-03-24 14:11:49 +00:00
Csoregi Natalia 024e0b2323 Backed out 10 changesets (bug 1581859) for causing hazard failures. CLOSED TREE
Backed out changeset 93fe6801a5e2 (bug 1581859)
Backed out changeset 0a33cb185fb3 (bug 1581859)
Backed out changeset 9ceaad6dab5b (bug 1581859)
Backed out changeset ee611f0839ca (bug 1581859)
Backed out changeset 4199963fe477 (bug 1581859)
Backed out changeset b4c5ace21b9e (bug 1581859)
Backed out changeset 6003469dc449 (bug 1581859)
Backed out changeset 826c62b783c0 (bug 1581859)
Backed out changeset e1d7851295fd (bug 1581859)
Backed out changeset 9796577af27a (bug 1581859)
2021-03-24 08:48:00 +02:00
Kris Maglione 6e2223e151 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-23 23:57:11 +00:00
Kris Maglione 94b544ff0f Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-23 23:57:10 +00:00
Kris Maglione 18ffa4a411 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-23 23:57:10 +00:00
Anny Gakhokidze eb737dfce2 Bug 1698104 - Fix session restore for about:reader, r=nika,kashav
Implement an observer to wait for correct window events in order to restore tab
content.  Non-SHIP code restores about:reader scroll position after receiving
"AboutReaderContentReady" event, so to achieve the same thing with session
history in parent enabled, we can wait for "AboutReader:Ready" event.

Differential Revision: https://phabricator.services.mozilla.com/D108712
2021-03-23 18:01:23 +00:00
Kashav Madan 6d6c056ad0 Bug 1698878 - Verify formdata URL in the parent, r=nika
This should happen before any data is sent down to the content process.

Differential Revision: https://phabricator.services.mozilla.com/D108830
2021-03-23 18:01:22 +00:00
Kashav Madan 5dc7379641 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-23 18:01:21 +00:00
Kashav Madan c91bbe8c6d Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-23 18:01:20 +00:00
Henri Sivonen b98488aa92 Bug 673087 - Honor encoding declared via XML declaration in text/html. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D107806
2021-03-23 09:52:04 +00:00
Cosmin Sabou 7eba371387 Backed out 10 changesets (bug 1581859) for causing hazard failures on ExtensionsParent.cpp.
Backed out changeset 6020ec7d7f32 (bug 1581859)
Backed out changeset 07901e457839 (bug 1581859)
Backed out changeset e23389fc98b5 (bug 1581859)
Backed out changeset 4287eebc2c77 (bug 1581859)
Backed out changeset eeff6f501cfc (bug 1581859)
Backed out changeset 22db36f7d16d (bug 1581859)
Backed out changeset 16831d45d0ed (bug 1581859)
Backed out changeset 816643de7694 (bug 1581859)
Backed out changeset 6fd5aa7895e3 (bug 1581859)
Backed out changeset 2b68d2eee18e (bug 1581859)
2021-03-23 05:48:27 +02:00
Kris Maglione 2c7c5a81f0 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-22 20:12:16 +00:00
Kris Maglione 1095dd88b9 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-22 20:12:15 +00:00
Kris Maglione 799be479c7 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-22 20:12:14 +00:00
Nika Layzell 79390b28ce Bug 1699003 - Simplify initial about:blank detection in SetCurrentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109110
2021-03-22 18:06:49 +00:00
Olli Pettay dc39236b97 Bug 1699484 - Support Timer based bfcache eviction, r=peterv
The patch makes HistoryTracker rely on SHEntrySharedParentState instead of nsSHEntryShared.
nsSHEntryShared already extends SHEntrySharedParentState.

The test was modified a tiny bit to make it easier to see the results. The test does pass
with SHIP+BFCache.

Depends on D108851

Differential Revision: https://phabricator.services.mozilla.com/D108984
2021-03-21 21:46:26 +00:00
Olli Pettay b535d5b970 Bug 1698663 - Make Document::RemoveFromBFCacheSync() work with SHIP+BFCache, r=peterv
Depends on D108487

Differential Revision: https://phabricator.services.mozilla.com/D108851
2021-03-21 21:46:25 +00:00
Olli Pettay dd5347ded5 Bug 1698549 - Call FireDelayedDOMEvents when restoring a bfcached page, r=peterv
The test isn't testing anything mApplicationCache related, since appcache is basically
no-op code.

Depends on D107930

Differential Revision: https://phabricator.services.mozilla.com/D108487
2021-03-21 21:46:25 +00:00
Olli Pettay dc0a4c5e6c Bug 1697564 - Suspend/resume refresh URI list when bfcache lives in the parent process, r=peterv
The old setup is a tad fragile since it relies on Stop to happen at a particular moment.

The name RefreshURIToQueue is just trying to be consistent with RefreshURIFromQueue

Differential Revision: https://phabricator.services.mozilla.com/D107930
2021-03-21 21:46:25 +00:00
Olli Pettay 562c3c69fc Bug 1689681 - Ensure docshell/test/navigation/browser_test_bfcache_eviction.js works with SHIP-BFCache r=nika
Depends on D109217

Differential Revision: https://phabricator.services.mozilla.com/D109218
2021-03-21 19:40:50 +00:00
Olli Pettay 9ab5459e29 Bug 1699941 - Ensure docshell/test/navigation/test_bug1379762.html works with SHIP-BFCache r=nika
Depends on D109216

Differential Revision: https://phabricator.services.mozilla.com/D109217
2021-03-21 19:40:50 +00:00
Olli Pettay b4643136c9 Bug 1689672 - Ensure docshell/test/mochitest/test_bug660404.html works with SHIP-BFCache r=nika
Depends on D109212

Differential Revision: https://phabricator.services.mozilla.com/D109213
2021-03-21 19:40:48 +00:00
Olli Pettay 1f324316d5 Bug 1687738 - Re-enable docshell/test/mochitest/test_bfcache_plus_hash.html for Fission r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109212
2021-03-20 23:57:39 +00:00
Mark Banner e8d532d179 Bug 1699747 - Clean up old references to nsIDocShellLoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109095
2021-03-19 18:38:32 +00:00
Nika Layzell d14469fe31 Bug 1675820 - Part 7: Fix marionette BrowsingContext replace detection logic, r=whimboo,marionette-reviewers,farre
Differential Revision: https://phabricator.services.mozilla.com/D108866
2021-03-18 19:24:51 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Nika Layzell 3365f956a4 Bug 1675820 - Part 5: Keep BCGs alive while waiting for WindowContext discards to be acked, r=kmag
This should further reduce the chance that a BrowsingContextGroup is mentioned
in a message which has already ben destroyed by a remote process.

Differential Revision: https://phabricator.services.mozilla.com/D108121
2021-03-18 19:24:50 +00:00
Nika Layzell 0f7f0e91a0 Bug 1675820 - Part 4: Track WindowGlobalChild in WindowContext, r=kmag
This allows for the WindowGlobalChild getter in WindowContext to be acquired
more efficiently without performing hashtable lookups, and should generally
simplify things.

The patch also removes the unnecessary XRE_IsContentProcess assertions, and
removes the global hashtable for tracking WindowGlobalChild instances which is
no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D108120
2021-03-18 19:24:50 +00:00
Nika Layzell 51907e2d1f Bug 1675820 - Part 1: Upgrade destroyed asserts in BrowsingContextGroup, r=kmag
The issues with BrowsingContextGroup identity may be related to using a
destroyed BrowsingContextGroup in some situations when we shouldn't be. By
upgrading the intensity of these assertions, we should be able to catch the
issues more readily.

Differential Revision: https://phabricator.services.mozilla.com/D108117
2021-03-18 19:24:48 +00:00
Eden Chuang 888442c1d8 Bug 1691153 - mochitest for testing Blob URL data is transmitted with correct principal type. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D106919
2021-03-18 18:04:43 +00:00
Nika Layzell 8064f7baf7 Bug 1697927 - Part 2: Remove dead CreatedDynamically field, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108861
2021-03-18 16:15:17 +00:00
smolnar 200bfc652c Backed out 4 changesets (bug 1597499) for causing Fission crashes (bug 1699349). a=backout
Backed out changeset 0df7b8660446 (bug 1597499)
Backed out changeset d015ba9097c5 (bug 1597499)
Backed out changeset e84054ccadb0 (bug 1597499)
Backed out changeset 12762a25c4fa (bug 1597499)
2021-03-18 11:29:08 +02:00
Narcis Beleuzu ffb77b2d9a Backed out 9 changesets (bug 1581859) for bustages jsapi.h . CLOSED TREE
Backed out changeset 2a3a77ae1eae (bug 1581859)
Backed out changeset 181c3f29f222 (bug 1581859)
Backed out changeset f7c39feb502e (bug 1581859)
Backed out changeset 9c7d0015c616 (bug 1581859)
Backed out changeset d2b8ee78745d (bug 1581859)
Backed out changeset 92359266d420 (bug 1581859)
Backed out changeset 98ba6b96c900 (bug 1581859)
Backed out changeset 0eb043b5c904 (bug 1581859)
Backed out changeset 55a4c2fc561d (bug 1581859)
2021-03-18 08:26:57 +02:00
Kris Maglione 82fc76ce55 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-18 05:51:06 +00:00
Kris Maglione 6f0d80b656 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-18 05:51:06 +00:00
Kris Maglione 6410970b1e Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-18 05:51:05 +00:00
Kashav Madan 83da101af6 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-17 16:43:05 +00:00
Kashav Madan 1f5d10dfba Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-17 16:43:04 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Olli Pettay 38d659dd74 Bug 1699135 - Remove BrowsingContext::SessionHistoryChanged(), r=smacleod
Differential Revision: https://phabricator.services.mozilla.com/D108785
2021-03-17 14:17:31 +00:00
Niklas Gögge ed5eaf624b Bug 1647128 - Detect webby navs caused by meta refreshes in IsUserTriggeredForSecFetchSite check r=necko-reviewers,ckerschb,valentin
Differential Revision: https://phabricator.services.mozilla.com/D108035
2021-03-17 11:42:55 +00:00
Kris Maglione c1ec5fce61 Bug 1697271: Change most LegacyCheckOnlyOwningProcessCanSet users to revert on failure. r=nika
Note that this does not change `AllowPlugins` (because it is going away soon)
or `HasMainMediaController` (because don't know the code well enough to be
confident that reverting it would be safe), but does fix all other callers.

Differential Revision: https://phabricator.services.mozilla.com/D107704
2021-03-15 20:34:30 +00:00
Sylvestre Ledru 81b14e2ac7 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D108334
2021-03-15 08:45:29 +00:00
Butkovits Atila 8165271661 Bug 1688712 - disable test_bug1300461.html for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D107372
2021-03-13 22:47:35 +00:00
Daniel Holbert 801cf30e07 Bug 1662838 part 2: Remove nsIContentViewer's unused pausePainting() and resumePainting() APIs. r=tnikkel
These APIs are entirely unused (aside from one usage in a test, which part 1 in
this patch series removed), so this patch shouldn't impact behavior at all.

Historical note: we briefly removed these APIs once before, in this commit:
https://hg.mozilla.org/mozilla-central/rev/c216ff19d690
...but we brought them back because we had a motivating use case at the time.
We don't have any such motivating use cases any more, though.  So, this patch
here is essentially a modernized version of that older commit.

Differential Revision: https://phabricator.services.mozilla.com/D108148
2021-03-13 06:11:34 +00:00
Alexandru Michis c3d50b35db Backed out changeset e072b56f8518 (bug 1696908) for causing bc failures in browser_bug1303838.js
CLOSED TREE
2021-03-12 12:00:52 +02:00
Henri Sivonen 58b09235a5 Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-03-12 07:45:36 +00:00
Paul Bone 55cd14a12d Bug 1691135 - pt 2. Don't cancel a reload if the listener threw an exception r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107803
2021-03-12 01:16:15 +00:00
Paul Bone 06cff45ef1 Bug 1691135 - pt 1. SHistoryListeners track browser ID as it is constant r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106841
2021-03-12 01:16:15 +00:00
Olli Pettay 4d3e3067dc Bug 1697171 - Clear various states referring to the old BrowserParent when it enters bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107644
2021-03-11 19:36:20 +00:00
Olli Pettay 72e7445ce0 Bug 1694727, remove the testing only code for history.length handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D108034
2021-03-11 19:31:30 +00:00
Anny Gakhokidze aa3895af8c Bug 1597427 - Check for recursive subframe loads in the parent process, r=kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107311
2021-03-11 00:39:37 +00:00
Agi Sferro 111343732d Bug 1694481 - Remove unused code from exthandler/android. r=droeh,esawin
Differential Revision: https://phabricator.services.mozilla.com/D106182
2021-03-10 22:43:08 +00:00
Emilio Cobos Álvarez c1853bc54e Bug 1697580 - Remove nsIDocShell.isOffScreenBrowser. r=smacleod
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D107888
2021-03-10 19:29:11 +00:00
Olli Pettay 47aebd78b8 Bug 1697266 - Update performance.navigation.type when restoring page from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107709
2021-03-10 14:51:49 +00:00
Mark Banner c37e909d81 Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 14:21:12 +00:00
Bogdan Tara 621d71189b Backed out 2 changesets (bug 369739, bug 1696027) for browser_searchChangedEngine.js and test_webextensions_upgrade.js failures CLOSED TREE
Backed out changeset 2705f924b635 (bug 369739)
Backed out changeset 6e5ccf3eeaa6 (bug 1696027)
2021-03-10 15:36:28 +02:00
Mark Banner 9df3e3dc07 Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 12:34:43 +00:00
Jonathan Kew ceb44d34d6 Bug 1664730 - Disable async font fallback when running mochitests, to avoid unpredictable extra reflows that can disrupt event-/timing-sensitive tests. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D107284
2021-03-10 12:26:52 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Bogdan Tara ebf7802e4a Backed out 2 changesets (bug 369739, bug 1696027) for test_TelemetryEnvironment.js xpcshell failures CLOSED TREE
Backed out changeset 9ea26aff5a9b (bug 369739)
Backed out changeset 395e7278e415 (bug 1696027)
2021-03-10 10:27:02 +02:00
Mark Banner 62144490ad Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 07:40:22 +00:00
Henri Sivonen 4a7c55c8ad Bug 1691892 - Reject stale active browsing context setting attempts by action id in content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107192
2021-03-10 05:36:48 +00:00
Olli Pettay a2d036fda6 Bug 1696923 - [SHIP] Update SaveLayoutStateFlag after page load similarly to in-process session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D107479
2021-03-09 18:16:58 +00:00
Nika Layzell 64fd29f182 Bug 1663757 - Part 4: Track current remote URI on CanonicalBrowsingContext, r=annyG,farre
This URI is intended to reflect the currentURI field on the content nsIDocShell,
and is the value used for getters like `window.location.href`. For most
documents, this generally matches the Document URI on WindowGlobalParent, it
does not match in specific cases such as error pages or when performing a
session restore.

The field is kept up-to-date by listening to `OnLocationChange` notifications
from the content process, and is ignored when the BrowsingContext is loaded in
the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D105559
2021-03-09 15:29:41 +00:00
Nika Layzell 3ff4296a89 Bug 1209947 - Part 2: Fire location change events for all subframe navigations, r=smaug,Gijs
The check in this function was added in bug 82236 to avoid an issue in the
mozilla suite where the UI would update to a subframe's URI. This came up
previously in bug 1206879 when we observed we weren't sending OnLocationChange
events when we were expecting, which was causing issues for pushState location
changes. A workaround was added in that bug to avoid the issue for the specific
case of pushState.

This patch removes the redundant check, and reverts the workaround added in that
bug. Unfortunately, we aren't able to fully remove nsISHEntry::GetIsSubframe, as
it is now used by Browser{Parent,Child}::CanCancelContentJS.

Differential Revision: https://phabricator.services.mozilla.com/D105555
2021-03-09 15:29:39 +00:00
Olli Pettay b90bd58381 Bug 1696266, test reloading a page which might otherwise enter bfcache, r=peterv
Depends on D107300

Differential Revision: https://phabricator.services.mozilla.com/D107536
2021-03-09 13:42:43 +00:00
Olli Pettay a46567f045 Bug 1696266, limit the load types which may cause the page to enter bfcache, r=peterv
The change to dom/base/nsFrameLoaderOwner.cpp is to log about the issues but still ensure we don't crash.

I'd prefer to not put error loads to bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D107300
2021-03-09 13:42:43 +00:00
Simon Giesecke bc9766c354 Bug 1634281 - Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with RefPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105963
2021-03-09 11:39:36 +00:00
Mark Banner 5319c0f444 Bug 1696873 - Apply automatic fixes to enable more ESLint rules on remaining docshell xhtml files. r=smaug
This automatically fixes issues for these rules: dot-notation, object-shorthand and mozilla/no-useless-parameters
The other enabled rules had no issues associated with them, so are enabled without code changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D107424
2021-03-08 13:41:52 +00:00
Mark Banner acb019156a Bug 1696873 - Enable ESLint rule no-undef on remaining docshell xhtml files. r=smaug
Depends on D100450

Differential Revision: https://phabricator.services.mozilla.com/D107423
2021-03-08 13:41:52 +00:00
Sonia Singla c58860a007 Bug 1656293 - Enable ESLint no-unused-vars rules on docshell/test/chrome/*.xhtml files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100450
2021-03-08 09:20:53 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Jan-Erik Rediger 4a219f294b Bug 1695197 - Remove MOZ_GLEAN constant, introduce MOZ_GLEAN_ANDROID. r=chutten,emilio
We enable compilation of FOG/Glean on _all_ platforms.
We disable Glean initialization and metric recording on Android (GeckoView) by respecting MOZ_GLEAN_ANDROID.
This way GeckoView just works, consumers don't need to think about it (except in tests, these need to be disabled for Android builds).

Stubbing out the metric implementations will happen in the commits after
this one.

Differential Revision: https://phabricator.services.mozilla.com/D106766
2021-03-04 11:15:12 +00:00
Emilio Cobos Álvarez 7508fffd89 Bug 1694927 - Don't allow location APIs to steal focus. r=smaug,hsivonen
The check was a bit too general it seems. Explicitly allow moving focus
for link clicks and window.open(), which are the things we have tests
for and care about moving focus.

Differential Revision: https://phabricator.services.mozilla.com/D107039
2021-03-03 15:44:59 +00:00
Olli Pettay 85323d2cfb Bug 1692208 - Remove unused nsSHistory::mIsRemote, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D104824
2021-03-03 12:28:50 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Olli Pettay 3790a609ef Bug 1689601, sync fields when loading a page from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106737
2021-03-02 12:13:22 +00:00
Olli Pettay 9a5e1b83eb Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 12:13:21 +00:00
Olli Pettay 0d29b12841 Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 12:13:21 +00:00
Olli Pettay bba6b348ae Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 12:13:20 +00:00
Olli Pettay 0d8dbfb17e Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 12:13:20 +00:00
Olli Pettay 911d46a8b6 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 12:13:20 +00:00
Olli Pettay 2835639129 Bug 1689601, make it possible to call Document::CanSavePresentation non-recursively, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105236
2021-03-02 12:13:19 +00:00
Olli Pettay aa8606dfbc Bug 1689601, store nsFrameLoader in SessionHistoryEntry/SHEntrySharedParentState, r=peterv
EvictOutOfRangeContentViewers call in SetFrameLoader doesn't do anything in this patch, but will
work with some followups.

Differential Revision: https://phabricator.services.mozilla.com/D105235
2021-03-02 12:13:18 +00:00
Olli Pettay b93e317cab Bug 1689601, add assertions to ensure SessionHistoryEntry objects are created only when session history in parent is enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105234
2021-03-02 12:13:18 +00:00
Olli Pettay 3df3621351 Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 12:13:16 +00:00
Olli Pettay aead729570 Bug 1689601, set active entry only when session history runs in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105228
2021-03-02 12:13:15 +00:00
Mihai Alexandru Michis 87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Olli Pettay 8c1f93e71f Bug 1689601, sync fields when loading a page from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D106737
2021-03-02 09:44:14 +00:00
Olli Pettay f09a7f25d5 Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 09:44:14 +00:00
Olli Pettay 42a29f41de Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 09:44:13 +00:00
Olli Pettay 9a08f751a4 Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 09:44:13 +00:00
Olli Pettay 07a607c53d Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 09:44:13 +00:00
Olli Pettay 101955fa30 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 09:44:12 +00:00
Olli Pettay 1eac846424 Bug 1689601, make it possible to call Document::CanSavePresentation non-recursively, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105236
2021-03-02 09:44:11 +00:00
Olli Pettay 67e5e0bf9b Bug 1689601, store nsFrameLoader in SessionHistoryEntry/SHEntrySharedParentState, r=peterv
EvictOutOfRangeContentViewers call in SetFrameLoader doesn't do anything in this patch, but will
work with some followups.

Differential Revision: https://phabricator.services.mozilla.com/D105235
2021-03-02 09:44:11 +00:00
Olli Pettay 09b5456656 Bug 1689601, add assertions to ensure SessionHistoryEntry objects are created only when session history in parent is enabled, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105234
2021-03-02 09:44:11 +00:00
Olli Pettay 0b5b9fc66a Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 09:44:09 +00:00
Olli Pettay 1e9221de68 Bug 1689601, set active entry only when session history runs in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105228
2021-03-02 09:44:08 +00:00
Simon Giesecke b399a8194c Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00