Bug 1865891 p12. Rename NotifyListenersContentViewerEvicted to match nsIDocumentViewer's new name. r=emilio

Depends on D194284

Differential Revision: https://phabricator.services.mozilla.com/D194285
This commit is contained in:
Jonathan Watt 2023-11-22 08:08:16 +00:00
Родитель 1fb60aada1
Коммит 621395f2f4
5 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -993,7 +993,7 @@ nsSHEntry::SyncTreesForSubframeNavigation(
void nsSHEntry::EvictDocumentViewer() {
nsCOMPtr<nsIDocumentViewer> viewer = GetContentViewer();
if (viewer) {
mShared->NotifyListenersContentViewerEvicted();
mShared->NotifyListenersDocumentViewerEvicted();
// Drop the presentation state before destroying the viewer, so that
// document teardown is able to correctly persist the state.
SetContentViewer(nullptr);

Просмотреть файл

@ -111,10 +111,10 @@ void SHEntrySharedParentState::CopyFrom(SHEntrySharedParentState* aEntry) {
mLastTouched = aEntry->mLastTouched;
}
void dom::SHEntrySharedParentState::NotifyListenersContentViewerEvicted() {
void dom::SHEntrySharedParentState::NotifyListenersDocumentViewerEvicted() {
if (nsCOMPtr<nsISHistory> shistory = do_QueryReferent(mSHistory)) {
RefPtr<nsSHistory> nsshistory = static_cast<nsSHistory*>(shistory.get());
nsshistory->NotifyListenersContentViewerEvicted(1);
nsshistory->NotifyListenersDocumentViewerEvicted(1);
}
}

Просмотреть файл

@ -102,7 +102,7 @@ class SHEntrySharedParentState : public SHEntrySharedState {
nsFrameLoader* GetFrameLoader();
void NotifyListenersContentViewerEvicted();
void NotifyListenersDocumentViewerEvicted();
nsExpirationState* GetExpirationState() { return &mExpirationState; }

Просмотреть файл

@ -221,7 +221,7 @@ void nsSHistory::EvictDocumentViewerForEntry(nsISHEntry* aEntry) {
// Drop the presentation state before destroying the viewer, so that
// document teardown is able to correctly persist the state.
NotifyListenersContentViewerEvicted(1);
NotifyListenersDocumentViewerEvicted(1);
aEntry->SetContentViewer(nullptr);
aEntry->SyncPresentationState();
viewer->Destroy();
@ -239,7 +239,7 @@ void nsSHistory::EvictDocumentViewerForEntry(nsISHEntry* aEntry) {
MOZ_LOG(gSHIPBFCacheLog, LogLevel::Debug,
("nsSHistory::EvictDocumentViewerForEntry "
"destroying an nsFrameLoader."));
NotifyListenersContentViewerEvicted(1);
NotifyListenersDocumentViewerEvicted(1);
she->SetFrameLoader(nullptr);
frameLoader->Destroy();
}
@ -1108,7 +1108,7 @@ nsSHistory::AddSHistoryListener(nsISHistoryListener* aListener) {
return NS_OK;
}
void nsSHistory::NotifyListenersContentViewerEvicted(uint32_t aNumEvicted) {
void nsSHistory::NotifyListenersDocumentViewerEvicted(uint32_t aNumEvicted) {
NotifyListeners(mListeners, [aNumEvicted](auto l) {
l->OnDocumentViewerEvicted(aNumEvicted);
});

Просмотреть файл

@ -170,7 +170,7 @@ class nsSHistory : public mozilla::LinkedListElement<nsSHistory>,
void WindowIndices(int32_t aIndex, int32_t* aOutStartIndex,
int32_t* aOutEndIndex);
void NotifyListenersContentViewerEvicted(uint32_t aNumEvicted);
void NotifyListenersDocumentViewerEvicted(uint32_t aNumEvicted);
int32_t Length() { return int32_t(mEntries.Length()); }
int32_t Index() { return mIndex; }