From 295a363c2b1d4d72c67445fd3dcde4a6903fdf97 Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Mon, 28 Jun 1999 19:56:10 +0000 Subject: [PATCH] Fix for Bug# 7957. Always set the first "Title". git-svn-id: svn://10.0.0.236/trunk@37209 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLContentSink.cpp | 5 ++++- mozilla/layout/html/document/src/nsHTMLContentSink.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index c6e0ec98b06..33e091a1c92 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -1662,7 +1662,10 @@ HTMLContentSink::SetTitle(const nsString& aValue) mTitle = new nsString(aValue); } else { - *mTitle = aValue; + // If the title was already set then don't try to overwrite it + // when a new title is encountered - For backwards compatiblity + //*mTitle = aValue; + return NS_OK; } ReduceEntities(*mTitle); mTitle->CompressWhitespace(PR_TRUE, PR_TRUE); diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index c6e0ec98b06..33e091a1c92 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -1662,7 +1662,10 @@ HTMLContentSink::SetTitle(const nsString& aValue) mTitle = new nsString(aValue); } else { - *mTitle = aValue; + // If the title was already set then don't try to overwrite it + // when a new title is encountered - For backwards compatiblity + //*mTitle = aValue; + return NS_OK; } ReduceEntities(*mTitle); mTitle->CompressWhitespace(PR_TRUE, PR_TRUE);