mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Update for 215440, make sure not to break SeaMonkey titlebars when the doc has no title, r/sr/a=brendan.
This commit is contained in:
parent
2b4b87c336
commit
71e59d5b39
@ -606,17 +606,21 @@ NS_IMETHODIMP nsContentTreeOwner::SetTitle(const PRUnichar* aTitle)
|
||||
if (docTitle.IsEmpty())
|
||||
docTitle.Assign(mTitleDefault);
|
||||
|
||||
if (!mTitlePreface.IsEmpty()) {
|
||||
// Title will be: "Preface: Doc Title - Mozilla"
|
||||
title.Assign(mTitlePreface);
|
||||
title.Append(docTitle);
|
||||
}
|
||||
else {
|
||||
// Title will be: "Doc Title - Mozilla"
|
||||
title = docTitle;
|
||||
}
|
||||
if (!docTitle.IsEmpty()) {
|
||||
if (!mTitlePreface.IsEmpty()) {
|
||||
// Title will be: "Preface: Doc Title - Mozilla"
|
||||
title.Assign(mTitlePreface);
|
||||
title.Append(docTitle);
|
||||
}
|
||||
else {
|
||||
// Title will be: "Doc Title - Mozilla"
|
||||
title = docTitle;
|
||||
}
|
||||
|
||||
title += mTitleSeparator + mWindowTitleModifier;
|
||||
title += mTitleSeparator + mWindowTitleModifier;
|
||||
}
|
||||
else
|
||||
title.Assign(mWindowTitleModifier); // Title will just be plain "Mozilla"
|
||||
|
||||
// XXX Don't need to fully qualify this once I remove nsWebShellWindow::SetTitle
|
||||
// return mXULWindow->SetTitle(title.get());
|
||||
|
Loading…
Reference in New Issue
Block a user