From 6eaca763b671fc410954e7ac17b908ee38692b67 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Fri, 17 Sep 2004 20:11:02 +0000 Subject: [PATCH] Bug 260070 Improve detection of missing s r+sr=bz git-svn-id: svn://10.0.0.236/trunk@162509 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLContentSink.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 57d29e6d1ee..d48ec85e3a7 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -336,7 +336,9 @@ protected: nsIHTMLContent* mBody; nsIHTMLContent* mFrameset; nsIHTMLContent* mHead; - nsString mTitle; + + // This will be void until a <title> is found + nsXPIDLString mTitle; nsString mSkippedContent; @@ -2272,7 +2274,7 @@ HTMLContentSink::DidBuildModel(void) mNotificationTimer = 0; } - if (mTitle.IsEmpty()) { + if (mTitle.IsVoid()) { nsCOMPtr<nsIDOMHTMLDocument> domDoc(do_QueryInterface(mHTMLDocument)); if (domDoc) domDoc->SetTitle(mTitle); @@ -3137,7 +3139,7 @@ HTMLContentSink::SetDocumentTitle(const nsAString& aTitle) MOZ_TIMER_START(mWatch); NS_ASSERTION(mCurrentContext == mHeadContext, "title not in head"); - if (!mTitle.IsEmpty()) { + if (!mTitle.IsVoid()) { // If the title was already set then don't try to overwrite it // when a new title is encountered - For backwards compatiblity //*mTitle = aValue;