mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 118704. Get the document title from the DOM instead of storing it as a string in the document. r+sr=jst
This commit is contained in:
parent
8a93e089c6
commit
78a2558a52
@ -112,6 +112,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsISelectionListener.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMNSDocument.h"
|
||||
#include "nsIDOMNSHTMLDocument.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
@ -1153,7 +1154,9 @@ nsPrintEngine::GetDocumentTitleAndURL(nsIDocument* aDoc,
|
||||
*aTitle = nsnull;
|
||||
*aURLStr = nsnull;
|
||||
|
||||
const nsAString &docTitle = aDoc->GetDocumentTitle();
|
||||
nsAutoString docTitle;
|
||||
nsCOMPtr<nsIDOMNSDocument> doc = do_QueryInterface(aDoc);
|
||||
doc->GetTitle(docTitle);
|
||||
if (!docTitle.IsEmpty()) {
|
||||
*aTitle = ToNewUnicode(docTitle);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user