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

7766 Коммитов

Автор SHA1 Сообщение Дата
Andreea Pavel e4fa3f1291 Bug 1668809 - disable test_bug385434.html and browser_new_tab_in_privilegedabout_process_pref.js on fission r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92355
2020-10-07 08:31:20 +00:00
Anny G 98afd9b6d4 Bug 1669555 - Make docshell/test/mochitest/historyframes.html wait for popstate events when navigating, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92664
2020-10-06 19:54:16 +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
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
Olli Pettay df07bfbef9 Bug 1669287 - Ensure AddPendingHistoryChange is called even when doing same document navigations in iframes, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92464
2020-10-05 17:17:56 +00:00
Andreas Farre 48c2067b44 Bug 1669183 - Make sure length delta is correctly computed. r=smaug
When adding a new entry while handling popstate, this would go
throught the paremeterized version of AddPendingHistoryChange, which
doesn't re-compute length which would result in an error in
history.length.

Differential Revision: https://phabricator.services.mozilla.com/D92393
2020-10-05 11:04:10 +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
Cameron McCormack 4352fb7b0d Bug 1662839 - Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90953
2020-10-04 03:25:16 +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
Michael Kaply 01ac66c721 Bug 1450309 - Allow nSIContentPolicy to reject based on enterprise policy. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91487
2020-10-03 00:02:19 +00:00
Sebastian Hengst ab7b1dae03 Bug 1668809 - Disable more intermittently failing tests. CLOSED TREE 2020-10-02 23:38:30 +02:00
Olli Pettay 34f1de3fc9 Bug 1668809 - Disable some intermittently failing tests, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92231
2020-10-02 13:57:05 +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
Olli Pettay 5cb8d35726 Bug 1668215 - Bail out loading if the SessionHistoryEntry for LoadingSessionHistoryInfo isn't available anymore, r=peterv
I haven't managed to reproduce the crash

Differential Revision: https://phabricator.services.mozilla.com/D92150
2020-10-02 11:53:18 +00:00
Emilio Cobos Álvarez 584d9d8e68 Bug 1668156 - Fix some IntersectionObserver edge cases, and enable the assertion for good. r=hiro
This patch fixes two issues, described below:

First, the GetTopLevelDocument function was looking at the browsing
context tree. It should look at the window context tree, as looking at
the browsing context tree means that if you're in a discarded or
about-to-get-discarded document, you can end up with a document from a
different tree. Computing intersections between those of course makes no
sense and triggers the assertion we're enabling.

Second, this patch fixes an issue when you have fission enabled, and a
setup such as:

  A1 -> B1 -> A2

If you try to use IntersectionObserver from A2 with the implicit root,
we'd end up with:

  * rootRect: A1's root scrollport rect (this is fine, because it's only
              used to compute the root margin and bounds and so on, not
              to compute geometry).

  * rootFrame: A1's root scroll frame (this is _not_ fine, see below).

Then, we'd try to map rects from A2's target to A1's viewport, and we
can't really do that sensibly with the existing nsLayoutUtils functions,
because we're not accounting for all the OOP iframe transforms that may
be going on. This also triggers the assertion that this patch enables in
same-origin-grand-child-iframe.sub.html.

To fix it, for the A2 case, use the same code that we have for other OOP
iframes. The test tweaks fails with fission enabled without the patch
(because we don't account for the OOP iframe clip).

Differential Revision: https://phabricator.services.mozilla.com/D92089
2020-10-01 22:41:55 +00:00
Randell Jesup 3245883289 Bug 1668126: Correct ordering of LocationChange and history index/length commit for SHIP r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92143
2020-10-01 21:59:27 +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
Olli Pettay 219717c7ce Bug 1668026 - Update child process index and length when modifying those in parent process, r=peterv
The patch is utilizing SHistoryChangeNotifier which was added for testing.
CallerWillNotifyHistoryIndexAndLengthChanges is needed to avoid extra index/length updates so that
the child side doesn't get update but have still pending updates in it.

Differential Revision: https://phabricator.services.mozilla.com/D91756
2020-10-01 11:13:29 +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
Olli Pettay 8a508eaa66 Bug 1668357 - Disable tests which fail when fission and session-history-in-parent are enabled, r=peterv,marionette-reviewers,whimboo
In many cases with wpt, most of the tests in the file pass, but it is rather time consuming to annotate
.ini files case by case.

Differential Revision: https://phabricator.services.mozilla.com/D91977
2020-10-01 10:23:47 +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
Cosmin Sabou 45aaeb9042 Backed out 2 changesets (bug 1450309) for wpt failures on reporting-navigation.https.html. CLOSED TREE
Backed out changeset 7fae6ea289bd (bug 1450309)
Backed out changeset 14c35856cea4 (bug 1450309)
2020-10-01 08:50:41 +03: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
Narcis Beleuzu b493dfab2c Backed out changeset 244998c18b1b (bug 1668126) for mochitest failures on test_ext_webnavigation.html . CLOSED TREE 2020-10-01 03:16:28 +03: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
Kris Maglione f3f0b25ab6 Bug 1667491: Fix null pointer deref. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91834
2020-09-30 19:18:19 +00:00
Randell Jesup e9f37dfece Bug 1668126: Correct ordering of LocationChange and history index/length commit for SHIP r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91848
2020-09-30 17:52:59 +00:00
Michael Kaply 81bb64a228 Bug 1450309 - Allow nSIContentPolicy to reject based on enterprise policy. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91487
2020-09-30 18:39:40 +00:00
Randell Jesup d834710c9f Bug 1668129: nullcheck shistory in ReplaceActiveSessionHistoryEntry() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91849
2020-09-30 13:48:10 +00:00
Razvan Maries 5c478dca3c Backed out changeset 736e01530c6d (bug 1667491) for perma failures on 1667491.html. CLOSED TREE 2020-09-30 06:08:24 +03:00
Kris Maglione f51ed03f42 Bug 1667491: Fix null pointer deref. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91834
2020-09-29 20:31:05 +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
Peter Van der Beken 388375dd76 Bug 1659102 - Remove aLoadType argument from nsDocShell::OnNewURI. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91590
2020-09-29 12:03:52 +00:00
Olli Pettay 518fc9cb15 Bug 1667035 - Crash in [@ mozilla::dom::CanonicalBrowsingContext::RemoveDynEntriesFromActiveSessionHistoryEntry], r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D91632
2020-09-29 08:28:09 +00:00
Olli Pettay 9b05d87469 Bug 1667761 - [BFCache] disable some subtests of test_sessionhistory.html, r=peterv
Depends on D91462

Differential Revision: https://phabricator.services.mozilla.com/D91573
2020-09-28 13:12:44 +00:00
Olli Pettay 7cfd942db2 Bug 1667389 - [BFCache] disable test_bug590573.html on Fission, r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D91431
2020-09-28 14:03:31 +00:00
Randell Jesup b1e84fff6c Bug 1621643: Ensure replaceState updates all listeners about the modified state r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91433
2020-09-28 07:34:03 +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
Andreas Farre 06bea3d5db Bug 1667027 - Fix more tests that uses legacySHistory. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91277
2020-09-28 12:31:58 +00:00
Andreas Farre 365a6ff527 Bug 1667393 - Also send version number when serializing SessionHistoryInfo. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91434
2020-09-28 10:55:27 +00:00
Emilio Cobos Álvarez bed4af1f24 Bug 1666827 - Make nsDocShell::mIsPrintPreview a flag in the top browsing context. r=smaug
This should make it work on fission, plus is simpler than the
alternative of traversing the whole docshell tree and then undo it.

It also is going to make easier the actual fix for this bug.

Differential Revision: https://phabricator.services.mozilla.com/D91438
2020-09-27 12:07:19 +00:00
Emilio Cobos Álvarez 2c3d952fc7 Bug 1667342 - Make the "deferred window close" keep making sense after bug 1636728. r=smaug
This was only being checked on OnDonePrinting() which isn't called in
the original docshell. Move it to the window because we don't need to
care about document viewers getting closed during print operations,
they're top level browsers that don't run script.

Differential Revision: https://phabricator.services.mozilla.com/D91416
2020-09-25 13:39:01 +00:00
Anny G b6286bd455 Bug 1662671 - Remove css for adding an unused resize property for Windows, r=NeilDeakin,remote-protocol-reviewers,maja_zf
Before Quantum, we needed resizer icon on Windows, because when the
add-on statusbar was hidden, we could not resize the window. This is not
needed anymore and is dead code. Consequentially, this also helps reduce
unused images loaded at startup time.

Differential Revision: https://phabricator.services.mozilla.com/D91196
2020-09-25 00:10:23 +00:00
Peter Van der Beken b14a77101d Bug 1666881 - Make fission.sessionHistoryInParent require a restart when switching. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91260
2020-09-25 09:03:58 +00:00
alwu 37f127c8f3 Bug 1652108 - part2 : modify `page_had_media_count` to `in_page_count` r=nika,bryce
We would like to remove `page_had_media_count` and use a new probe `in_page_count` to record the total number of top level content documents using media.

Therefore, we would rename WindowContext's `DocTreeHadAudibleMedia` to `DocTreeHadMedia` in order to support the new usage.

In the future, if we want to know something like "the percentage of media element is being used for MSE/EME?", then this scalar can be the base and used to calculate the answser.

Differential Revision: https://phabricator.services.mozilla.com/D83225
2020-09-24 21:41:10 +00:00
Peter Van der Beken 531daa445d Bug 1667006 - document.open should set the url of the session history entry to the entry document's. r=smaug
document.open replaces the session history entry with a new one, the url of
which needs to point to the entry document. nsDocShell::UpdateActiveEntry wasn't
resetting the url and the originalURL in the replace case. This patch always
creates a new SessionHistoryInfo so we share more code between replace and
non-replace, to avoid missing some fields.

Differential Revision: https://phabricator.services.mozilla.com/D91273
2020-09-24 20:30:11 +00:00
Nika Layzell c0868a6edb Bug 1656753 - Track CrossGroupOpener on CanonicalBrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90890
2020-09-22 16:28:37 +00:00
Andreas Farre c0cda42b8a Bug 1666783 - Remove nsIDocShell::GetInterface(nsISHistory). r=smaug
Also assert that it's never used.

Differential Revision: https://phabricator.services.mozilla.com/D91142
2020-09-24 13:28:41 +00:00
Mihai Alexandru Michis 8b9238686c Backed out changeset 88337b6e4e3e (bug 1666881) for causing failures regarding the fission.autostart pref.
CLOSED TREE
2020-09-24 15:41:33 +03:00
Peter Van der Beken 976899aa65 Bug 1666881 - docshell/test/mochitest/test_history_length_during_pageload.html. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91264
2020-09-24 11:36:17 +00:00
Peter Van der Beken 55fdbb4384 Bug 1666881 - Make fission.sessionHistoryInParent require a restart when switching. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91260
2020-09-24 11:14:51 +00:00
Bogdan Tara d88ac68590 Backed out changeset 1bfa83880712 (bug 1662839) for browser_disable_author_style_oop.js failures CLOSED TREE 2020-09-24 05:55:25 +03:00
Cameron McCormack fc16d8bc27 Bug 1662839 - Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90953
2020-09-24 01:24:57 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Olli Pettay bdb2a86bbf Bug 1666515 - Disable browser_backforward_userinteraction.js for fission, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D91016
2020-09-23 13:51:02 +00:00
Olli Pettay c6638292a5 Bug 1666602 - [BFCache] Disable test_performance_navigation.html because it uses bfcache, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D91051
2020-09-23 13:51:14 +00:00
Kashav Madan 042b6e115d Bug 1666485 - Make BrowsingContext::CreatedDynamically non-synced, r=nika,kmag
Differential Revision: https://phabricator.services.mozilla.com/D89223
2020-09-23 13:43:38 +00:00
Butkovits Atila 2314b9b687 Backed out changeset a81b4130ac14 (bug 1666485) for causing bustages on BrowsingContext. CLOSED TREE 2020-09-23 16:18:53 +03:00
Christoph Kerschbaumer c9b352a0f3 Bug 1666751: Use simple and never failing LoadInfo() getter because all channels should have a loadinfo r=freddyb,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D91119
2020-09-23 12:49:40 +00:00
Kashav Madan c95234bd08 Bug 1666485 - Make BrowsingContext::CreatedDynamically non-synced, r=nika,kmag
Differential Revision: https://phabricator.services.mozilla.com/D89223
2020-09-23 12:45:38 +00:00
Peter Van der Beken 73f094860a Bug 1666745 - Fix nsDocShell::GetCurrentScrollRestorationIsManual with session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91113
2020-09-23 12:12:51 +00:00
Olli Pettay caf80ded58 Bug 1666596 - Ensure location.reload(true) removes entries for iframes, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91050
2020-09-23 10:04:57 +00:00
Randell Jesup 594f5b5808 Bug 1665710: don't update session history for about:blank transient pages r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90589
2020-09-22 16:54:56 +00:00
Kris Maglione 6f26095043 Bug 1646573: Part 1 - Fix GetInProcessParent usage in WindowShouldMatchActiveTab. r=zombie,nika
Differential Revision: https://phabricator.services.mozilla.com/D90334
2020-09-22 17:41:34 +00:00
Olli Pettay e56a7a73a7 Bug 1666477, implement SessionHistoryEntry::AdoptBFCacheEntry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91014
2020-09-22 17:24:55 +00:00
Olli Pettay b6a8ca7795 Bug 1666465 - Pass the correct value as the 'persist' parameter in CanonicalBrowsingContext::SessionHistoryCommit, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D90995
2020-09-22 16:27:14 +00:00
Razvan Maries b98ab6da2c Backed out changeset 1de39d201585 (bug 1665709) for build bustages on SessionHistoryEntry.cpp. CLOSED TREE 2020-09-22 16:56:14 +03:00
Randell Jesup 1144faec40 Bug 1665709: don't update session history for about:blank transient pages r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90589
2020-09-22 13:10:11 +00:00
Olli Pettay 4af1240826 Bug 1666449 - Disable some bfcache tests on Fission, part 2, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90991
2020-09-22 11:54:40 +00:00
Peter Van der Beken d78733695d Bug 1666326 - Fix docshell/test/navigation/test_bug1375833.html for session history in the parent. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90910
2020-09-22 07:47:08 +00:00
Peter Van der Beken f1fd281cee Bug 1666326 - Remove nsDocShell::mHistoryID and always use the BrowsingContext's HistoryID synced field. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90909
2020-09-22 09:37:08 +00:00
Emilio Cobos Álvarez a4e300194a Bug 1557645 - Clone OOP iframes in the right process. r=nika
This works, though probably we want to do some follow-up tweaks, like
the adding of the onload blocker and so on, so that we can avoid the
UpdateDimensions hack.

We may also want a PrintObject in the nsPrintJob tree, perhaps...

Differential Revision: https://phabricator.services.mozilla.com/D90310
2020-09-22 09:57:27 +00:00
Kris Maglione bbae7bbee6 Bug 1655866: Follow-up: Fix rebase botch.
Differential Revision: https://phabricator.services.mozilla.com/D90945
2020-09-22 01:30:10 +00:00
Kris Maglione 9f99c21cf1 Bug 1655866: Part 7 - Add test. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88320
2020-09-21 22:44:26 +00:00
Kris Maglione d3498e1041 Bug 1655866: Part 5 - Use native PermitUnload implementation from front-end code. r=nika,mconley
Differential Revision: https://phabricator.services.mozilla.com/D88318
2020-09-21 22:41:04 +00:00
Kris Maglione 0ae5bf64c5 Bug 1655866: Part 4 - Handle OOP beforeunload listeners in PermitUnload(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88317
2020-09-21 22:41:01 +00:00
Kris Maglione aa7e3fbdb4 Bug 1655866: Part 3 - Refactor PermitUnload to simplify handling OOP frames. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88316
2020-09-21 22:40:53 +00:00
Kris Maglione fb3a9daf66 Bug 1655866: Part 2 - Move HasBeforeUnload flag to WindowContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88315
2020-09-21 22:40:51 +00:00
Olli Pettay fe776d35ce Bug 1653561, Get URIWasModified from mLoadingEntry when it is available, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D90871
2020-09-21 21:03:26 +00:00
Olli Pettay 7a22246c6d Bug 1666010 - Ensure nsDocShell::mActiveEntryIsLoadingFromSessionHistory value is set correctly r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D90891
2020-09-21 16:57:23 +00:00
pbz f445708595 Bug 1314912 - Added test for location change rate limit. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90137
2020-09-21 11:54:57 +00:00
pbz b81e69ee95 Bug 1314912 - Rate limit calls to History and Location interfaces. r=smaug
This adds a rate limit to methods and setters of the History and Location
for non-system callers.
The rate limit is counted per BrowsingContext and can be controlled by prefs.

This patch is based on the original rate limit patch by :freesamael.

Differential Revision: https://phabricator.services.mozilla.com/D90136
2020-09-21 11:54:50 +00:00
Peter Van der Beken 595c969e2a Bug 1666194 - Return before touching session history in the child in nsDocShell::Reload if session history in the parent is enabled. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90821
2020-09-21 09:07:17 +00:00
Peter Van der Beken 41e9c935de Bug 1665322 - Error page loads should add entries for the original load with session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90393
2020-09-20 13:49:50 +00:00
Peter Van der Beken a8c40b4ffe Bug 1664655 - Update loading entry's layout history state if it shares it with the current active entry. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90030
2020-09-20 12:40:45 +00:00
Peter Van der Beken 2b10b0874a Bug 1664656 - Support nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY with session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90029
2020-09-20 12:40:33 +00:00
Peter Van der Beken aa030970db Bug 1664656 - Decide whether to add a new entry based on the load type. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90028
2020-09-20 12:40:10 +00:00
Dorel Luca 594edf3c57 Backed out 3 changesets (bug 1664656, bug 1664655) for multiple failures in checkouts/gecko/docshell/base/nsDocShell.cpp
Backed out changeset ac1e652efeb6 (bug 1664655)
Backed out changeset c8c1abf5f616 (bug 1664656)
Backed out changeset 3c1e9e36a39e (bug 1664656)
2020-09-19 16:38:26 +03:00
Peter Van der Beken 9348dc4a06 Bug 1664655 - Update loading entry's layout history state if it shares it with the current active entry. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90030
2020-09-18 16:49:41 +00:00
Peter Van der Beken 25833b010a Bug 1664656 - Support nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY with session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90029
2020-09-19 12:29:10 +00:00
Peter Van der Beken 9d54c7ab78 Bug 1664656 - Decide whether to add a new entry based on the load type. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90028
2020-09-18 16:49:35 +00:00
Olli Pettay c1560ee4eb Bug 1666010 - Ensure nsDocShell::mActiveEntryIsLoadingFromSessionHistory value is set correctly r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90751
2020-09-18 20:29:52 +00:00
Nika Layzell 1d58fba49c Bug 1659696 - Check PendingInitialization before targeting in window.open, r=kmag
This requires adding the flag as a synced field on the BrowsingContext, and
checking it in a few more places. Attempts to open a new window in this racy
manner will now raise an exception.

This should avoid the issue from bug 1658854 by blocking the buggy attempts to
load before the nested event loop has been exited.

Differential Revision: https://phabricator.services.mozilla.com/D87927
2020-09-16 20:47:55 +00:00
Kris Maglione a3b66dd82c Bug 1662841: Remove Fission-incompatible `nsDocumentViewer::AppendSubtree`. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D90615
2020-09-17 22:43:47 +00:00
Olli Pettay 208cca166b Bug 1574261 - Make nsDocShell::MaybeHandleSubFrameHistory work with session history in parent, r=peterv
This has couple of different pieces and one may want to focus on each of those separately when
reviewing. The first two as small changes.

- Moving mDynamicallyCreated from nsDocShell to be a sync'ed field on BrowsingContext.
  CanonicalBrowsingContext::CreateLoadingSessionHistoryEntryForLoad sets that on a newly created entry.
- Adding mActiveEntryIsLoadingFromSessionHistory. mLoadingEntry + mActiveEntryIsLoadingFromSessionHistory has roughly
  the same lifetime as mLSHE. mLoadingActiveEntry is needed so that child docshell can know whether its parent is loading from session history.
- The main part is in MaybeHandleSubframeHistory which checks if the parent docshell is loading from session history,
  and if so, asks for a LoadingSessionHistoryInfo. In the case of docshell living in a child process that operation is asynchronous,
  so when the data is back from the parent process, LoadURI is called again with the possibly updated data.
  One could possibly split the code to smaller methods and then deal with aContinueHandlingSubframeHistory only in LoadURI,
  but MaybeHandleSubframeHistory does have some early returns which would make that approach possibly hard to follow.

Differential Revision: https://phabricator.services.mozilla.com/D89685
2020-09-17 18:22:08 +00:00
Olli Pettay 3f30b17ab9 Bug 1665165 - Disable some bfcache tests on Fission, r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D90303
2020-09-17 17:36:24 +00:00
Olli Pettay ea62e522c0 Bug 1664329 - Make HandleSameDocumentNavigation handle loads from session history, r=peterv
Need to mark entries as being loading sooner, since HandleSameDocumentNavigation case doesn't do the round trip through parent again.
And HandleSameDocumentNavigation needs to update active entry and inform parent that is has dealt with the load.

Differential Revision: https://phabricator.services.mozilla.com/D89837
2020-09-17 15:39:59 +00:00
Olli Pettay dc9645dce5 Bug 1665502 - Update session history entry names also in the parent process, r=timhuang,peterv
Differential Revision: https://phabricator.services.mozilla.com/D90493
2020-09-17 10:40:32 +00:00
Andreas Farre 2c546aa7d3 Bug 1662410 - Part 3: Fix tests that use legacySHistory. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D89901
2020-09-16 14:51:11 +00:00
Andreas Farre d80d98ee5d Bug 1662410 - Part 2: Fix test infrastructure usage of legacySHistory. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D89711
2020-09-16 14:51:03 +00:00
Andreas Farre f9f96d23ca Bug 1662410 - Part 1: Fix usage of ChildSHistory.legacySHistory . r=peterv
ChildSHistory.legacySHistory isn't valid for content processes when
session history in the parent is enabled. We try to fix this by either
delegating to the parent by IPC or move the implementation partially
or as a whole to the parent.

Differential Revision: https://phabricator.services.mozilla.com/D89353
2020-09-16 14:51:01 +00:00
Karl Tomlinson 820dfc0a45 Bug 1646601 document as const some WindowContext members r=farre
Differential Revision: https://phabricator.services.mozilla.com/D90216
2020-09-15 22:13:22 +00:00
Randell Jesup 9a3ba1d1f1 Bug 1664961: check if child process when processing docshell Reload() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90200
2020-09-16 02:44:45 +00:00
Randell Jesup bf35bdd65b Bug 1665063: GetSessionHistory() isn't null-checked in HistoryCommitIndexAndLength() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90262
2020-09-15 18:39:09 +00:00
Andrea Marchesini e733096393 Bug 444222 - Update the window.name when doing the navigation, r=smaug,nika
This patch implements the window.name updating in the spec
https://html.spec.whatwg.org/#history-traversal.

Differential Revision: https://phabricator.services.mozilla.com/D81361
2020-09-15 17:51:05 +00:00
Tim Huang d332cd8f36 Bug 444222 - Add browsing context name into SHEntry. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89555
2020-09-11 07:52:11 +00:00
Tim Huang f4e796f357 Bug 444222 - Add a flag 'SetHasLoadedNonInitialDocument' in the BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88416
2020-09-11 07:52:11 +00:00
Anny Gakhokidze 6a0eb66873 Bug 1655572 - Make view-source not require session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88509
2020-09-14 19:00:05 +00:00
Andreas Farre a16ddf24f8 Bug 1664776 - Fall back to loading entry if there is no active entry. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D90089
2020-09-14 16:32:17 +00:00
Olli Pettay 9fe5fa2214 Bug 1663452, steal structured clone data for pushState, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D89903
2020-09-11 11:51:57 +00:00
Bogdan Tara 11b8b5a61b Backed out 7 changesets (bug 1661364, bug 1660342) for making bug 1551615 perma fail CLOSED TREE
Backed out changeset a56449ddacc9 (bug 1661364)
Backed out changeset fc185ddca53b (bug 1661364)
Backed out changeset 99234e013005 (bug 1661364)
Backed out changeset eac6bfc4a98d (bug 1661364)
Backed out changeset 9cb0e2dc8d8a (bug 1661364)
Backed out changeset 37b78e402c23 (bug 1661364)
Backed out changeset ae991d4209a7 (bug 1660342)
2020-09-11 14:13:46 +03:00
Mark Banner 3d9ea7d179 Bug 1375244 - Remove sync KeywordToURI and related IPC messages as they are no longer required. r=Gijs,mak,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89486
2020-09-11 07:15:21 +00:00
Gerald Squelart b0bf2c2172 Bug 1663554 - Convert PROFILER_ADD_TEXT_MARKER and friends to PROFILER_MARKER_TEXT - r=gregtatum
Mostly mechanical changes, with some work needed to convert the different payloads (with optional timestamps, inner window id, and/or backtrace) to the equivalent MarkerOptions.

Differential Revision: https://phabricator.services.mozilla.com/D89587
2020-09-11 00:41:27 +00:00
Agi Sferro c978775400 Bug 1659073 - Add confirmRepost to nsIPromptCollection. r=pbz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D89657
2020-09-10 22:28:15 +00:00
Nika Layzell da8cbf8277 Bug 1660342 - Add more assertions around host state, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D87928
2020-09-08 18:35:27 +00:00
Peter Van der Beken cca834e53b Bug 1664274 - Call SetDocCurrentStateObj for session history in the parent too. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89812
2020-09-10 19:30:13 +00:00
Anny Gakhokidze e12736fa36 Bug 1663238 - Only use the principal to inherit if it's equal to the flattened one, r=nika
With fission enabled, when we are starting a load, we might be saving
principals for a specific browsing context in process A, and then end up
targetting process B for the load, so during deserialization of the
LoadInfoArgs struct, we will end up using principals that were saved during a
previous load targetting that browsing context (with the same id) but in
process B.

Therefore, we cannot assert (without clearing the saved principals in the
original browsing context when a load is done, which can be done as a follow up
work) that the saved principal will be equal to the serialized one from
LoadInfoArgs.

Differential Revision: https://phabricator.services.mozilla.com/D89728
2020-09-10 14:40:31 +00:00
Peter Van der Beken 3038ffdea7 Bug 1663977 - Null out the parent pointer of SessionHistoryEntry objects if their parent dies. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89629
2020-09-09 16:49:59 +00:00
Peter Van der Beken bce06045ad Bug 1663492 - Make nsDocShell::OnNewURI use mActiveEntry instead of mOSHE if session history in the parent is enabled. r=smaug
Depends on D89423

Differential Revision: https://phabricator.services.mozilla.com/D89424
2020-09-08 12:52:02 +00:00
Peter Van der Beken 5389d9504c Bug 1663491 - Fix assert in SessionHistoryEntry::AddChild to deal with adding null. r=smaug
Depends on D89422

Differential Revision: https://phabricator.services.mozilla.com/D89423
2020-09-08 12:52:40 +00:00
Peter Van der Beken 8f72952fc3 Bug 1663488 - Fix CanonicalBrowsingContext::NotifyOnHistoryReload. r=smaug
Depends on D89421

Differential Revision: https://phabricator.services.mozilla.com/D89422
2020-09-08 14:04:33 +00:00
Peter Van der Beken f5c5e66824 Bug 1663488 - Forward ChildSHistory::Reload to the parent process with session history in the parent. r=smaug
Depends on D89420

Differential Revision: https://phabricator.services.mozilla.com/D89421
2020-09-08 14:10:31 +00:00
Peter Van der Beken 709c5edefe Bug 1663487 - Set loading history entry for loads in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89420
2020-09-09 00:40:38 +00:00
Peter Van der Beken fe3f64a907 Bug 1663486 - Synchronize ChildSHistory state when sending a browsing context to a new process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89419
2020-09-08 15:24:13 +00:00
Mihai Alexandru Michis 30e80990a0 Backed out changeset 73f6874cb3dd (bug 1613054) for causing bc failures in browser_abort_visibility.js
CLOSED TREE
2020-09-09 16:40:24 +03:00
Henri Sivonen 323bd1842b Bug 1613054 part 2 - On iframe.focus() create the initial about:blank for in-process case and treat the iframe as focusable for OOP case. r=nika
Test cases in https://bugzilla.mozilla.org/show_bug.cgi?id=1649099

Differential Revision: https://phabricator.services.mozilla.com/D88978
2020-09-09 12:09:44 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Sean Feng 31a296f2e9 Bug 1662525 - Don't refresh uri if the docShell is being destroyed r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89173
2020-09-08 21:48:59 +00:00
Peter Van der Beken d1ecf2821d Bug 1662407 - Call nsSHistory::GotoIndex directly when loading from session history in the parent process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88976
2020-09-08 19:32:27 +00:00
Andreas Farre b94d642e80 Bug 1662131 - Fix history getters for web browser persist. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88979
2020-09-08 13:06:29 +00:00
Sylvestre Ledru c320561565 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D89392
2020-09-08 04:32:00 +00:00
Henri Sivonen d8f0184fa3 Bug 1613054 part 1 - Synchronously request frame focus when .contentWindow.focus() called on OOP iframe. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70800
2020-09-02 15:05:53 +00:00
Nathan Froyd cd9c808aae Bug 1656302 - remove interface name for URIFixup component definition; r=mccr8
See https://bugzilla.mozilla.org/show_bug.cgi?id=1656302#c7 for the explanation.

Differential Revision: https://phabricator.services.mozilla.com/D89030
2020-09-01 21:54:56 +00:00
Peter Van der Beken ed9711a03e Bug 1662092 - Update the index and length on ChildSHistory in the parent process too. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88804
2020-09-01 12:07:05 +00:00
Henri Sivonen 345a28490a Bug 1662103 - Make .close() a no-op on OOP iframes. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D88983
2020-09-02 09:27:36 +00:00
Butkovits Atila fa16a9762f Backed out changeset 419cb80fbf03 (bug 1656302) for failure at test_Services.js. CLOSED TREE 2020-09-02 00:32:31 +03:00
Nathan Froyd d2158c4279 Bug 1656302 - remove interface name for URIFixup component definition; r=mccr8
See https://bugzilla.mozilla.org/show_bug.cgi?id=1656302#c7 for the explanation.

Differential Revision: https://phabricator.services.mozilla.com/D89030
2020-09-01 19:29:49 +00:00
Olli Pettay ed8b9c6e71 Bug 1662201 - Update history ID to mach the docshell ID of the SHEntry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88885
2020-09-01 14:47:13 +00:00
Bogdan Tara 591813bd88 Backed out changeset 071c8c9a91f1 (bug 1662201) for docshell related bustage CLOSED TREE 2020-09-01 16:54:28 +03:00
Olli Pettay c9a464bdec Bug 1662201 - Update history ID to mach the docshell ID of the SHEntry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88885
2020-09-01 11:58:01 +00:00
Olli Pettay 9129ef81c4 Bug 1662332 - the child list of a session history entry may contain null entries, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88966
2020-09-01 11:58:08 +00:00
Kris Maglione b050c2c657 Bug 1650257: Part 3 - Remove obsolete diagnostic crash annotations and assertions. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87487
2020-08-31 18:51:54 +00:00
Kris Maglione c2c6945169 Bug 1650257: Part 2 - Abort SetNewDocument() if ancestors are discarded/cached. r=nika,smaug,sg
Differential Revision: https://phabricator.services.mozilla.com/D87486
2020-08-31 18:51:56 +00:00
Kris Maglione 5f2d674982 Bug 1650257: Part 1 - Stop discarding BCs from the parent on WindowGlobal destruction. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87485
2020-08-31 18:51:45 +00:00
Olli Pettay 907f39a20b Bug 1661753 - Don't return early from nsDocShell::UpdateURLAndHistory when only session-history-in-parent related code is running, r=peterv
Depends on D88450

Differential Revision: https://phabricator.services.mozilla.com/D88630
2020-08-30 16:35:11 +00:00
Olli Pettay 7d2b65e50b Bug 1661317 - Make loading session history entries for iframes work when session history lives in the parent process (step 1.5), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88450
2020-08-31 10:05:53 +00:00
Olli Pettay b07cfb3c72 Bug 1661317 - Make loading session history entries for iframes work when session history lives in the parent process (step 1), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88312
2020-08-28 16:50:58 +00:00
Noemi Erli 0c682c4f01 Backed out changeset db52cf052477 (bug 1660342) for causing Bug 1661364 a=backout 2020-08-31 12:15:29 +03:00
Anny Gakhokidze 7e764895d7 Bug 1589102 - Part 13: Fix a race in process switching code due to reftest.js forcing a process switch, r=kmag
The race occurs when the parent changes the owner process for a BC, but the
child does not know about it and proceeds to call SetCurrentInnerWindowId on a
BC it no longer owns. To fix this, in child process, whenever we call
SetCurrentInnerWindowId on a BC, check that the BC is in process and that the
docshell has not been notified about an upcoming process change.

Differential Revision: https://phabricator.services.mozilla.com/D87934
2020-08-28 17:21:17 +00:00
Anny Gakhokidze 52ff3841e4 Bug 1589102 - Part 12: Fix file_scrollRestoration.html to wait for about:blank to load before proceeding, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D87933
2020-08-28 17:21:14 +00:00
Anny Gakhokidze d9a81f5d99 Bug 1589102 - Part 8: Add a crashtest for navigating remote page to about:blank, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D49427
2020-08-28 17:20:59 +00:00
Anny Gakhokidze 5755a94b86 Bug 1589102 - Part 7: Fix test_browsing_context_structured_clone.js to instead schedule precise gc, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85086
2020-08-28 17:20:57 +00:00
Anny Gakhokidze a12aaa2425 Bug 1589102 - Part 6: Do not load more than 2 nested frames in browser_browsingContext-01.js test, r=farre
Creating more than 2 nested iframes is not allowed and is now enforced for
about:blank loads because they now take place via DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D85084
2020-08-28 17:20:52 +00:00
Anny Gakhokidze aa5ab9056f Bug 1589102 - Part 5: Fix tests that relied on about:blank loads happening instantenously, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85083
2020-08-28 17:20:45 +00:00
Anny Gakhokidze 8b553ecfcf Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-28 17:20:30 +00:00
Peter Van der Beken 167889c056 Bug 1656347 - Make session history getters to work with history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88413
2020-08-27 18:47:27 +00:00
alwu 6ea69ac823 Bug 1634494 - part4 : notify media control action to the top level browsing context and all its children. r=chunmin
As we want to have an ability to do different operations on different browsing contexts for those actions with default handlers (play/pause/stop), so in D87142 we have changed `ContentMediaController` per browsing context. Techically it's per inner window, but it means each browsing context would have one corresponding `ContentMediaController` if the web content is in that browsing context.

The approach to achieve the goal is that, when getting those actions, we would notify to the top level browsing context, then go through its children to ensure that each browsing context can be operated correctly. By doing so, we can trigger default action handler and customized action handler on different browsing context.

Eg. A page has a child iframe, which has active media session with an action handler for `pause`. A page and iframe are both playing media. When pressing `pause`, default action handler would be run on main frame, and the customized action handler would be run on iframe.

Differential Revision: https://phabricator.services.mozilla.com/D87143
2020-08-27 04:10:45 +00:00
alwu 75773fa092 Bug 1634494 - part1 : store the active media session context Id on WindowContext. r=chunmin,farre
We determine which media session is active media session in chrome process, but the media session in content process doesn't know the detail.

This patch would store the active session context Id on the top level WindowContext, so that media session in content process can know if it's an active context or not, which helps to trigger the action handler only on active media session, after changing our propagation mechanism in following patches.

Differential Revision: https://phabricator.services.mozilla.com/D88106
2020-08-27 14:11:05 +00:00
Nika Layzell d5b6d05485 Bug 1658082 - Part 3: Set TargetBrowsingContext for non-retargeted loads, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D87468
2020-08-26 19:20:15 +00:00
Nika Layzell 7c0ec51ea3 Bug 1658082 - Part 2: Remove duplicate information from InternalLoad IPC messages, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D87467
2020-08-26 19:20:06 +00:00
Nika Layzell 6d387b5d53 Bug 1658082 - Part 1: Correctly set mTargetBrowsingContext from IPC, r=mattwoodrow
Previously, this field was incorrectly being initialized to
SourceBrowsingContext instead of TargetBrowsingContext.

Differential Revision: https://phabricator.services.mozilla.com/D88321
2020-08-26 22:21:51 +00:00
Nika Layzell 62ed33101c Bug 1660001 - Don't assert when creating popup from shutting down process, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D87921
2020-08-26 19:18:44 +00:00
Nika Layzell c8dab1397c Bug 1660342 - Add more assertions around host state, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D87928
2020-08-24 18:58:00 +00:00
Nika Layzell f635e5dd35 Bug 1659520 - Use explicit type arguments for `SyncedContext` field setters, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D87466
2020-08-26 07:53:26 +00:00
Mark Banner 2c1c2496b3 Bug 1660530 - Transition the docshell URIFixup tests to work with the modern search engine configuration. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D87894
2020-08-26 14:19:41 +00:00
Peter Van der Beken 7f6d4f154e Bug 1660869 - Forward RemoveFromSessionHistory to the parent process for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88061
2020-08-25 16:20:17 +00:00
Peter Van der Beken f0aa8ed5fe Bug 1660868 - Forward RemoveDynEntries to the parent process for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88060
2020-08-25 16:04:51 +00:00
Emilio Cobos Álvarez 72730e8e3d Bug 1636728 - Make calling window.print() before load keep deferring the actual printing and closing the window until load. r=smaug
Other engines also do this, but with my previous patch breaks it
(because we only hit print() on the print-content-viewer _after_ doing
the clone).

So move it before triggering all the machinery, and only for
window.print().  Given we didn't check this for print preview etc, I
think it's fine to carry on for user-triggered loads.

Trivial test-case (which I'm not quite sure how to turn into an
automated test...)

    <!doctype html>
    <h1>I do get printed but...</h1>

    <script>
      window.print();
    </script>

    <h2>Do I?</h2>

Note that this is broken with the new print preview UI already, this
fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D87898
2020-08-25 17:45:24 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Peter Van der Beken 14120f6a0d Bug 1660873 - Disable some unnecessary nsDocShell code if session history in the parent is turned on. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88062
2020-08-25 10:42:37 +00:00
Peter Van der Beken f777015c36 Bug 1660770 - Implement SessionHistoryEntry::Clone. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88057
2020-08-25 11:33:30 +00:00
Emilio Cobos Álvarez 2139980162 Bug 1659758 - Null-check event target in nsDocShellTreeOwner::AddChromeListeners. r=smaug
Tentative fix (though crash is long-standing), so no test :/

Differential Revision: https://phabricator.services.mozilla.com/D88090
2020-08-24 23:51:26 +00:00
Peter Van der Beken 30b0eb25b2 Bug 1659992 - Fix nsDocShell::LoadURI for session history loads to not rely on session history in the child. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87744
2020-08-23 17:41:13 +00:00
Peter Van der Beken 73b5ecf2d5 Bug 1659991 - Reuse an existing shared state in the parent process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87743
2020-08-23 20:14:03 +00:00
Peter Van der Beken 6e49bf5815 Bug 1659991 - Generate an id if we create a new session history entry in the child process. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87742
2020-08-23 17:41:06 +00:00
Peter Van der Beken a4a8b3da89 Bug 1649131 - Implement history.pushState/.replaceState for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87039
2020-08-23 17:41:03 +00:00
Peter Van der Beken e08ef28207 Bug 1649131 - Store some data in a pseudo shared state in the child process. r=smaug
The entries in the parent process stores some data in a shared state for some of
the entries that share a document. We also need to store some of this data in
the info objects in the child process, but it doesn't make sense to have it be
shared: the data shouldn't be mutated in the child process, and we probably only
have one of the info objects anyway. This adds a structure that holds the shared
data for an info object in the child process, but without actually sharing it.
As we use info objects in both parent and child, we hold a void pointer that's a
strong reference to a shared state in the parent process, and an owning pointer
to the pseudo-shared state in the child process.

Differential Revision: https://phabricator.services.mozilla.com/D87038
2020-08-23 17:36:10 +00:00
Peter Van der Beken 1caf077d0b Bug 1649131 - Stop checking for an nsISHEntry in nsDocShellLoadState as a sign of a load from history. r=smaug
Checking for an nsISHEntry doesn't work anymore with session history in the
parent. For that we can check that the loading session history info's
mIsLoadFromSessionHistory is true. If there is no loading session history info
we can fall back to the old way of checking for a non-null nsISHEntry (which
will only ever be true if session history in the parent is turned off).

Differential Revision: https://phabricator.services.mozilla.com/D87037
2020-08-23 20:20:55 +00:00
Peter Van der Beken 4a9e44592e Bug 1649131 - Stop marking SessionHistoryInfo as moveonly. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87036
2020-08-20 12:58:40 +00:00
Olli Pettay f908277430 Bug 1660526 - Tweak AddToRootSessionHistory and AddChildSHEntryHelper to make them easier to follow, r=annyG
CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D87895
2020-08-21 20:59:52 +00:00
Bogdan Tara 90b813cb8e Backed out changeset b8753e7cb414 (bug 1660526) for session related asan failures CLOSED TREE 2020-08-22 09:01:40 +03:00
Olli Pettay 13ebfdf441 Bug 1660526 - Tweak AddToRootSessionHistory and AddChildSHEntryHelper to make them easier to follow, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D87895
2020-08-21 20:59:52 +00:00
Olli Pettay 0bd5beeadf Bug 1658821 - Move Id from SessionHistoryInfo to LoadingSessionHistoryInfo, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86864
2020-08-20 16:55:21 +00:00
Butkovits Atila 5c5df0b663 Backed out changeset 24d6087acc64 (bug 1658821) for build bustage at SessionHistoryEntry.cpp. CLOSED TREE 2020-08-20 17:37:53 +03:00
Olli Pettay cd47973905 Bug 1658821 - Move Id from SessionHistoryInfo to LoadingSessionHistoryInfo, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86864
2020-08-20 12:02:17 +00:00
Emilio Cobos Álvarez f04cda9679 Bug 1602410 - Make window.print() work with tab-modal printing. r=nika,geckoview-reviewers,agi
Do this by spinning the event loop until we've done the clone for
preview as appropriate.

This should be much less risky than finishing the previous patches
which would still be nice, but realistically landing them for 81 is not
going to happen.

This just returns without doing nothing in a couple cases, like when
there's already another modal dialog or such. That seems acceptable to
me, it's not clear what better way to do would be.

Differential Revision: https://phabricator.services.mozilla.com/D87484
2020-08-19 09:27:18 +00:00
Andrew McCreight d914048012 Bug 1659825 - Null check gWindowContexts in WindowContext::Discard(). r=nika
If we're after shutdown, then this variable will have been cleared.
This is the remaining use that was failing to do a null check, and
it was manifesting as a very low-volume crash.

Differential Revision: https://phabricator.services.mozilla.com/D87503
2020-08-18 21:46:07 +00:00
Andreas Farre 6fdf0fb9db Bug 1647454 - Check popup permission on window context in DoURILoad. r=nika
Depends on D86808

Differential Revision: https://phabricator.services.mozilla.com/D86828
2020-08-18 16:16:32 +00:00
Olli Pettay 19cafeb0ec Bug 1656207 - Disable BFCache (for now) if session history in parent is enabled, r=peterv
https://searchfox.org/mozilla-central/rev/358cef5d1a87172f23b15e1a705d6f278db4cdad/docshell/base/nsDocShell.cpp#6579
is where the essential check is done

Differential Revision: https://phabricator.services.mozilla.com/D87095
2020-08-18 15:23:30 +00:00
Peter Van der Beken 4c8b6bf03f Bug 1659668 - Make sure the children array is big enough when adding a child using ReplaceElementAt in SessionHistoryEntry::AddChild. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87415
2020-08-18 15:12:51 +00:00
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Peter Van der Beken e5cbd042f8 Bug 1658902 - Fix some code for session history in parent to work without the session history implementation in the child. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86946
2020-08-17 18:52:31 +00:00
Edgar Chen bf43923608 Bug 1648887 - Part 2: Enable test_navigate_after_pagehide.html; r=kmag
This is a another case that hit the same assertion, we could reenable it after
bug 1611961.

Depends on D85752

Differential Revision: https://phabricator.services.mozilla.com/D85753
2020-08-06 14:49:02 +00:00
Edgar Chen b2ef530476 Bug 1611961 - Move UserActivationState from BrowsingContext to WindowContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83126
2020-08-17 11:02:34 +00:00
Edgar Chen 7cb48e9af8 Bug 1658650 - Remove hasValidTransientUserAction from DocumentChannelCreationArgs; r=mattwoodrow
There is the same information exposed in DocShellLoadStateInit.
And we don't really need to query user action from BrowsingContext, this
information would be carried in `nsDocShellLoadState`.

Depends on D86724

Differential Revision: https://phabricator.services.mozilla.com/D86773
2020-08-16 20:18:02 +00:00
Olli Pettay 9c7b1aa59d Bug 1658649 - Make session-history-in-parent nsISHEntry setters to rely on active entry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86770
2020-08-13 22:51:47 +00:00
Olli Pettay 5192276b89 Bug 1658454 - nsISHEntry.cacheKey setter for session-history-in-parent, r=peterv
SessionHistoryEntry::MaybeSynchronizeSharedStateToInfo call is a tad controversial, but
something like that is needed for the cases when the actual value lives in the SHEntrySharedParentState.

Differential Revision: https://phabricator.services.mozilla.com/D86640
2020-08-13 22:51:17 +00:00
Olli Pettay b4c699ff11 Bug 1658280 - nsISHEntry.scrollRestorationIsManual setter for session-history-in-parent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86547
2020-08-13 23:17:48 +00:00
Olli Pettay 33a7c472fa Bug 1657757 - nsISHEntry.title setter for session-history-in-parent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86275
2020-08-13 23:38:36 +00:00
Kris Maglione 05de051e4a Bug 1650257: Also set NewWindowBCIsTop annotation in parent. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87111
2020-08-14 19:16:45 +00:00
Olli Pettay cadcd14bc8 Bug 1656996 - Ensure cross-process session history navigations update child process side index and length, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85789
2020-08-14 13:05:25 +00:00
Noemi Erli 9858638fe8 Backed out 2 changesets (bug 1657757, bug 1658280) for causing build bustages in nsDocShell.cpp CLOSED TREE
Backed out changeset 0f03a74f24a5 (bug 1658280)
Backed out changeset 3aaeea6bd201 (bug 1657757)
2020-08-14 02:12:48 +03:00
Noemi Erli b7c6d9d228 Backed out changeset 404955e976d6 (bug 1658454) for causing build bustages in nsDocShell.cpp CLOSED TREE 2020-08-14 01:30:50 +03:00
Csoregi Natalia 36ac6c5cca Backed out 2 changesets (bug 1656997, bug 1656996) for fission failures on browser_preferences_usage.js. CLOSED TREE
Backed out changeset c3aaa4f191e6 (bug 1656997)
Backed out changeset e41977f9608f (bug 1656996)
2020-08-14 00:47:56 +03:00
Olli Pettay 510e721d9e Bug 1658454 - nsISHEntry.cacheKey setter for session-history-in-parent, r=peterv
SessionHistoryEntry::MaybeSynchronizeSharedStateToInfo call is a tad controversial, but
something like that is needed for the cases when the actual value lives in the SHEntrySharedParentState.

Differential Revision: https://phabricator.services.mozilla.com/D86640
2020-08-13 19:18:29 +00:00
Olli Pettay 9805690970 Bug 1658280 - nsISHEntry.scrollRestorationIsManual setter for session-history-in-parent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86547
2020-08-13 19:18:06 +00:00
Olli Pettay 83814cae84 Bug 1657757 - nsISHEntry.title setter for session-history-in-parent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D86275
2020-08-13 19:17:38 +00:00
Olli Pettay 9b6fb243d1 Bug 1656996 - Ensure cross-process session history navigations update child process side index and length, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85789
2020-08-13 19:17:08 +00:00
Olli Pettay 23d50bfbe9 Bug 1655752 - Move session history to the replacing CanonicalBrowsingContext, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85189
2020-08-13 16:33:56 +00:00
Razvan Maries ca34860579 Backed out changeset 2eca7dff6597 (bug 1658902) for perma failures on test_history_length_during_pageload.html. CLOSED TREE 2020-08-13 19:00:00 +03:00
Peter Van der Beken 360f74796c Bug 1658902 - Fix some code for session history in parent to work without the session history implementation in the child. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86946
2020-08-13 13:07:21 +00:00
Edgar Chen 747f9db6d7 Bug 1658572 - Do not propagate user activation state while loading loading-error-page (about:neterror); r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D86724
2020-08-13 09:47:08 +00:00
Peter Van der Beken 5e736113a2 Bug 1658341 - Implement SessionHistory::AddChild/RemoveChild/ReplaceChild. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86574
2020-08-13 08:48:48 +00:00
Peter Van der Beken a35af34bfa Bug 1658341 - Copy nsSHentry::AddChild/RemoveChild/ReplaceChild to SessionHistoryEntry. r=smaug
This copies the code as is, so won't compile. The next patch changes the implementation so it compiles.

Differential Revision: https://phabricator.services.mozilla.com/D86573
2020-08-13 08:48:45 +00:00
Jean-Yves Avenard 358cef5d1a Bug 1646539 - Part 3. Fix compilation. r=farre
BrowserContext is only fast declared here.
To avoid having to include the full header, move it out of the header.

Differential Revision: https://phabricator.services.mozilla.com/D86904
2020-08-13 07:16:11 +00:00
Geoff Lankow 35d3be0fc3 Bug 1646539 follow-up - Add missing #include to un-break the Thunderbird build. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D86871
2020-08-12 23:47:09 +00:00
Dorel Luca dcd1938a78 Backed out changeset 178fa7e29bb6 (bug 1585070) for Browser-chrome failures in general/browser_windowactivation.js. CLOSED TREE 2020-08-12 20:10:46 +03:00
Andreas Farre 2f88f75c98 Bug 1646539 - Part 2: Add field on WindowContext tracking popup permission. r=nika
Popup permissions initialized with the result of checking if the
constructing WindowContext's principal is allowed to open a popup. The
field is updated for all WindowContexts sharing a principal whenever
the popup permission for that nsIPrincipal changes.

Differential Revision: https://phabricator.services.mozilla.com/D86378
2020-08-12 15:38:12 +00:00
Steven MacLeod 05066e9e52 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=farre
A new `BrowsingContext` field, `isActiveBrowserWindow`, 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-08-11 12:53:57 +00:00
Emilio Cobos Álvarez 0c03ba166c Bug 1658471 - Remove dom.security.featurePolicy.enabled. r=baku
We've shipped it on by default since 74 (bug 1617219).

Differential Revision: https://phabricator.services.mozilla.com/D86665
2020-08-12 10:57:04 +00:00
Kashav Madan 255b3f3ecb Bug 1566422 - Avoid unnecessary coordinate conversions when showing tooltips, r=emilio
We currently start with screen-relative coordinates, translate them to
widget-relative coordinates, and then translate them back to screen-relative
coordinates when actually showing the tooltip in XULBrowserWindow.showTooltip().
There's no reason for the extra conversions, so we can just send screen-relative
coordinates directly.

Since the widget origin for out-of-process frames is the origin of the frame
itself (instead of the tab, which is the case for in-process frames), the
screen-to-widget conversion was incorrect, and was causing a bug in how the
tooltip was being positioned. Avoiding that conversion altogether also fixes
that bug.

Differential Revision: https://phabricator.services.mozilla.com/D86750
2020-08-11 22:01:40 +00:00
Peter Van der Beken 710fadd5c3 Bug 1658334 - Correctly pass null state data over IPC in SessionHistoryInfo. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D86565
2020-08-11 15:28:37 +00:00
Steven MacLeod 560478715a Bug 1580596 - Fix usage of nsIDocShellTreeItem in nsDocShell::CheckLoadingPermission r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D56004
2020-08-10 19:36:35 +00:00
Nika Layzell 28a9513c43 Bug 1656854 - Part 1: Block subframe creation in discarded BCs, r=farre
This should help catch and/or prevent any cases where we're creating a new
subframe at an unfortunate time during `BrowsingContext` or `WindowContext`
teardown.

Differential Revision: https://phabricator.services.mozilla.com/D85896
2020-08-06 14:03:30 +00:00
Christoph Kerschbaumer e99c9c8e77 Bug 1657583: Simplify TestSitePermission within nsHTTPSOnlyUtils r=necko-reviewers,JulianWels,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86178
2020-08-10 08:51:44 +00:00
Steven MacLeod b329c4ff4c Bug 1646547 - fix ScriptLoader::ReadyToExecuteParserBlockingScripts stopping at OOP ancestors. r=kmag
`ReadyToExecuteParserBlockingScripts` was walking the ancestor chain but
would stop if it hit an OOP ancestor. With this change we walk the
`WindowContext` tree instead, so that we may skip over OOP ancestors
and continue checking all in process ancestors.

Differential Revision: https://phabricator.services.mozilla.com/D86436
2020-08-09 23:50:35 +00:00
Kartikaya Gupta b242b603bc Bug 1657995 - Rename UpdateViewportOverridden to a more appropriate name. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D86491
2020-08-09 21:40:56 +00:00
Kris Maglione 6dc4123fea Bug 1646519: Fix GetInProcessTopInternal usage in GetZone. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80092
2020-08-07 22:02:02 +00:00
Bogdan Tara 492ec9ba2f Backed out changeset c20c383af4db (bug 1657583) for http related failures CLOSED TREE 2020-08-07 17:13:37 +03:00
Christoph Kerschbaumer 080bd94e56 Bug 1657583: Simplify TestSitePermission within nsHTTPSOnlyUtils r=necko-reviewers,JulianWels,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86178
2020-08-07 12:50:31 +00:00
Bogdan Tara 3bc4fa6d50 Backed out changeset 5a2241b01c82 (bug 1657583) for DocumentLoadListener.cpp related bustage CLOSED TREE 2020-08-07 14:58:47 +03:00
Christoph Kerschbaumer b6387305a4 Bug 1657583: Simplify TestSitePermission within nsHTTPSOnlyUtils r=necko-reviewers,JulianWels,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86178
2020-08-07 11:27:56 +00:00
Emilio Cobos Álvarez ac6059e379 Bug 1657841 - Remove unused visible tabs tracking. r=edgar
This stopped being used at some point and now it's just useless.

Differential Revision: https://phabricator.services.mozilla.com/D86322
2020-08-07 09:40:07 +00:00
Csoregi Natalia 8fa5e9e957 Backed out 3 changesets (bug 1648887, bug 1611961) for assertion failures on WindowContext.cpp. CLOSED TREE
Backed out changeset 3719f7db339d (bug 1648887)
Backed out changeset b7c7fcb5df37 (bug 1648887)
Backed out changeset ab82a9c613f8 (bug 1611961)
2020-08-06 17:43:51 +03:00
Edgar Chen c220c51fc4 Bug 1648887 - Part 2: Enable test_navigate_after_pagehide.html; r=kmag
This is a another case that hit the same assertion, we could reenable it after
bug 1611961.

Depends on D85752

Differential Revision: https://phabricator.services.mozilla.com/D85753
2020-08-04 20:08:08 +00:00
Edgar Chen d2c2f39bd2 Bug 1611961 - Move UserActivationState from BrowsingContext to WindowContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83126
2020-08-06 10:25:00 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze 38439c4928 Bug 1589102 - Part 9: Add a crashtest for navigating remote page to about:blank, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D49427
2020-08-05 16:55:05 +00:00
Anny Gakhokidze 92343d143d Bug 1589102 - Part 8: Fix test_browsing_context_structured_clone.js to instead schedule precise gc, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85086
2020-08-05 16:55:05 +00:00
Anny Gakhokidze a7d4d40dad Bug 1589102 - Part 6: Do not load more than 2 nested frames in browser_browsingContext-01.js test, r=farre
Creating more than 2 nested iframes is not allowed and is now enforced for
about:blank loads because they now take place via DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D85084
2020-08-05 16:44:26 +00:00
Anny Gakhokidze 5da2f83936 Bug 1589102 - Part 5: Fix tests that relied on about:blank loads happening instantenously, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85083
2020-08-05 16:44:18 +00:00
Anny Gakhokidze e903c66d34 Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-05 16:44:01 +00:00
Christoph Kerschbaumer 394ac42d42 Bug 1657348: Simplify CouldBeHttpsOnlyError within docshell. r=JulianWels
Differential Revision: https://phabricator.services.mozilla.com/D86009
2020-08-05 15:18:01 +00:00
Nika Layzell 1c71a222fc Bug 1653729 - Part 1: Generalize do_QueryActor API, r=kmag
This changes the set of types which can be passed as the second argument to
do_QueryActor to ones which can be unambiguously converted to a JSActorManager,
and combines nsCOMPtr_helper implementations.

Differential Revision: https://phabricator.services.mozilla.com/D84067
2020-08-04 21:34:29 +00:00
Anny Gakhokidze 2d1151529c Bug 1654922 - Part 1: Remove DocumentChannel pref usage from tests and document navigation code, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85483
2020-08-01 16:36:12 +00:00
Sebastian Streich bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00