diff --git a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp index ba44e1e43d2..9a3392f99c8 100644 --- a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp +++ b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp @@ -430,7 +430,8 @@ NS_IMETHODIMP nsContentTreeOwner::SetTitle(const PRUnichar* aTitle) if(mTitlePreface.Length() > 0) { // Title will be: "Preface: Doc Title - Mozilla" - title = mTitlePreface + docTitle; + title = mTitlePreface; + title.Append(docTitle); } else { diff --git a/mozilla/xpfe/appshell/src/nsSessionHistory.cpp b/mozilla/xpfe/appshell/src/nsSessionHistory.cpp index 12a7dabb7a6..daf2fcb2f24 100644 --- a/mozilla/xpfe/appshell/src/nsSessionHistory.cpp +++ b/mozilla/xpfe/appshell/src/nsSessionHistory.cpp @@ -545,7 +545,7 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) { if (NS_SUCCEEDED(prevShell->GetCurrentURI(getter_AddRefs(pURI))) && pURI) { nsXPIDLCString spec; if (NS_SUCCEEDED(pURI->GetSpec(getter_Copies(spec)))) - pSURL = spec; + pSURL.Assign(spec); } } @@ -556,7 +556,7 @@ nsHistoryEntry::Load(nsIWebShell * aPrevEntry, PRBool aIsReload) { //Compare the URLs { - if ((pSURL) == cURL) + if ((pSURL).Equals(cURL)) urlChanged = PR_FALSE; else urlChanged = PR_TRUE; @@ -689,7 +689,7 @@ nsHistoryEntry::Compare(nsIWebShell * aPrevEntry, PRBool aIsReload) { if (NS_SUCCEEDED(prevShell->GetCurrentURI(getter_AddRefs(pURI)))) { nsXPIDLCString spec; if (NS_SUCCEEDED(pURI->GetSpec(getter_Copies(spec)))) - pSURL = spec; + pSURL.Assign(spec); } } if (cur) { @@ -698,7 +698,7 @@ nsHistoryEntry::Compare(nsIWebShell * aPrevEntry, PRBool aIsReload) { } //Compare the URLs { - if (pSURL == cURL) + if (pSURL.Equals(cURL)) urlChanged = PR_FALSE; else urlChanged = PR_TRUE; diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 7a4e161f41f..b5150943dcf 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -739,16 +739,16 @@ NS_IMETHODIMP nsWebShellWindow::LoadMenuItem( keyElement->GetAttribute(altAtom, altValue); keyElement->GetAttribute(commandAtom, commandValue); - if(keyChar != " ") + if(!keyChar.Equals(" ")) pnsMenuItem->SetShortcutChar(keyChar); - if(shiftValue == "true") + if(shiftValue.Equals("true")) modifiers |= knsMenuItemShiftModifier; - if(altValue == "true") + if(altValue.Equals("true")) modifiers |= knsMenuItemAltModifier; - if(commandValue == "false") + if(commandValue.Equals("false")) modifiers |= knsMenuItemCommandModifier; pnsMenuItem->SetModifiers(modifiers); diff --git a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp index 157845d68da..931a98ee708 100644 --- a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp +++ b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp @@ -438,7 +438,7 @@ NS_IMETHODIMP nsWindowMediator::UpdateWindowTitle( nsIXULWindow* inWindow, cons GetAttribute( inWindow, typeAttrib, displayString ); displayString.ToLowerCase(); - if ( displayString=="false" ) + if ( displayString.Equals("false") ) display=PR_FALSE; rv = Assert( window , kNC_Name, newTitle, display ); diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.cpp b/mozilla/xpfe/appshell/src/nsXULWindow.cpp index dd098392395..ab459d00b40 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsXULWindow.cpp @@ -773,7 +773,7 @@ NS_IMETHODIMP nsXULWindow::LoadTitleFromXUL() nsAutoString windowTitle; docShellElement->GetAttribute("title", windowTitle); - if(windowTitle == "") + if(windowTitle.IsEmpty()) return NS_OK; NS_ENSURE_SUCCESS(EnsureChromeTreeOwner(), NS_ERROR_FAILURE); diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp index 5c481cbe28a..04dbc656ac4 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp @@ -639,7 +639,7 @@ nsBrowserAppCore::UpdateGoMenu() } nsString nodeid; rv = childElement->GetAttribute(nsAutoString("id"), nodeid); - if (nodeid == "gomenu") { + if (nodeid.Equals("gomenu")) { goMenuNode = child; break; } @@ -738,7 +738,7 @@ nsBrowserAppCore::ClearHistoryPopup(nsIDOMNode * aParent) nsString attrname("ishist"); nsString attrvalue; rv = childElement->GetAttribute(attrname, attrvalue); - if (NS_SUCCEEDED(rv) && attrvalue == "true") { + if (NS_SUCCEEDED(rv) && attrvalue.Equals("true")) { // It is a history menu item. Remove it nsCOMPtr ret; rv = menu->RemoveChild(child, getter_AddRefs(ret));