From f881e6b0f85e9d8efd83ef53c0bc5d7abd2b11e4 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Thu, 29 Dec 2005 20:38:06 +0000 Subject: [PATCH] bug 321558: document.write into a new window or frame won't set the title of the new document. Void out the old title so that we know that there hasn't been a real yet. r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@186720 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLDocument.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 15462407ef0..e456cd87d9b 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -2015,7 +2015,10 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace) // Zap the old title -- otherwise it would hang around until document.close() // (which might never come) if the new document doesn't explicitly set one. + // Void the title to make sure that we actually respect any titles set by the + // new document. SetTitle(EmptyString()); + mDocumentTitle.SetIsVoid(PR_TRUE); // Store the security info of the caller now that we're done // resetting the document.