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

5906 Коммитов

Автор SHA1 Сообщение Дата
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 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 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 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
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
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
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 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
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
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 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