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

64 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 1a587403e7 Bug 1668083 - when redirecting load from post to get, load should become replacing load also in session history, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D93249
2020-10-13 16:36:11 +00:00
Kashav Madan 72c025a351 Bug 1669767 - Fallback on SessionHistoryInfo::mURI if we receive an empty title, r=peterv
This now mirrors nsSHEntry::GetTitle.

Differential Revision: https://phabricator.services.mozilla.com/D92785
2020-10-13 14:47:51 +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
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
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
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
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
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
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
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 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
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
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
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
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 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
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
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
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
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
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
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
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
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 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 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 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
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
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
Olli Pettay 26b28f1b65 Bug 1654525 - Ensure loads initiated from session history in parent reuse the existing SHEntries, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D85173
2020-07-29 14:23:09 +00:00
Peter Van der Beken d00cd16240 Bug 1655670 - Set default title of session history entry to the URL for session history in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D85124
2020-07-28 12:05:37 +00:00
Olli Pettay 1b3d2a37fb Bug 1647229 - Synchronize layouthistorystate to parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D81753
2020-07-23 19:35:29 +00:00
Olli Pettay 1c3b7cae26 Bug 1653123, don't crash for now if nsISHEntry.hasUserInteraction is used in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83716
2020-07-16 23:04:51 +00:00
Razvan Maries 4ccaec8564 Backed out 3 changesets (bug 1653123, bug 1602115) for perma failures on test_history_length_during_pageload.html. CLOSED TREE
Backed out changeset 6b3c0f542ef3 (bug 1653123)
Backed out changeset 951c0fd65a00 (bug 1602115)
Backed out changeset 258d0ebd9e34 (bug 1602115)
2020-07-16 23:21:18 +03:00
Olli Pettay 22e60f1257 Bug 1653123, don't crash for now if nsISHEntry.hasUserInteraction is used in the parent process, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83716
2020-07-16 19:02:51 +00:00
Peter Van der Beken 1ca3ccc2c4 Bug 1648038 - Don't require session history object when creating an entry. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80883
2020-07-14 11:14:46 +00:00
Olli Pettay b2c2617436 Bug 1648400 - Make it possible to get back to nsISHEntry from SessionHistoryInfo ID, r=peterv
Using raw pointer to the hashtable to avoid static constructors.

Differential Revision: https://phabricator.services.mozilla.com/D81353
2020-07-15 15:54:02 +00:00