Bug 260070 Improve detection of missing <title>s r+sr=bz

git-svn-id: svn://10.0.0.236/trunk@162509 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk 2004-09-17 20:11:02 +00:00
parent 084b975545
commit 6eaca763b6

View File

@ -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;