Bug 1866010 p3. Update aContentViewer args to reflect nsIDocumentViewer's new name. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D194359
This commit is contained in:
Jonathan Watt 2023-11-24 09:10:49 +00:00
Родитель 85bdec26c1
Коммит 0bbfbaac40
5 изменённых файлов: 19 добавлений и 19 удалений

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

@ -1468,11 +1468,11 @@ PresShell* nsDocShell::GetEldestPresShell() {
}
NS_IMETHODIMP
nsDocShell::GetContentViewer(nsIDocumentViewer** aContentViewer) {
NS_ENSURE_ARG_POINTER(aContentViewer);
nsDocShell::GetContentViewer(nsIDocumentViewer** aDocumentViewer) {
NS_ENSURE_ARG_POINTER(aDocumentViewer);
*aContentViewer = mDocumentViewer;
NS_IF_ADDREF(*aContentViewer);
*aDocumentViewer = mDocumentViewer;
NS_IF_ADDREF(*aDocumentViewer);
return NS_OK;
}
@ -5592,7 +5592,7 @@ static bool IsFollowupPartOfMultipart(nsIRequest* aRequest) {
!firstPart;
}
nsresult nsDocShell::Embed(nsIDocumentViewer* aContentViewer,
nsresult nsDocShell::Embed(nsIDocumentViewer* aDocumentViewer,
WindowGlobalChild* aWindowActor,
bool aIsTransientAboutBlank, bool aPersist,
nsIRequest* aRequest, nsIURI* aPreviousURI) {
@ -5600,7 +5600,7 @@ nsresult nsDocShell::Embed(nsIDocumentViewer* aContentViewer,
// setting up new document
PersistLayoutHistoryState();
nsresult rv = SetupNewViewer(aContentViewer, aWindowActor);
nsresult rv = SetupNewViewer(aDocumentViewer, aWindowActor);
NS_ENSURE_SUCCESS(rv, rv);
// XXX What if SetupNewViewer fails?
@ -7046,15 +7046,15 @@ nsDocShell::RestorePresentationEvent::Run() {
}
NS_IMETHODIMP
nsDocShell::BeginRestore(nsIDocumentViewer* aContentViewer, bool aTop) {
nsDocShell::BeginRestore(nsIDocumentViewer* aDocumentViewer, bool aTop) {
MOZ_ASSERT(!mozilla::SessionHistoryInParent());
nsresult rv;
if (!aContentViewer) {
if (!aDocumentViewer) {
rv = EnsureDocumentViewer();
NS_ENSURE_SUCCESS(rv, rv);
aContentViewer = mDocumentViewer;
aDocumentViewer = mDocumentViewer;
}
// Dispatch events for restoring the presentation. We try to simulate
@ -7062,7 +7062,7 @@ nsDocShell::BeginRestore(nsIDocumentViewer* aContentViewer, bool aTop) {
// the document's channel to the loadgroup to initiate stateChange
// notifications.
RefPtr<Document> doc = aContentViewer->GetDocument();
RefPtr<Document> doc = aDocumentViewer->GetDocument();
if (doc) {
nsIChannel* channel = doc->GetChannel();
if (channel) {

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

@ -985,7 +985,7 @@ class nsDocShell final : public nsDocLoader,
nsresult EnsureCommandHandler();
nsresult RefreshURIFromQueue();
void RefreshURIToQueue();
nsresult Embed(nsIDocumentViewer* aContentViewer,
nsresult Embed(nsIDocumentViewer* aDocumentViewer,
mozilla::dom::WindowGlobalChild* aWindowActor,
bool aIsTransientAboutBlank, bool aPersist,
nsIRequest* aRequest, nsIURI* aPreviousURI);

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

@ -654,13 +654,13 @@ SessionHistoryEntry::SetReferrerInfo(nsIReferrerInfo* aReferrerInfo) {
}
NS_IMETHODIMP
SessionHistoryEntry::GetContentViewer(nsIDocumentViewer** aContentViewer) {
*aContentViewer = nullptr;
SessionHistoryEntry::GetContentViewer(nsIDocumentViewer** aDocumentViewer) {
*aDocumentViewer = nullptr;
return NS_OK;
}
NS_IMETHODIMP
SessionHistoryEntry::SetContentViewer(nsIDocumentViewer* aContentViewer) {
SessionHistoryEntry::SetContentViewer(nsIDocumentViewer* aDocumentViewer) {
MOZ_CRASH("This lives in the child process");
return NS_ERROR_FAILURE;
}

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

@ -200,14 +200,14 @@ NS_IMETHODIMP
nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer,
Document* aDocument,
const char* aCommand,
nsIDocumentViewer** aContentViewer) {
nsIDocumentViewer** aDocumentViewer) {
MOZ_ASSERT(aDocument);
nsCOMPtr<nsIDocumentViewer> viewer = NS_NewDocumentViewer();
// Bind the document to the Content Viewer
viewer->LoadStart(aDocument);
viewer.forget(aContentViewer);
viewer.forget(aDocumentViewer);
return NS_OK;
}
@ -288,7 +288,7 @@ already_AddRefed<Document> nsContentDLF::CreateBlankDocument(
nsresult nsContentDLF::CreateDocument(
const char* aCommand, nsIChannel* aChannel, nsILoadGroup* aLoadGroup,
nsIDocShell* aContainer, nsContentDLF::DocumentCreator aDocumentCreator,
nsIStreamListener** aDocListener, nsIDocumentViewer** aContentViewer) {
nsIStreamListener** aDocListener, nsIDocumentViewer** aDocumentViewer) {
MOZ_ASSERT(aDocumentCreator);
nsresult rv = NS_ERROR_FAILURE;
@ -324,7 +324,7 @@ nsresult nsContentDLF::CreateDocument(
// Bind the document to the Content Viewer
viewer->LoadStart(doc);
viewer.forget(aContentViewer);
viewer.forget(aDocumentViewer);
return NS_OK;
}

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

@ -37,7 +37,7 @@ class nsContentDLF final : public nsIDocumentLoaderFactory {
nsILoadGroup* aLoadGroup, nsIDocShell* aContainer,
DocumentCreator aDocumentCreator,
nsIStreamListener** aDocListener,
nsIDocumentViewer** aContentViewer);
nsIDocumentViewer** aDocumentViewer);
/**
* Create a blank document using the given loadgroup and given