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
parent 85bdec26c1
commit 0bbfbaac40
5 changed files with 19 additions and 19 deletions

View File

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

View File

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

View File

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

View File

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

View File

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