diff --git a/accessible/src/atk/nsAppRootAccessible.cpp b/accessible/src/atk/nsAppRootAccessible.cpp index 7d231a74ed4e..0969628874e4 100644 --- a/accessible/src/atk/nsAppRootAccessible.cpp +++ b/accessible/src/atk/nsAppRootAccessible.cpp @@ -568,13 +568,13 @@ NS_IMETHODIMP nsAppRootAccessible::Shutdown() NS_IMETHODIMP nsAppRootAccessible::GetName(nsAString& _retval) { - _retval = NS_LITERAL_STRING("Mozilla"); + _retval.AssignLiteral("Mozilla"); return NS_OK; } NS_IMETHODIMP nsAppRootAccessible::GetDescription(nsAString& aDescription) { - aDescription = NS_LITERAL_STRING("Mozilla Root Accessible"); + aDescription.AssignLiteral("Mozilla Root Accessible"); return NS_OK; } diff --git a/accessible/src/atk/nsHTMLFormControlAccessibleWrap.cpp b/accessible/src/atk/nsHTMLFormControlAccessibleWrap.cpp index 03966a021176..e63408df81c9 100644 --- a/accessible/src/atk/nsHTMLFormControlAccessibleWrap.cpp +++ b/accessible/src/atk/nsHTMLFormControlAccessibleWrap.cpp @@ -68,7 +68,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessibleWrap::GetExtState(PRUint32 *aState) if (NS_SUCCEEDED(rv) && htmlFormElement) { nsAutoString typeString; htmlFormElement->GetType(typeString); - if (typeString.EqualsIgnoreCase("text")) + if (typeString.LowerCaseEqualsLiteral("text")) *aState |= STATE_SINGLE_LINE; } return NS_OK; diff --git a/accessible/src/atk/nsMaiInterfaceAction.cpp b/accessible/src/atk/nsMaiInterfaceAction.cpp index 82f7c35093ce..819a3bc92343 100644 --- a/accessible/src/atk/nsMaiInterfaceAction.cpp +++ b/accessible/src/atk/nsMaiInterfaceAction.cpp @@ -214,7 +214,7 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex) } } else //don't have accesskey - allKeyBinding = NS_LITERAL_STRING(";"); + allKeyBinding.AssignLiteral(";"); //get shortcut nsAutoString keyBinding, subShortcut; @@ -235,8 +235,8 @@ getKeyBindingCB(AtkAction *aAction, gint aActionIndex) keyBinding.Mid(subString, oldPos, curPos - oldPos); //change "Ctrl" to "Control" - if (subString.EqualsIgnoreCase("ctrl")) - subString = NS_LITERAL_STRING("Control"); + if (subString.LowerCaseEqualsLiteral("ctrl")) + subString.AssignLiteral("Control"); subShortcut += NS_LITERAL_STRING("<") + subString + NS_LITERAL_STRING(">"); diff --git a/accessible/src/atk/nsXULFormControlAccessibleWrap.cpp b/accessible/src/atk/nsXULFormControlAccessibleWrap.cpp index 8b9a11bce8ca..c95d81cd26b9 100644 --- a/accessible/src/atk/nsXULFormControlAccessibleWrap.cpp +++ b/accessible/src/atk/nsXULFormControlAccessibleWrap.cpp @@ -88,7 +88,7 @@ NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::SetCurrentValue(double aValue, P PRUint32 value = PRUint32(aValue * 100.0 + 0.5); nsAutoString valueString; valueString.AppendInt(value); - valueString.Append(NS_LITERAL_STRING("%")); + valueString.AppendLiteral("%"); if (NS_SUCCEEDED(element->SetAttribute(NS_LITERAL_STRING("value"), valueString))) { *_retval = PR_TRUE; return NS_OK; diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 51220c313aa6..2994004c7506 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -1629,7 +1629,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode, // Please leave this in for now, it's a convenient debugging method nsAutoString name; aNode->GetLocalName(name); - if (name.EqualsIgnoreCase("ol")) + if (name.LowerCaseEqualsLiteral("ol")) printf("## aaronl debugging tag name\n"); nsAutoString attrib; diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 191ac38fc00e..c9d102764552 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -181,9 +181,9 @@ NS_IMETHODIMP nsAccessible::GetKeyboardShortcut(nsAString& _retval) } nsAutoString propertyKey; switch (gGeneralAccesskeyModifier) { - case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey = NS_LITERAL_STRING("VK_CONTROL"); break; - case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey = NS_LITERAL_STRING("VK_ALT"); break; - case nsIDOMKeyEvent::DOM_VK_META: propertyKey = NS_LITERAL_STRING("VK_META"); break; + case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey.AssignLiteral("VK_CONTROL"); break; + case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey.AssignLiteral("VK_ALT"); break; + case nsIDOMKeyEvent::DOM_VK_META: propertyKey.AssignLiteral("VK_META"); break; } if (!propertyKey.IsEmpty()) nsAccessible::GetFullKeyName(propertyKey, accesskey, _retval); @@ -1044,7 +1044,7 @@ NS_IMETHODIMP nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent nsCOMPtr brElement(do_QueryInterface(aContent)); if (brElement) { // If it's a line break, insert a space so that words aren't jammed together - aFlatString->Append(NS_LITERAL_STRING("\r\n")); + aFlatString->AppendLiteral("\r\n"); return NS_OK; } diff --git a/accessible/src/base/nsDocAccessible.cpp b/accessible/src/base/nsDocAccessible.cpp index c90118aee7e8..fc6d5adb6442 100644 --- a/accessible/src/base/nsDocAccessible.cpp +++ b/accessible/src/base/nsDocAccessible.cpp @@ -226,7 +226,7 @@ NS_IMETHODIMP nsDocAccessible::GetDocType(nsAString& aDocType) #ifdef MOZ_XUL nsCOMPtr xulDoc(do_QueryInterface(mDocument)); if (xulDoc) { - aDocType = NS_LITERAL_STRING("window"); // doctype not implemented for XUL at time of writing - causes assertion + aDocType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion return NS_OK; } else #endif diff --git a/accessible/src/base/nsFormControlAccessible.cpp b/accessible/src/base/nsFormControlAccessible.cpp index 8555266c9c1b..a26976d656dc 100644 --- a/accessible/src/base/nsFormControlAccessible.cpp +++ b/accessible/src/base/nsFormControlAccessible.cpp @@ -71,7 +71,7 @@ NS_IMETHODIMP nsFormControlAccessible::GetState(PRUint32 *_retval) htmlFormElement->GetDisabled(&disabled); nsAutoString typeString; htmlFormElement->GetType(typeString); - if (typeString.EqualsIgnoreCase("password")) + if (typeString.LowerCaseEqualsLiteral("password")) *_retval |= STATE_PROTECTED; } else { diff --git a/accessible/src/base/nsRootAccessible.cpp b/accessible/src/base/nsRootAccessible.cpp index 482f7d53f863..81ce932b1bba 100644 --- a/accessible/src/base/nsRootAccessible.cpp +++ b/accessible/src/base/nsRootAccessible.cpp @@ -334,7 +334,7 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) targetNode->GetLocalName(localName); #ifdef DEBUG_aleventhal // Very useful for debugging, please leave this here. - if (eventType.EqualsIgnoreCase("DOMMenuItemActive")) { + if (eventType.LowerCaseEqualsLiteral("dommenuitemactive")) { printf("debugging events"); } if (localName.EqualsIgnoreCase("tree")) { @@ -402,9 +402,9 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) #ifndef MOZ_ACCESSIBILITY_ATK #ifdef MOZ_XUL // tree event - if (treeItemAccessible && (eventType.EqualsIgnoreCase("DOMMenuItemActive") || - eventType.EqualsIgnoreCase("select") || - eventType.EqualsIgnoreCase("focus"))) { + if (treeItemAccessible && (eventType.LowerCaseEqualsLiteral("dommenuitemactive") || + eventType.LowerCaseEqualsLiteral("select") || + eventType.LowerCaseEqualsLiteral("focus"))) { FireAccessibleFocusEvent(accessible, targetNode); // Tree has focus privAcc = do_QueryInterface(treeItemAccessible); privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS, @@ -415,19 +415,19 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) } #endif - if (eventType.EqualsIgnoreCase("unload")) { + if (eventType.LowerCaseEqualsLiteral("unload")) { nsCOMPtr privateAccDoc = do_QueryInterface(accessible); if (privateAccDoc) { privateAccDoc->Destroy(); } } - else if (eventType.EqualsIgnoreCase("focus") || - eventType.EqualsIgnoreCase("DOMMenuItemActive")) { + else if (eventType.LowerCaseEqualsLiteral("focus") || + eventType.LowerCaseEqualsLiteral("dommenuitemactive")) { if (optionTargetNode && NS_SUCCEEDED(mAccService->GetAccessibleInShell(optionTargetNode, eventShell, getter_AddRefs(accessible)))) { - if (eventType.EqualsIgnoreCase("focus")) { + if (eventType.LowerCaseEqualsLiteral("focus")) { nsCOMPtr selectAccessible; mAccService->GetAccessibleInShell(targetNode, eventShell, getter_AddRefs(selectAccessible)); @@ -440,15 +440,15 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) else FireAccessibleFocusEvent(accessible, targetNode); } - else if (eventType.EqualsIgnoreCase("ValueChange")) { + else if (eventType.LowerCaseEqualsLiteral("valuechange")) { privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE, accessible, nsnull); } - else if (eventType.EqualsIgnoreCase("CheckboxStateChange")) { + else if (eventType.LowerCaseEqualsLiteral("checkboxstatechange")) { privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, accessible, nsnull); } - else if (eventType.EqualsIgnoreCase("RadioStateChange") ) { + else if (eventType.LowerCaseEqualsLiteral("radiostatechange") ) { // first the XUL radio buttons if (targetNode && NS_SUCCEEDED(mAccService->GetAccessibleInShell(targetNode, eventShell, @@ -462,9 +462,9 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) accessible, nsnull); } } - else if (eventType.EqualsIgnoreCase("DOMMenuBarActive")) + else if (eventType.LowerCaseEqualsLiteral("dommenubaractive")) privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUSTART, accessible, nsnull); - else if (eventType.EqualsIgnoreCase("DOMMenuBarInactive")) { + else if (eventType.LowerCaseEqualsLiteral("dommenubarinactive")) { privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUEND, accessible, nsnull); GetFocusedChild(getter_AddRefs(accessible)); if (accessible) { @@ -475,9 +475,9 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) else { // Menu popup events PRUint32 menuEvent = 0; - if (eventType.EqualsIgnoreCase("popupshowing")) + if (eventType.LowerCaseEqualsLiteral("popupshowing")) menuEvent = nsIAccessibleEvent::EVENT_MENUPOPUPSTART; - else if (eventType.EqualsIgnoreCase("popuphiding")) + else if (eventType.LowerCaseEqualsLiteral("popuphiding")) menuEvent = nsIAccessibleEvent::EVENT_MENUPOPUPEND; if (menuEvent) { PRUint32 role = ROLE_NOTHING; @@ -488,15 +488,15 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) } #else AtkStateChange stateData; - if (eventType.EqualsIgnoreCase("unload")) { + if (eventType.LowerCaseEqualsLiteral("unload")) { nsCOMPtr privateAccDoc = do_QueryInterface(accessible); if (privateAccDoc) { privateAccDoc->Destroy(); } } - else if (eventType.EqualsIgnoreCase("focus") || - eventType.EqualsIgnoreCase("DOMMenuItemActive")) { + else if (eventType.LowerCaseEqualsLiteral("focus") || + eventType.LowerCaseEqualsLiteral("dommenuitemactive")) { if (treeItemAccessible) { // use focused treeitem privAcc = do_QueryInterface(treeItemAccessible); privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS, @@ -517,37 +517,37 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) else FireAccessibleFocusEvent(accessible, targetNode); } - else if (eventType.EqualsIgnoreCase("select")) { + else if (eventType.LowerCaseEqualsLiteral("select")) { if (treeItemAccessible) { // it's a XUL // use EVENT_FOCUS instead of EVENT_ATK_SELECTION_CHANGE privAcc = do_QueryInterface(treeItemAccessible); privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS, treeItemAccessible, nsnull); - } + } } #if 0 // XXX todo: value change events for ATK are done with // AtkPropertyChange, PROP_VALUE. Need the old and new value. // Not sure how we'll get the old value. - else if (eventType.EqualsIgnoreCase("ValueChange")) { + else if (eventType.LowerCaseEqualsLiteral("valuechange")) { privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE, accessible, nsnull); } #endif - else if (eventType.EqualsIgnoreCase("CheckboxStateChange") || // it's a XUL - eventType.EqualsIgnoreCase("RadioStateChange")) { // it's a XUL + else if (eventType.LowerCaseEqualsLiteral("checkboxstatechange") || // it's a XUL + eventType.LowerCaseEqualsLiteral("radiostatechange")) { // it's a XUL accessible->GetState(&stateData.state); stateData.enable = (stateData.state & STATE_CHECKED) != 0; stateData.state = STATE_CHECKED; privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, accessible, &stateData); - if (eventType.EqualsIgnoreCase("RadioStateChange")) { + if (eventType.LowerCaseEqualsLiteral("radiostatechange")) { FireAccessibleFocusEvent(accessible, targetNode); } } - else if (eventType.EqualsIgnoreCase("popupshowing")) { + else if (eventType.LowerCaseEqualsLiteral("popupshowing")) { FireAccessibleFocusEvent(accessible, targetNode); } - else if (eventType.EqualsIgnoreCase("popuphiding")) { + else if (eventType.LowerCaseEqualsLiteral("popuphiding")) { //FireAccessibleFocusEvent(accessible, targetNode); } #endif diff --git a/accessible/src/html/nsHTMLFormControlAccessible.cpp b/accessible/src/html/nsHTMLFormControlAccessible.cpp index 63d8f05be225..718404f0ad05 100644 --- a/accessible/src/html/nsHTMLFormControlAccessible.cpp +++ b/accessible/src/html/nsHTMLFormControlAccessible.cpp @@ -186,7 +186,7 @@ NS_IMETHODIMP nsHTMLButtonAccessible::GetState(PRUint32 *_retval) nsAutoString buttonType; element->GetAttribute(NS_LITERAL_STRING("type"), buttonType); - if (buttonType.EqualsIgnoreCase("submit")) + if (buttonType.LowerCaseEqualsLiteral("submit")) *_retval |= STATE_DEFAULT; return NS_OK; @@ -271,7 +271,7 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::GetState(PRUint32 *_retval) nsAutoString buttonType; element->GetAttribute(NS_LITERAL_STRING("type"), buttonType); - if (buttonType.EqualsIgnoreCase("submit")) + if (buttonType.LowerCaseEqualsLiteral("submit")) *_retval |= STATE_DEFAULT; return NS_OK; diff --git a/accessible/src/xul/nsXULFormControlAccessible.cpp b/accessible/src/xul/nsXULFormControlAccessible.cpp index a9ca8cbaa7e9..69be0d570f38 100644 --- a/accessible/src/xul/nsXULFormControlAccessible.cpp +++ b/accessible/src/xul/nsXULFormControlAccessible.cpp @@ -256,9 +256,9 @@ NS_IMETHODIMP nsXULDropmarkerAccessible::GetActionName(PRUint8 index, nsAString& { if (index == eAction_Click) { if (DropmarkerOpen(PR_FALSE)) - aResult = NS_LITERAL_STRING("close"); + aResult.AssignLiteral("close"); else - aResult = NS_LITERAL_STRING("open"); + aResult.AssignLiteral("open"); return NS_OK; } @@ -337,9 +337,9 @@ NS_IMETHODIMP nsXULCheckboxAccessible::GetActionName(PRUint8 index, nsAString& _ GetState(&state); if (state & STATE_CHECKED) - _retval = NS_LITERAL_STRING("uncheck"); + _retval.AssignLiteral("uncheck"); else - _retval = NS_LITERAL_STRING("check"); + _retval.AssignLiteral("check"); return NS_OK; } @@ -464,7 +464,7 @@ NS_IMETHODIMP nsXULProgressMeterAccessible::GetValue(nsAString& _retval) NS_ASSERTION(element, "No element for DOM node!"); element->GetAttribute(NS_LITERAL_STRING("value"), _retval); if (!_retval.IsEmpty() && _retval.Last() != '%') - _retval.Append(NS_LITERAL_STRING("%")); + _retval.AppendLiteral("%"); return NS_OK; } diff --git a/accessible/src/xul/nsXULMenuAccessible.cpp b/accessible/src/xul/nsXULMenuAccessible.cpp index ff017f81bec9..9a909d083459 100644 --- a/accessible/src/xul/nsXULMenuAccessible.cpp +++ b/accessible/src/xul/nsXULMenuAccessible.cpp @@ -139,9 +139,9 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetKeyboardShortcut(nsAString& _retval) } nsAutoString propertyKey; switch (gMenuAccesskeyModifier) { - case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey = NS_LITERAL_STRING("VK_CONTROL"); break; - case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey = NS_LITERAL_STRING("VK_ALT"); break; - case nsIDOMKeyEvent::DOM_VK_META: propertyKey = NS_LITERAL_STRING("VK_META"); break; + case nsIDOMKeyEvent::DOM_VK_CONTROL: propertyKey.AssignLiteral("VK_CONTROL"); break; + case nsIDOMKeyEvent::DOM_VK_ALT: propertyKey.AssignLiteral("VK_ALT"); break; + case nsIDOMKeyEvent::DOM_VK_META: propertyKey.AssignLiteral("VK_META"); break; } if (!propertyKey.IsEmpty()) nsAccessible::GetFullKeyName(propertyKey, accesskey, _retval); @@ -372,7 +372,7 @@ NS_IMETHODIMP nsXULMenubarAccessible::GetState(PRUint32 *_retval) NS_IMETHODIMP nsXULMenubarAccessible::GetName(nsAString& _retval) { - _retval = NS_LITERAL_STRING("Application"); + _retval.AssignLiteral("Application"); return NS_OK; } diff --git a/accessible/src/xul/nsXULSelectAccessible.cpp b/accessible/src/xul/nsXULSelectAccessible.cpp index 283ab8c07df4..ea47d261ac17 100644 --- a/accessible/src/xul/nsXULSelectAccessible.cpp +++ b/accessible/src/xul/nsXULSelectAccessible.cpp @@ -287,7 +287,7 @@ NS_IMETHODIMP nsXULSelectListAccessible::GetState(PRUint32 *_retval) nsCOMPtr element(do_QueryInterface(mDOMNode)); NS_ASSERTION(element, "No nsIDOMElement for caption node!"); element->GetAttribute(NS_LITERAL_STRING("seltype"), selectionTypeString) ; - if (selectionTypeString.EqualsIgnoreCase("multiple")) + if (selectionTypeString.LowerCaseEqualsLiteral("multiple")) *_retval |= STATE_MULTISELECTABLE | STATE_EXTSELECTABLE; return NS_OK; diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 4ad63dd5b376..798fb28bdd89 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -755,13 +755,13 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction, switch(aAction) { case nsIXPCSecurityManager::ACCESS_GET_PROPERTY: - stringName.Assign(NS_LITERAL_STRING("GetPropertyDenied")); + stringName.AssignLiteral("GetPropertyDenied"); break; case nsIXPCSecurityManager::ACCESS_SET_PROPERTY: - stringName.Assign(NS_LITERAL_STRING("SetPropertyDenied")); + stringName.AssignLiteral("SetPropertyDenied"); break; case nsIXPCSecurityManager::ACCESS_CALL_METHOD: - stringName.Assign(NS_LITERAL_STRING("CallMethodDenied")); + stringName.AssignLiteral("CallMethodDenied"); } NS_ConvertUTF8toUTF16 className(classInfoData.GetName()); diff --git a/content/base/src/mozSanitizingSerializer.cpp b/content/base/src/mozSanitizingSerializer.cpp index ed3f4649487c..56baccab8db4 100644 --- a/content/base/src/mozSanitizingSerializer.cpp +++ b/content/base/src/mozSanitizingSerializer.cpp @@ -607,8 +607,7 @@ mozSanitizingHTMLSerializer::SanitizeAttrValue(nsHTMLTag aTag, // Check img src scheme if (aTag == eHTMLTag_img && - anAttrName.Equals(NS_LITERAL_STRING("src"), - nsCaseInsensitiveStringComparator())) + anAttrName.LowerCaseEqualsLiteral("src")) { nsresult rv; nsCOMPtr ioService = do_GetIOService(&rv); diff --git a/content/base/src/nsCommentNode.cpp b/content/base/src/nsCommentNode.cpp index a312d9c7881e..b52e99e7649a 100644 --- a/content/base/src/nsCommentNode.cpp +++ b/content/base/src/nsCommentNode.cpp @@ -120,7 +120,7 @@ nsCommentNode::Tag() const NS_IMETHODIMP nsCommentNode::GetNodeName(nsAString& aNodeName) { - aNodeName.Assign(NS_LITERAL_STRING("#comment")); + aNodeName.AssignLiteral("#comment"); return NS_OK; } diff --git a/content/base/src/nsContentAreaDragDrop.cpp b/content/base/src/nsContentAreaDragDrop.cpp index 9b90ef2636ec..cf3a49132608 100644 --- a/content/base/src/nsContentAreaDragDrop.cpp +++ b/content/base/src/nsContentAreaDragDrop.cpp @@ -1162,11 +1162,11 @@ nsTransferableFactory::Produce(nsITransferable** outTrans) mIsAnchor = PR_TRUE; GetAnchorURL(area, mUrlString); // gives an absolute link - mHtmlString = NS_LITERAL_STRING("")); + mHtmlString.AppendLiteral("\">"); mHtmlString.Append(mTitleString); - mHtmlString.Append(NS_LITERAL_STRING("")); + mHtmlString.AppendLiteral(""); } else if (image) { @@ -1268,7 +1268,7 @@ nsTransferableFactory::ConvertStringsToTransferable(nsITransferable** outTrans) // in the drag data if ( !mUrlString.IsEmpty() && mIsAnchor ) { nsAutoString dragData ( mUrlString ); - dragData += NS_LITERAL_STRING("\n"); + dragData.AppendLiteral("\n"); dragData += mTitleString; nsCOMPtr urlPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); if ( !urlPrimitive ) diff --git a/content/base/src/nsContentSink.cpp b/content/base/src/nsContentSink.cpp index d65b7c068a1c..11ea2e91360f 100644 --- a/content/base/src/nsContentSink.cpp +++ b/content/base/src/nsContentSink.cpp @@ -398,7 +398,7 @@ nsContentSink::ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue, else if (aHeader == nsHTMLAtoms::msthemecompatible) { // Disable theming for the presshell if the value is no. nsAutoString value(aValue); - if (value.EqualsIgnoreCase("no")) { + if (value.LowerCaseEqualsLiteral("no")) { nsIPresShell* shell = mDocument->GetShellAt(0); if (shell) { shell->DisableThemeSupport(); @@ -553,22 +553,22 @@ nsContentSink::ProcessLinkHeader(nsIContent* aElement, value++; } - if (attr.EqualsIgnoreCase("rel")) { + if (attr.LowerCaseEqualsLiteral("rel")) { if (rel.IsEmpty()) { rel = value; rel.CompressWhitespace(); } - } else if (attr.EqualsIgnoreCase("title")) { + } else if (attr.LowerCaseEqualsLiteral("title")) { if (title.IsEmpty()) { title = value; title.CompressWhitespace(); } - } else if (attr.EqualsIgnoreCase("type")) { + } else if (attr.LowerCaseEqualsLiteral("type")) { if (type.IsEmpty()) { type = value; type.StripWhitespace(); } - } else if (attr.EqualsIgnoreCase("media")) { + } else if (attr.LowerCaseEqualsLiteral("media")) { if (media.IsEmpty()) { media = value; @@ -656,7 +656,7 @@ nsContentSink::ProcessStyleLink(nsIContent* aElement, nsParserUtils::SplitMimeType(aType, mimeType, params); // see bug 18817 - if (!mimeType.IsEmpty() && !mimeType.EqualsIgnoreCase("text/css")) { + if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) { // Unknown stylesheet language return NS_OK; } diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 6afbe27240b8..694d5c2358be 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -1338,8 +1338,7 @@ static inline PRBool IsAutocompleteOff(nsIDOMElement* aElement) { nsAutoString autocomplete; aElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete); - return autocomplete.Equals(NS_LITERAL_STRING("off"), - nsCaseInsensitiveStringComparator()); + return autocomplete.LowerCaseEqualsLiteral("off"); } /*static*/ nsresult diff --git a/content/base/src/nsCopySupport.cpp b/content/base/src/nsCopySupport.cpp index 1916a09f00b5..21b40853ef3a 100644 --- a/content/base/src/nsCopySupport.cpp +++ b/content/base/src/nsCopySupport.cpp @@ -96,11 +96,11 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16 nsAutoString mimeType; if (bIsHTMLCopy) - mimeType = NS_LITERAL_STRING(kHTMLMime); + mimeType.AssignLiteral(kHTMLMime); else { flags |= nsIDocumentEncoder::OutputBodyOnly | nsIDocumentEncoder::OutputPreformatted; - mimeType = NS_LITERAL_STRING(kUnicodeMime); + mimeType.AssignLiteral(kUnicodeMime); } rv = docEncoder->Init(aDoc, mimeType, flags); diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index ad36db07597f..f9b3ca9241ec 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -2936,7 +2936,7 @@ nsDocument::SetDir(const nsAString& aDirection) NS_IMETHODIMP nsDocument::GetNodeName(nsAString& aNodeName) { - aNodeName.Assign(NS_LITERAL_STRING("#document")); + aNodeName.AssignLiteral("#document"); return NS_OK; } @@ -3538,7 +3538,7 @@ nsDocument::GetXmlVersion(nsAString& aXmlVersion) // If there is no declaration, the value is "1.0". // XXX We only support "1.0", so always output "1.0" until that changes. - aXmlVersion.Assign(NS_LITERAL_STRING("1.0")); + aXmlVersion.AssignLiteral("1.0"); return NS_OK; } @@ -4021,7 +4021,7 @@ nsDocument::GetXMLDeclaration(nsAString& aVersion, nsAString& aEncoding, } // always until we start supporting 1.1 etc. - aVersion.Assign(NS_LITERAL_STRING("1.0")); + aVersion.AssignLiteral("1.0"); if (mXMLDeclarationBits & XML_DECLARATION_BITS_ENCODING_EXISTS) { // This is what we have stored, not necessarily what was written @@ -4031,9 +4031,9 @@ nsDocument::GetXMLDeclaration(nsAString& aVersion, nsAString& aEncoding, if (mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_EXISTS) { if (mXMLDeclarationBits & XML_DECLARATION_BITS_STANDALONE_YES) { - aStandalone.Assign(NS_LITERAL_STRING("yes")); + aStandalone.AssignLiteral("yes"); } else { - aStandalone.Assign(NS_LITERAL_STRING("no")); + aStandalone.AssignLiteral("no"); } } } diff --git a/content/base/src/nsDocumentEncoder.cpp b/content/base/src/nsDocumentEncoder.cpp index 5d244ea0b934..ac1889fa3093 100644 --- a/content/base/src/nsDocumentEncoder.cpp +++ b/content/base/src/nsDocumentEncoder.cpp @@ -181,7 +181,7 @@ NS_INTERFACE_MAP_END nsDocumentEncoder::nsDocumentEncoder() { - mMimeType.Assign(NS_LITERAL_STRING("text/plain")); + mMimeType.AssignLiteral("text/plain"); mFlags = 0; mWrapColumn = 72; @@ -951,7 +951,7 @@ nsDocumentEncoder::EncodeToStream(nsIOutputStream* aStream) getter_AddRefs(mUnicodeEncoder)); NS_ENSURE_SUCCESS(rv, rv); - if (mMimeType.EqualsIgnoreCase("text/plain")) { + if (mMimeType.LowerCaseEqualsLiteral("text/plain")) { rv = mUnicodeEncoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, '?'); NS_ENSURE_SUCCESS(rv, rv); } @@ -1072,7 +1072,7 @@ nsHTMLCopyEncoder::Init(nsIDocument* aDocument, mIsCopying = PR_TRUE; mDocument = aDocument; - mMimeType = NS_LITERAL_STRING("text/html"); + mMimeType.AssignLiteral("text/html"); // Make all links absolute when copying // (see related bugs #57296, #41924, #58646, #32768) @@ -1150,7 +1150,7 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection) if (mIsTextWidget) { mSelection = aSelection; - mMimeType = NS_LITERAL_STRING("text/plain"); + mMimeType.AssignLiteral("text/plain"); return NS_OK; } diff --git a/content/base/src/nsDocumentViewer.cpp b/content/base/src/nsDocumentViewer.cpp index c77c4b34d736..22be08450d94 100644 --- a/content/base/src/nsDocumentViewer.cpp +++ b/content/base/src/nsDocumentViewer.cpp @@ -2378,7 +2378,7 @@ DocumentViewerImpl::GetDefaultCharacterSet(nsACString& aDefaultCharacterSet) if (!defCharset.IsEmpty()) LossyCopyUTF16toASCII(defCharset, mDefaultCharacterSet); else - mDefaultCharacterSet.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + mDefaultCharacterSet.AssignLiteral("ISO-8859-1"); } aDefaultCharacterSet = mDefaultCharacterSet; return NS_OK; diff --git a/content/base/src/nsFrameLoader.cpp b/content/base/src/nsFrameLoader.cpp index 41aac8b1f219..70f1f655d623 100644 --- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -168,7 +168,7 @@ nsFrameLoader::LoadFrame() src.Trim(" \t\n\r"); if (src.IsEmpty()) { - src.Assign(NS_LITERAL_STRING("about:blank")); + src.AssignLiteral("about:blank"); } // Make an absolute URI diff --git a/content/base/src/nsGenericDOMDataNode.cpp b/content/base/src/nsGenericDOMDataNode.cpp index 802f047de12a..01a2546a5c68 100644 --- a/content/base/src/nsGenericDOMDataNode.cpp +++ b/content/base/src/nsGenericDOMDataNode.cpp @@ -552,11 +552,11 @@ nsGenericDOMDataNode::ToCString(nsAString& aBuf, PRInt32 aOffset, while (cp < end) { PRUnichar ch = *cp++; if (ch == '\r') { - aBuf.Append(NS_LITERAL_STRING("\\r")); + aBuf.AppendLiteral("\\r"); } else if (ch == '\n') { - aBuf.Append(NS_LITERAL_STRING("\\n")); + aBuf.AppendLiteral("\\n"); } else if (ch == '\t') { - aBuf.Append(NS_LITERAL_STRING("\\t")); + aBuf.AppendLiteral("\\t"); } else if ((ch < ' ') || (ch >= 127)) { char buf[10]; PR_snprintf(buf, sizeof(buf), "\\u%04x", ch); @@ -572,11 +572,11 @@ nsGenericDOMDataNode::ToCString(nsAString& aBuf, PRInt32 aOffset, while (cp < end) { PRUnichar ch = *cp++; if (ch == '\r') { - aBuf.Append(NS_LITERAL_STRING("\\r")); + aBuf.AppendLiteral("\\r"); } else if (ch == '\n') { - aBuf.Append(NS_LITERAL_STRING("\\n")); + aBuf.AppendLiteral("\\n"); } else if (ch == '\t') { - aBuf.Append(NS_LITERAL_STRING("\\t")); + aBuf.AppendLiteral("\\t"); } else if ((ch < ' ') || (ch >= 127)) { char buf[10]; PR_snprintf(buf, sizeof(buf), "\\u%04x", ch); diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 602f6f6e4983..4c69b3c7f115 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -3481,7 +3481,7 @@ nsGenericElement::List(FILE* out, PRInt32 aIndent) const mAttrsAndChildren.GetSafeAttrNameAt(index)->GetQualifiedName(buffer); // value - buffer.Append(NS_LITERAL_STRING("=")); + buffer.AppendLiteral("="); nsAutoString value; mAttrsAndChildren.AttrAt(index)->ToString(value); buffer.Append(value); diff --git a/content/base/src/nsHTMLContentSerializer.cpp b/content/base/src/nsHTMLContentSerializer.cpp index 030e9c7e73ad..f2b9ea2aaa6b 100644 --- a/content/base/src/nsHTMLContentSerializer.cpp +++ b/content/base/src/nsHTMLContentSerializer.cpp @@ -124,13 +124,13 @@ nsHTMLContentSerializer::Init(PRUint32 aFlags, PRUint32 aWrapColumn, // Set the line break character: if ((mFlags & nsIDocumentEncoder::OutputCRLineBreak) && (mFlags & nsIDocumentEncoder::OutputLFLineBreak)) { // Windows - mLineBreak.Assign(NS_LITERAL_STRING("\r\n")); + mLineBreak.AssignLiteral("\r\n"); } else if (mFlags & nsIDocumentEncoder::OutputCRLineBreak) { // Mac - mLineBreak.Assign(NS_LITERAL_STRING("\r")); + mLineBreak.AssignLiteral("\r"); } else if (mFlags & nsIDocumentEncoder::OutputLFLineBreak) { // Unix/DOM - mLineBreak.Assign(NS_LITERAL_STRING("\n")); + mLineBreak.AssignLiteral("\n"); } else { mLineBreak.AssignWithConversion(NS_LINEBREAK); // Platform/default @@ -1303,7 +1303,7 @@ nsHTMLContentSerializer::SerializeLIValueAttribute(nsIDOMElement* aElement, if (currElement) { nsAutoString tagName; currElement->GetTagName(tagName); - if (tagName.EqualsIgnoreCase("LI")) { + if (tagName.LowerCaseEqualsLiteral("li")) { currElement->GetAttribute(NS_LITERAL_STRING("value"), valueStr); if (valueStr.IsEmpty()) offset++; @@ -1351,7 +1351,7 @@ nsHTMLContentSerializer::IsFirstChildOfOL(nsIDOMElement* aElement){ else return PR_FALSE; - if (parentName.EqualsIgnoreCase("OL")) { + if (parentName.LowerCaseEqualsLiteral("ol")) { olState defaultOLState(0, PR_FALSE); olState* state = nsnull; if (mOLStateStack.Count() > 0) diff --git a/content/base/src/nsParserUtils.cpp b/content/base/src/nsParserUtils.cpp index b89c35bab33c..2d278225b1d1 100644 --- a/content/base/src/nsParserUtils.cpp +++ b/content/base/src/nsParserUtils.cpp @@ -128,27 +128,27 @@ nsParserUtils::IsJavaScriptLanguage(const nsString& aName, const char* *aVersion { JSVersion version = JSVERSION_UNKNOWN; - if (aName.EqualsIgnoreCase("JavaScript") || - aName.EqualsIgnoreCase("LiveScript") || - aName.EqualsIgnoreCase("Mocha")) { + if (aName.LowerCaseEqualsLiteral("javascript") || + aName.LowerCaseEqualsLiteral("livescript") || + aName.LowerCaseEqualsLiteral("mocha")) { version = JSVERSION_DEFAULT; } - else if (aName.EqualsIgnoreCase("JavaScript1.0")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.0")) { version = JSVERSION_1_0; } - else if (aName.EqualsIgnoreCase("JavaScript1.1")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.1")) { version = JSVERSION_1_1; } - else if (aName.EqualsIgnoreCase("JavaScript1.2")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.2")) { version = JSVERSION_1_2; } - else if (aName.EqualsIgnoreCase("JavaScript1.3")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.3")) { version = JSVERSION_1_3; } - else if (aName.EqualsIgnoreCase("JavaScript1.4")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.4")) { version = JSVERSION_1_4; } - else if (aName.EqualsIgnoreCase("JavaScript1.5")) { + else if (aName.LowerCaseEqualsLiteral("javascript1.5")) { version = JSVERSION_1_5; } if (version == JSVERSION_UNKNOWN) diff --git a/content/base/src/nsPlainTextSerializer.cpp b/content/base/src/nsPlainTextSerializer.cpp index 3b9c7ec49cf9..6cfdfe3c6f94 100644 --- a/content/base/src/nsPlainTextSerializer.cpp +++ b/content/base/src/nsPlainTextSerializer.cpp @@ -184,7 +184,7 @@ nsPlainTextSerializer::Init(PRUint32 aFlags, PRUint32 aWrapColumn, if ((mFlags & nsIDocumentEncoder::OutputCRLineBreak) && (mFlags & nsIDocumentEncoder::OutputLFLineBreak)) { // Windows - mLineBreak.Assign(NS_LITERAL_STRING("\r\n")); + mLineBreak.AssignLiteral("\r\n"); } else if (mFlags & nsIDocumentEncoder::OutputCRLineBreak) { // Mac @@ -803,7 +803,7 @@ nsPlainTextSerializer::DoOpenContainer(const nsIParserNode* aNode, PRInt32 aTag) nsresult rv = GetAttributeValue(aNode, nsHTMLAtoms::type, value); PRBool isInCiteBlockquote = - NS_SUCCEEDED(rv) && value.EqualsIgnoreCase("cite"); + NS_SUCCEEDED(rv) && value.LowerCaseEqualsLiteral("cite"); // Push PushBool(mIsInCiteBlockquote, isInCiteBlockquote); if (isInCiteBlockquote) { @@ -1058,7 +1058,7 @@ nsPlainTextSerializer::DoCloseContainer(PRInt32 aTag) } else if (type == eHTMLTag_a && !currentNodeIsConverted && !mURL.IsEmpty()) { nsAutoString temp; - temp.Assign(NS_LITERAL_STRING(" <")); + temp.AssignLiteral(" <"); temp += mURL; temp.Append(PRUnichar('>')); Write(temp); diff --git a/content/base/src/nsPrintEngine.cpp b/content/base/src/nsPrintEngine.cpp index 810e87a06464..7be793d62fac 100644 --- a/content/base/src/nsPrintEngine.cpp +++ b/content/base/src/nsPrintEngine.cpp @@ -2230,7 +2230,7 @@ nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, PRBool aIsPrinting) switch(aPrintError) { -#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName = NS_LITERAL_STRING(#nserr); break; +#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName.AssignLiteral(#nserr); break; NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND) NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_FAILURE) NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE) @@ -3411,14 +3411,14 @@ nsPrintEngine::ElipseLongString(PRUnichar *& aStr, const PRUint32 aLen, PRBool a if (aDoFront) { PRUnichar * ptr = &aStr[nsCRT::strlen(aStr)-aLen+3]; nsAutoString newStr; - newStr.AppendWithConversion("..."); + newStr.AppendLiteral("..."); newStr += ptr; nsMemory::Free(aStr); aStr = ToNewUnicode(newStr); } else { nsAutoString newStr(aStr); newStr.SetLength(aLen-3); - newStr.AppendWithConversion("..."); + newStr.AppendLiteral("..."); nsMemory::Free(aStr); aStr = ToNewUnicode(newStr); } diff --git a/content/base/src/nsRange.cpp b/content/base/src/nsRange.cpp index 47323fe32e10..7a888f8d0e10 100644 --- a/content/base/src/nsRange.cpp +++ b/content/base/src/nsRange.cpp @@ -2466,7 +2466,7 @@ nsRange::CreateContextualFragment(const nsAString& aFragment, } else { // Who're we kidding. This only works for html. - contentType = NS_LITERAL_CSTRING("text/html"); + contentType.AssignLiteral("text/html"); } // If there's no JS or system JS running, diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index 8259fad505c5..d18876373385 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -301,8 +301,7 @@ nsScriptLoader::IsScriptEventHandler(nsIDOMHTMLScriptElement *aScriptElement) const nsAString& for_str = nsContentUtils::TrimWhitespace(str); - if (!for_str.Equals(NS_LITERAL_STRING("window"), - nsCaseInsensitiveStringComparator())) { + if (!for_str.LowerCaseEqualsLiteral("window")) { return PR_TRUE; } @@ -405,8 +404,8 @@ nsScriptLoader::ProcessScriptElement(nsIDOMHTMLScriptElement *aElement, nsAutoString params; nsParserUtils::SplitMimeType(type, mimeType, params); - isJavaScript = mimeType.EqualsIgnoreCase("application/x-javascript") || - mimeType.EqualsIgnoreCase("text/javascript"); + isJavaScript = mimeType.LowerCaseEqualsLiteral("application/x-javascript") || + mimeType.LowerCaseEqualsLiteral("text/javascript"); if (isJavaScript) { JSVersion jsVersion = JSVERSION_DEFAULT; if (params.Find("version=", PR_TRUE) == 0) { @@ -818,7 +817,7 @@ nsScriptLoader::OnStreamComplete(nsIStreamLoader* aLoader, if (characterSet.IsEmpty()) { // fall back to ISO-8859-1, see bug 118404 - characterSet = NS_LITERAL_CSTRING("ISO-8859-1"); + characterSet.AssignLiteral("ISO-8859-1"); } nsCOMPtr charsetConv = diff --git a/content/base/src/nsStyleLinkElement.cpp b/content/base/src/nsStyleLinkElement.cpp index 9c13935c0762..d07e114f09e4 100644 --- a/content/base/src/nsStyleLinkElement.cpp +++ b/content/base/src/nsStyleLinkElement.cpp @@ -250,7 +250,7 @@ nsStyleLinkElement::UpdateStyleSheet(nsIDocument *aOldDocument, GetStyleSheetInfo(title, type, media, &isAlternate); - if (!type.EqualsIgnoreCase("text/css")) { + if (!type.LowerCaseEqualsLiteral("text/css")) { return NS_OK; } diff --git a/content/base/src/nsTextNode.cpp b/content/base/src/nsTextNode.cpp index 8c8bf424abe7..1af51539c048 100644 --- a/content/base/src/nsTextNode.cpp +++ b/content/base/src/nsTextNode.cpp @@ -168,7 +168,7 @@ nsTextNode::Tag() const NS_IMETHODIMP nsTextNode::GetNodeName(nsAString& aNodeName) { - aNodeName.Assign(NS_LITERAL_STRING("#text")); + aNodeName.AssignLiteral("#text"); return NS_OK; } diff --git a/content/base/src/nsXMLContentSerializer.cpp b/content/base/src/nsXMLContentSerializer.cpp index 7d3c5491c1a6..5684cccd0374 100644 --- a/content/base/src/nsXMLContentSerializer.cpp +++ b/content/base/src/nsXMLContentSerializer.cpp @@ -378,7 +378,7 @@ nsXMLContentSerializer::ConfirmPrefix(nsAString& aPrefix, } // If we don't have a prefix, create one else if (aPrefix.IsEmpty()) { - aPrefix.Assign(NS_LITERAL_STRING("a")); + aPrefix.AssignLiteral("a"); char buf[128]; PR_snprintf(buf, sizeof(buf), "%d", mPrefixIndex++); AppendASCIItoUTF16(buf, aPrefix); @@ -865,7 +865,7 @@ nsXMLContentSerializer::AppendDocumentStart(nsIDOMDocument *aDocument, aStr += NS_LITERAL_STRING(" standalone=\"") + standalone + endQuote; } - aStr += NS_LITERAL_STRING("?>"); + aStr.AppendLiteral("?>"); mAddNewline = PR_TRUE; return NS_OK; diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index f96436e7a05d..932594088bfc 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -1569,25 +1569,25 @@ nsDOMEvent::AllocateEvent(const nsAString& aEventType) { //Allocate internal event nsAutoString eventType(aEventType); - if (eventType.EqualsIgnoreCase("MouseEvents")) { + if (eventType.LowerCaseEqualsLiteral("mouseevents")) { mEvent = new nsMouseEvent(); } - else if (eventType.EqualsIgnoreCase("MouseScrollEvents")) { + else if (eventType.LowerCaseEqualsLiteral("mousescrollevents")) { mEvent = new nsMouseScrollEvent(); } - else if (eventType.EqualsIgnoreCase("KeyEvents")) { + else if (eventType.LowerCaseEqualsLiteral("keyevents")) { mEvent = new nsKeyEvent(); } - else if (eventType.EqualsIgnoreCase("MutationEvents")) { + else if (eventType.LowerCaseEqualsLiteral("mutationevents")) { mEvent = new nsMutationEvent(); } - else if (eventType.EqualsIgnoreCase("PopupEvents")) { + else if (eventType.LowerCaseEqualsLiteral("popupevents")) { mEvent = new nsGUIEvent(); } - else if (eventType.EqualsIgnoreCase("PopupBlockedEvents")) { + else if (eventType.LowerCaseEqualsLiteral("popupblockedevents")) { mEvent = new nsPopupBlockedEvent(); } - else if (eventType.EqualsIgnoreCase("UIEvents")) { + else if (eventType.LowerCaseEqualsLiteral("uievents")) { mEvent = new nsDOMUIEvent(); } else { diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp index 1b930a7957a0..98e2063a2229 100644 --- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -1606,19 +1606,19 @@ nsEventListenerManager::CreateEvent(nsIPresContext* aPresContext, *aDOMEvent = nsnull; nsAutoString str(aEventType); - if (!aEvent && !str.EqualsIgnoreCase("MouseEvents") && - !str.EqualsIgnoreCase("KeyEvents") && - !str.EqualsIgnoreCase("HTMLEvents") && - !str.EqualsIgnoreCase("MutationEvents") && - !str.EqualsIgnoreCase("MouseScrollEvents") && - !str.EqualsIgnoreCase("PopupBlockedEvents") && - !str.EqualsIgnoreCase("UIEvents") && - !str.EqualsIgnoreCase("Events")) { + if (!aEvent && !str.LowerCaseEqualsLiteral("mouseevents") && + !str.LowerCaseEqualsLiteral("keyevents") && + !str.LowerCaseEqualsLiteral("htmlevents") && + !str.LowerCaseEqualsLiteral("mutationevents") && + !str.LowerCaseEqualsLiteral("mousescrollevents") && + !str.LowerCaseEqualsLiteral("popupblockedevents") && + !str.LowerCaseEqualsLiteral("uievents") && + !str.LowerCaseEqualsLiteral("events")) { return NS_ERROR_DOM_NOT_SUPPORTED_ERR; } if ((aEvent && aEvent->eventStructType == NS_MUTATION_EVENT) || - (!aEvent && str.EqualsIgnoreCase("MutationEvents"))) + (!aEvent && str.LowerCaseEqualsLiteral("mutationevents"))) return NS_NewDOMMutationEvent(aDOMEvent, aPresContext, aEvent); return NS_NewDOMUIEvent(aDOMEvent, aPresContext, aEventType, aEvent); } diff --git a/content/html/content/src/nsFormSubmission.cpp b/content/html/content/src/nsFormSubmission.cpp index 533103521240..684a1d0f5055 100644 --- a/content/html/content/src/nsFormSubmission.cpp +++ b/content/html/content/src/nsFormSubmission.cpp @@ -447,7 +447,7 @@ HandleMailtoSubject(nsCString& aPath) { aPath.Append('?'); } - aPath += NS_LITERAL_CSTRING("subject=Form%20Post%20From%20Mozilla&"); + aPath.AppendLiteral("subject=Form%20Post%20From%20Mozilla&"); } } @@ -809,7 +809,7 @@ nsFSMultipartFormData::AddNameFilePair(nsIDOMHTMLElement* aSource, // // CRLF after file // - mPostDataChunk += NS_LITERAL_CSTRING(CRLF); + mPostDataChunk.AppendLiteral(CRLF); return NS_OK; } @@ -835,7 +835,7 @@ nsFSMultipartFormData::Init() // // Build boundary // - mBoundary = NS_LITERAL_CSTRING("---------------------------"); + mBoundary.AssignLiteral("---------------------------"); mBoundary.AppendInt(rand()); mBoundary.AppendInt(rand()); mBoundary.AppendInt(rand()); @@ -1258,7 +1258,7 @@ nsFormSubmission::GetSubmitCharset(nsIHTMLContent* aForm, PRUint8 aCtrlsModAtSubmit, nsACString& oCharset) { - oCharset = NS_LITERAL_CSTRING("UTF-8"); // default to utf-8 + oCharset.AssignLiteral("UTF-8"); // default to utf-8 nsresult rv = NS_OK; nsAutoString acceptCharsetValue; @@ -1304,22 +1304,22 @@ nsFormSubmission::GetSubmitCharset(nsIHTMLContent* aForm, && oCharset.Equals(NS_LITERAL_CSTRING("windows-1256"), nsCaseInsensitiveCStringComparator())) { //Mohamed - oCharset = NS_LITERAL_CSTRING("IBM864"); + oCharset.AssignLiteral("IBM864"); } else if (aCtrlsModAtSubmit==IBMBIDI_CONTROLSTEXTMODE_LOGICAL && oCharset.Equals(NS_LITERAL_CSTRING("IBM864"), nsCaseInsensitiveCStringComparator())) { - oCharset = NS_LITERAL_CSTRING("IBM864i"); + oCharset.AssignLiteral("IBM864i"); } else if (aCtrlsModAtSubmit==IBMBIDI_CONTROLSTEXTMODE_VISUAL && oCharset.Equals(NS_LITERAL_CSTRING("ISO-8859-6"), nsCaseInsensitiveCStringComparator())) { - oCharset = NS_LITERAL_CSTRING("IBM864"); + oCharset.AssignLiteral("IBM864"); } else if (aCtrlsModAtSubmit==IBMBIDI_CONTROLSTEXTMODE_VISUAL && oCharset.Equals(NS_LITERAL_CSTRING("UTF-8"), nsCaseInsensitiveCStringComparator())) { - oCharset = NS_LITERAL_CSTRING("IBM864"); + oCharset.AssignLiteral("IBM864"); } } @@ -1337,7 +1337,7 @@ nsFormSubmission::GetEncoder(nsIHTMLContent* aForm, nsCAutoString charset(aCharset); if(charset.EqualsLiteral("ISO-8859-1")) - charset.Assign(NS_LITERAL_CSTRING("windows-1252")); + charset.AssignLiteral("windows-1252"); rv = CallCreateInstance( NS_SAVEASCHARSET_CONTRACTID, aEncoder); NS_ASSERTION(NS_SUCCEEDED(rv), "create nsISaveAsCharset failed"); diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 5138c2ce1683..9be401d7e2fa 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -2040,13 +2040,13 @@ nsGenericHTMLElement::ListAttributes(FILE* out) const // value nsAutoString value; GetAttr(nameSpaceID, attr, value); - buffer.Append(NS_LITERAL_STRING("=\"")); + buffer.AppendLiteral("=\""); for (int i = value.Length(); i >= 0; --i) { if (value[i] == PRUnichar('"')) value.Insert(PRUnichar('\\'), PRUint32(i)); } buffer.Append(value); - buffer.Append(NS_LITERAL_STRING("\"")); + buffer.AppendLiteral("\""); fputs(" ", out); fputs(NS_LossyConvertUCS2toASCII(buffer).get(), out); @@ -3708,7 +3708,7 @@ nsGenericHTMLElement::SetHostInHrefString(const nsAString &aHref, uri->GetPath(path); CopyASCIItoUTF16(scheme, aResult); - aResult.Append(NS_LITERAL_STRING("://")); + aResult.AppendLiteral("://"); if (!userpass.IsEmpty()) { AppendUTF8toUTF16(userpass, aResult); aResult.Append(PRUnichar('@')); @@ -3832,7 +3832,7 @@ nsGenericHTMLElement::GetProtocolFromHrefString(const nsAString& aHref, if (protocol.IsEmpty()) { // set the protocol to http since it is the most likely protocol // to be used. - aProtocol.Assign(NS_LITERAL_STRING("http")); + aProtocol.AssignLiteral("http"); } else { CopyASCIItoUTF16(protocol, aProtocol); } diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 3de964dd7bfc..95d8403cc2af 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -281,7 +281,7 @@ protected: GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, tmp); - return tmp.EqualsIgnoreCase("image"); + return tmp.LowerCaseEqualsLiteral("image"); } /** @@ -630,7 +630,7 @@ nsHTMLInputElement::GetValue(nsAString& aValue) if (rv == NS_CONTENT_ATTR_NOT_THERE && (mType == NS_FORM_INPUT_RADIO || mType == NS_FORM_INPUT_CHECKBOX)) { // The default value of a radio or checkbox input is "on". - aValue.Assign(NS_LITERAL_STRING("on")); + aValue.AssignLiteral("on"); return NS_OK; } @@ -2226,7 +2226,7 @@ nsHTMLInputElement::SubmitNamesValues(nsIFormSubmission* aFormSubmission, nsCAutoString contentType; rv = MIMEService->GetTypeFromFile(file, contentType); if (NS_FAILED(rv)) { - contentType = NS_LITERAL_CSTRING("application/octet-stream"); + contentType.AssignLiteral("application/octet-stream"); } // diff --git a/content/html/content/src/nsHTMLLinkElement.cpp b/content/html/content/src/nsHTMLLinkElement.cpp index 80358abe3e37..a93638d6b6c6 100644 --- a/content/html/content/src/nsHTMLLinkElement.cpp +++ b/content/html/content/src/nsHTMLLinkElement.cpp @@ -227,7 +227,7 @@ nsHTMLLinkElement::CreateAndDispatchEvent(nsIDocument* aDoc, // doing the "right" thing costs virtually nothing here, even if it doesn't // make much sense. if (aRev.IsEmpty() && - (aRel.IsEmpty() || aRel.EqualsIgnoreCase("stylesheet"))) + (aRel.IsEmpty() || aRel.LowerCaseEqualsLiteral("stylesheet"))) return; nsCOMPtr docEvent(do_QueryInterface(aDoc)); @@ -355,13 +355,13 @@ nsHTMLLinkElement::GetStyleSheetInfo(nsAString& aTitle, nsAutoString notUsed; GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, aType); nsParserUtils::SplitMimeType(aType, mimeType, notUsed); - if (!mimeType.IsEmpty() && !mimeType.EqualsIgnoreCase("text/css")) { + if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) { return; } // If we get here we assume that we're loading a css file, so set the // type to 'text/css' - aType.Assign(NS_LITERAL_STRING("text/css")); + aType.AssignLiteral("text/css"); return; } diff --git a/content/html/content/src/nsHTMLSelectElement.cpp b/content/html/content/src/nsHTMLSelectElement.cpp index ce95713db1e5..089c2cc8bf44 100644 --- a/content/html/content/src/nsHTMLSelectElement.cpp +++ b/content/html/content/src/nsHTMLSelectElement.cpp @@ -1015,10 +1015,10 @@ nsHTMLSelectElement::GetType(nsAString& aType) PRBool isMultiple; GetMultiple(&isMultiple); if (isMultiple) { - aType.Assign(NS_LITERAL_STRING("select-multiple")); + aType.AssignLiteral("select-multiple"); } else { - aType.Assign(NS_LITERAL_STRING("select-one")); + aType.AssignLiteral("select-one"); } return NS_OK; diff --git a/content/html/content/src/nsHTMLSharedElement.cpp b/content/html/content/src/nsHTMLSharedElement.cpp index c071e2f90231..f8e2129e7f29 100644 --- a/content/html/content/src/nsHTMLSharedElement.cpp +++ b/content/html/content/src/nsHTMLSharedElement.cpp @@ -376,10 +376,10 @@ SpacerMapAttributesIntoRule(const nsMappedAttributes* aAttributes, const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::type); if (value && value->Type() == nsAttrValue::eString) { nsAutoString tmp(value->GetStringValue()); - if (tmp.EqualsIgnoreCase("line") || - tmp.EqualsIgnoreCase("vert") || - tmp.EqualsIgnoreCase("vertical") || - tmp.EqualsIgnoreCase("block")) { + if (tmp.LowerCaseEqualsLiteral("line") || + tmp.LowerCaseEqualsLiteral("vert") || + tmp.LowerCaseEqualsLiteral("vertical") || + tmp.LowerCaseEqualsLiteral("block")) { // This is not strictly 100% compatible: if the spacer is given // a width of zero then it is basically ignored. aData->mDisplayData->mDisplay = NS_STYLE_DISPLAY_BLOCK; diff --git a/content/html/content/src/nsHTMLStyleElement.cpp b/content/html/content/src/nsHTMLStyleElement.cpp index 273b72e3134c..7adaebbac7ee 100644 --- a/content/html/content/src/nsHTMLStyleElement.cpp +++ b/content/html/content/src/nsHTMLStyleElement.cpp @@ -312,13 +312,13 @@ nsHTMLStyleElement::GetStyleSheetInfo(nsAString& aTitle, nsAutoString mimeType; nsAutoString notUsed; nsParserUtils::SplitMimeType(aType, mimeType, notUsed); - if (!mimeType.IsEmpty() && !mimeType.EqualsIgnoreCase("text/css")) { + if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) { return; } // If we get here we assume that we're loading a css file, so set the // type to 'text/css' - aType.Assign(NS_LITERAL_STRING("text/css")); + aType.AssignLiteral("text/css"); return; } diff --git a/content/html/content/src/nsHTMLTextAreaElement.cpp b/content/html/content/src/nsHTMLTextAreaElement.cpp index 3425b526288d..c2ecbba7388c 100644 --- a/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -349,7 +349,7 @@ NS_IMPL_INT_ATTR(nsHTMLTextAreaElement, TabIndex, tabindex) NS_IMETHODIMP nsHTMLTextAreaElement::GetType(nsAString& aType) { - aType.Assign(NS_LITERAL_STRING("textarea")); + aType.AssignLiteral("textarea"); return NS_OK; } diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index c1e8df1dda9e..fbd9d0bcd4a8 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -470,7 +470,7 @@ public: // nsIRequest NS_IMETHOD GetName(nsACString &result) { - result = NS_LITERAL_CSTRING("about:layout-dummy-request"); + result.AssignLiteral("about:layout-dummy-request"); return NS_OK; } @@ -3486,7 +3486,7 @@ HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode) } if (name.IsEmpty()) { - name.Assign(NS_LITERAL_STRING("HTML")); + name.AssignLiteral("HTML"); } rv = domImpl->CreateDocumentType(name, publicId, systemId, diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index ab68d6ebac84..948bd5921a34 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -590,7 +590,7 @@ nsHTMLDocument::UseWeakDocTypeDefault(PRInt32& aCharsetSource, if (kCharsetFromWeakDocTypeDefault <= aCharsetSource) return PR_TRUE; // fallback value in case docshell return error - aCharset = NS_LITERAL_CSTRING("ISO-8859-1"); + aCharset.AssignLiteral("ISO-8859-1"); const nsAdoptingString& defCharset = nsContentUtils::GetLocalizedStringPref("intl.charset.default"); @@ -796,7 +796,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand, if (IsXHTML()) { charsetSource = kCharsetFromDocTypeDefault; - charset = NS_LITERAL_CSTRING("UTF-8"); + charset.AssignLiteral("UTF-8"); TryChannelCharset(aChannel, charsetSource, charset); } else { charsetSource = kCharsetUninitialized; @@ -858,8 +858,8 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand, // ahmed // Check if 864 but in Implicit mode ! if ((mTexttype == IBMBIDI_TEXTTYPE_LOGICAL) && - (charset.EqualsIgnoreCase("ibm864"))) { - charset = NS_LITERAL_CSTRING("IBM864i"); + (charset.LowerCaseEqualsLiteral("ibm864"))) { + charset.AssignLiteral("IBM864i"); } } @@ -1648,7 +1648,7 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain) nsCAutoString path; if (NS_FAILED(uri->GetPath(path))) return NS_ERROR_FAILURE; - newURIString.Append(NS_LITERAL_CSTRING("://")); + newURIString.AppendLiteral("://"); AppendUTF16toUTF8(aDomain, newURIString); newURIString.Append(path); @@ -2929,9 +2929,9 @@ nsHTMLDocument::GetCompatMode(nsAString& aCompatMode) "mCompatMode is neither quirks nor strict for this document"); if (mCompatMode == eCompatibility_NavQuirks) { - aCompatMode.Assign(NS_LITERAL_STRING("BackCompat")); + aCompatMode.AssignLiteral("BackCompat"); } else { - aCompatMode.Assign(NS_LITERAL_STRING("CSS1Compat")); + aCompatMode.AssignLiteral("CSS1Compat"); } return NS_OK; @@ -3563,10 +3563,10 @@ NS_IMETHODIMP nsHTMLDocument::GetDesignMode(nsAString & aDesignMode) { if (mEditingIsOn) { - aDesignMode.Assign(NS_LITERAL_STRING("on")); + aDesignMode.AssignLiteral("on"); } else { - aDesignMode.Assign(NS_LITERAL_STRING("off")); + aDesignMode.AssignLiteral("off"); } return NS_OK; } @@ -3600,8 +3600,7 @@ nsHTMLDocument::SetDesignMode(const nsAString & aDesignMode) if (!editSession) return NS_ERROR_FAILURE; - if (aDesignMode.Equals(NS_LITERAL_STRING("on"), - nsCaseInsensitiveStringComparator())) { + if (aDesignMode.LowerCaseEqualsLiteral("on")) { // go through hoops to get dom window (see nsHTMLDocument::GetSelection) nsCOMPtr shell = (nsIPresShell*)mPresShells.SafeElementAt(0); NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE); @@ -3889,13 +3888,13 @@ nsHTMLDocument::ExecCommand(const nsAString & commandID, nsresult rv = NS_OK; - if (commandID.Equals(NS_LITERAL_STRING("gethtml"), nsCaseInsensitiveStringComparator())) + if (commandID.LowerCaseEqualsLiteral("gethtml")) return NS_ERROR_FAILURE; - if (commandID.Equals(NS_LITERAL_STRING("cut"), nsCaseInsensitiveStringComparator()) || - (commandID.Equals(NS_LITERAL_STRING("copy"), nsCaseInsensitiveStringComparator()))) { + if (commandID.LowerCaseEqualsLiteral("cut") || + (commandID.LowerCaseEqualsLiteral("copy"))) { rv = DoClipboardSecurityCheck(PR_FALSE); - } else if (commandID.Equals(NS_LITERAL_STRING("paste"), nsCaseInsensitiveStringComparator())) { + } else if (commandID.LowerCaseEqualsLiteral("paste")) { rv = DoClipboardSecurityCheck(PR_TRUE); } diff --git a/content/html/document/src/nsWyciwygChannel.cpp b/content/html/document/src/nsWyciwygChannel.cpp index 6b81f487743a..74b7d294d3cf 100644 --- a/content/html/document/src/nsWyciwygChannel.cpp +++ b/content/html/document/src/nsWyciwygChannel.cpp @@ -251,7 +251,7 @@ nsWyciwygChannel::GetSecurityInfo(nsISupports * *aSecurityInfo) NS_IMETHODIMP nsWyciwygChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING(wyciwyg_TYPE); + aContentType.AssignLiteral(wyciwyg_TYPE); return NS_OK; } diff --git a/content/html/style/src/nsCSSDeclaration.cpp b/content/html/style/src/nsCSSDeclaration.cpp index 4cabda3844f0..66ad6686027f 100644 --- a/content/html/style/src/nsCSSDeclaration.cpp +++ b/content/html/style/src/nsCSSDeclaration.cpp @@ -202,7 +202,7 @@ PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, nsAString& "Top inherit or initial, left isn't. Fix the parser!"); AppendCSSValueToString(aProperty, rect->mTop, aResult); } else { - aResult.Append(NS_LITERAL_STRING("rect(")); + aResult.AppendLiteral("rect("); AppendCSSValueToString(aProperty, rect->mTop, aResult); NS_NAMED_LITERAL_STRING(comma, ", "); aResult.Append(comma); @@ -269,7 +269,7 @@ PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, nsAString& } if (AppendCSSValueToString(aProperty, shadow->mRadius, aResult) && shadow->mNext) - aResult.Append(NS_LITERAL_STRING(", ")); + aResult.AppendLiteral(", "); shadow = shadow->mNext; } } @@ -292,11 +292,11 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n if ((eCSSUnit_String <= unit) && (unit <= eCSSUnit_Counters)) { switch (unit) { - case eCSSUnit_Attr: aResult.Append(NS_LITERAL_STRING("attr(")); + case eCSSUnit_Attr: aResult.AppendLiteral("attr("); break; - case eCSSUnit_Counter: aResult.Append(NS_LITERAL_STRING("counter(")); + case eCSSUnit_Counter: aResult.AppendLiteral("counter("); break; - case eCSSUnit_Counters: aResult.Append(NS_LITERAL_STRING("counters(")); + case eCSSUnit_Counters: aResult.AppendLiteral("counters("); break; default: break; } @@ -397,7 +397,7 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n nsAutoString tmpStr; nscolor color = aValue.GetColorValue(); - aResult.Append(NS_LITERAL_STRING("rgb(")); + aResult.AppendLiteral("rgb("); NS_NAMED_LITERAL_STRING(comma, ", "); @@ -432,11 +432,11 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n switch (unit) { case eCSSUnit_Null: break; - case eCSSUnit_Auto: aResult.Append(NS_LITERAL_STRING("auto")); break; - case eCSSUnit_Inherit: aResult.Append(NS_LITERAL_STRING("inherit")); break; - case eCSSUnit_Initial: aResult.Append(NS_LITERAL_STRING("initial")); break; - case eCSSUnit_None: aResult.Append(NS_LITERAL_STRING("none")); break; - case eCSSUnit_Normal: aResult.Append(NS_LITERAL_STRING("normal")); break; + case eCSSUnit_Auto: aResult.AppendLiteral("auto"); break; + case eCSSUnit_Inherit: aResult.AppendLiteral("inherit"); break; + case eCSSUnit_Initial: aResult.AppendLiteral("initial"); break; + case eCSSUnit_None: aResult.AppendLiteral("none"); break; + case eCSSUnit_Normal: aResult.AppendLiteral("normal"); break; case eCSSUnit_String: break; case eCSSUnit_URL: break; @@ -450,37 +450,37 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n case eCSSUnit_Percent: aResult.Append(PRUnichar('%')); break; case eCSSUnit_Number: break; - case eCSSUnit_Inch: aResult.Append(NS_LITERAL_STRING("in")); break; - case eCSSUnit_Foot: aResult.Append(NS_LITERAL_STRING("ft")); break; - case eCSSUnit_Mile: aResult.Append(NS_LITERAL_STRING("mi")); break; - case eCSSUnit_Millimeter: aResult.Append(NS_LITERAL_STRING("mm")); break; - case eCSSUnit_Centimeter: aResult.Append(NS_LITERAL_STRING("cm")); break; - case eCSSUnit_Meter: aResult.Append(NS_LITERAL_STRING("m")); break; - case eCSSUnit_Kilometer: aResult.Append(NS_LITERAL_STRING("km")); break; - case eCSSUnit_Point: aResult.Append(NS_LITERAL_STRING("pt")); break; - case eCSSUnit_Pica: aResult.Append(NS_LITERAL_STRING("pc")); break; - case eCSSUnit_Didot: aResult.Append(NS_LITERAL_STRING("dt")); break; - case eCSSUnit_Cicero: aResult.Append(NS_LITERAL_STRING("cc")); break; + case eCSSUnit_Inch: aResult.AppendLiteral("in"); break; + case eCSSUnit_Foot: aResult.AppendLiteral("ft"); break; + case eCSSUnit_Mile: aResult.AppendLiteral("mi"); break; + case eCSSUnit_Millimeter: aResult.AppendLiteral("mm"); break; + case eCSSUnit_Centimeter: aResult.AppendLiteral("cm"); break; + case eCSSUnit_Meter: aResult.AppendLiteral("m"); break; + case eCSSUnit_Kilometer: aResult.AppendLiteral("km"); break; + case eCSSUnit_Point: aResult.AppendLiteral("pt"); break; + case eCSSUnit_Pica: aResult.AppendLiteral("pc"); break; + case eCSSUnit_Didot: aResult.AppendLiteral("dt"); break; + case eCSSUnit_Cicero: aResult.AppendLiteral("cc"); break; - case eCSSUnit_EM: aResult.Append(NS_LITERAL_STRING("em")); break; - case eCSSUnit_EN: aResult.Append(NS_LITERAL_STRING("en")); break; - case eCSSUnit_XHeight: aResult.Append(NS_LITERAL_STRING("ex")); break; - case eCSSUnit_CapHeight: aResult.Append(NS_LITERAL_STRING("cap")); break; - case eCSSUnit_Char: aResult.Append(NS_LITERAL_STRING("ch")); break; + case eCSSUnit_EM: aResult.AppendLiteral("em"); break; + case eCSSUnit_EN: aResult.AppendLiteral("en"); break; + case eCSSUnit_XHeight: aResult.AppendLiteral("ex"); break; + case eCSSUnit_CapHeight: aResult.AppendLiteral("cap"); break; + case eCSSUnit_Char: aResult.AppendLiteral("ch"); break; - case eCSSUnit_Pixel: aResult.Append(NS_LITERAL_STRING("px")); break; + case eCSSUnit_Pixel: aResult.AppendLiteral("px"); break; - case eCSSUnit_Proportional: aResult.Append(NS_LITERAL_STRING("*")); break; + case eCSSUnit_Proportional: aResult.AppendLiteral("*"); break; - case eCSSUnit_Degree: aResult.Append(NS_LITERAL_STRING("deg")); break; - case eCSSUnit_Grad: aResult.Append(NS_LITERAL_STRING("grad")); break; - case eCSSUnit_Radian: aResult.Append(NS_LITERAL_STRING("rad")); break; + case eCSSUnit_Degree: aResult.AppendLiteral("deg"); break; + case eCSSUnit_Grad: aResult.AppendLiteral("grad"); break; + case eCSSUnit_Radian: aResult.AppendLiteral("rad"); break; - case eCSSUnit_Hertz: aResult.Append(NS_LITERAL_STRING("Hz")); break; - case eCSSUnit_Kilohertz: aResult.Append(NS_LITERAL_STRING("kHz")); break; + case eCSSUnit_Hertz: aResult.AppendLiteral("Hz"); break; + case eCSSUnit_Kilohertz: aResult.AppendLiteral("kHz"); break; case eCSSUnit_Seconds: aResult.Append(PRUnichar('s')); break; - case eCSSUnit_Milliseconds: aResult.Append(NS_LITERAL_STRING("ms")); break; + case eCSSUnit_Milliseconds: aResult.AppendLiteral("ms"); break; } return PR_TRUE; @@ -736,7 +736,7 @@ void nsCSSDeclaration::AppendImportanceToString(PRBool aIsImportant, nsAString& aString) const { if (aIsImportant) { - aString.Append(NS_LITERAL_STRING(" ! important")); + aString.AppendLiteral(" ! important"); } } @@ -748,11 +748,11 @@ nsCSSDeclaration::AppendPropertyAndValueToString(nsCSSProperty aProperty, NS_ASSERTION(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands, "property enum out of range"); AppendASCIItoUTF16(nsCSSProps::GetStringValue(aPropertyName), aResult); - aResult.Append(NS_LITERAL_STRING(": ")); + aResult.AppendLiteral(": "); AppendValueToString(aProperty, aResult); PRBool isImportant = GetValueIsImportant(aProperty); AppendImportanceToString(isImportant, aResult); - aResult.Append(NS_LITERAL_STRING("; ")); + aResult.AppendLiteral("; "); } PRBool @@ -804,7 +804,7 @@ nsCSSDeclaration::TryBorderShorthand(nsAString & aString, PRUint32 aPropertiesSe } if (border) { AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_border), aString); - aString.Append(NS_LITERAL_STRING(": ")); + aString.AppendLiteral(": "); AppendValueToString(eCSSProperty_border_top_width, aString); aString.Append(PRUnichar(' ')); @@ -822,7 +822,7 @@ nsCSSDeclaration::TryBorderShorthand(nsAString & aString, PRUint32 aPropertiesSe aString.Append(valueString); } AppendImportanceToString(isImportant, aString); - aString.Append(NS_LITERAL_STRING("; ")); + aString.AppendLiteral("; "); } return border; } @@ -839,7 +839,7 @@ nsCSSDeclaration::TryBorderSideShorthand(nsAString & aString, 0, 0, 0, isImportant)) { AppendASCIItoUTF16(nsCSSProps::GetStringValue(aShorthand), aString); - aString.Append(NS_LITERAL_STRING(": ")); + aString.AppendLiteral(": "); AppendValueToString(OrderValueAt(aBorderWidth-1), aString); @@ -849,11 +849,11 @@ nsCSSDeclaration::TryBorderSideShorthand(nsAString & aString, nsAutoString valueString; AppendValueToString(OrderValueAt(aBorderColor-1), valueString); if (!valueString.EqualsLiteral("-moz-use-text-color")) { - aString.Append(NS_LITERAL_STRING(" ")); + aString.AppendLiteral(" "); aString.Append(valueString); } AppendImportanceToString(isImportant, aString); - aString.Append(NS_LITERAL_STRING("; ")); + aString.AppendLiteral("; "); return PR_TRUE; } return PR_FALSE; @@ -876,7 +876,7 @@ nsCSSDeclaration::TryFourSidesShorthand(nsAString & aString, isImportant)) { // all 4 properties are set, we can output a shorthand AppendASCIItoUTF16(nsCSSProps::GetStringValue(aShorthand), aString); - aString.Append(NS_LITERAL_STRING(": ")); + aString.AppendLiteral(": "); nsCSSValue topValue, bottomValue, leftValue, rightValue; nsCSSProperty topProp = OrderValueAt(aTop-1); nsCSSProperty bottomProp = OrderValueAt(aBottom-1); @@ -903,7 +903,7 @@ nsCSSDeclaration::TryFourSidesShorthand(nsAString & aString, aTop = 0; aBottom = 0; aLeft = 0; aRight = 0; } AppendImportanceToString(isImportant, aString); - aString.Append(NS_LITERAL_STRING("; ")); + aString.AppendLiteral("; "); return PR_TRUE; } return PR_FALSE; @@ -926,7 +926,7 @@ nsCSSDeclaration::TryBackgroundShorthand(nsAString & aString, AllPropertiesSameImportance(aBgColor, aBgImage, aBgRepeat, aBgAttachment, aBgPositionX, aBgPositionY, isImportant)) { AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_background), aString); - aString.Append(NS_LITERAL_STRING(": ")); + aString.AppendLiteral(": "); AppendValueToString(eCSSProperty_background_color, aString); aBgColor = 0; @@ -946,7 +946,7 @@ nsCSSDeclaration::TryBackgroundShorthand(nsAString & aString, aString.Append(PRUnichar(' ')); UseBackgroundPosition(aString, aBgPositionX, aBgPositionY); AppendImportanceToString(isImportant, aString); - aString.Append(NS_LITERAL_STRING("; ")); + aString.AppendLiteral("; "); } } @@ -1198,10 +1198,10 @@ nsCSSDeclaration::ToString(nsAString& aString) const AllPropertiesSameImportance(bgPositionX, bgPositionY, 0, 0, 0, 0, isImportant)) { AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_background_position), aString); - aString.Append(NS_LITERAL_STRING(": ")); + aString.AppendLiteral(": "); UseBackgroundPosition(aString, bgPositionX, bgPositionY); AppendImportanceToString(isImportant, aString); - aString.Append(NS_LITERAL_STRING("; ")); + aString.AppendLiteral("; "); } else if (eCSSProperty_background_x_position == property && bgPositionX) { AppendPropertyAndValueToString(eCSSProperty_background_x_position, aString); diff --git a/content/html/style/src/nsCSSLoader.cpp b/content/html/style/src/nsCSSLoader.cpp index 626b6631e3de..c4cdc578d756 100644 --- a/content/html/style/src/nsCSSLoader.cpp +++ b/content/html/style/src/nsCSSLoader.cpp @@ -652,7 +652,7 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader, #ifdef PR_LOGGING LOG_WARN((" Falling back to ISO-8859-1")); #endif - aCharset = NS_LITERAL_CSTRING("ISO-8859-1"); + aCharset.AssignLiteral("ISO-8859-1"); } mCharset = aCharset; diff --git a/content/html/style/src/nsCSSParser.cpp b/content/html/style/src/nsCSSParser.cpp index 46f960360b1b..61cfa0873257 100644 --- a/content/html/style/src/nsCSSParser.cpp +++ b/content/html/style/src/nsCSSParser.cpp @@ -405,9 +405,9 @@ static void ReportUnexpectedToken(nsCSSScanner *sc, // Flatten the string so we don't append to a concatenation, since // that goes into an infinite loop. See bug 70083. nsAutoString error(err); - error += NS_LITERAL_STRING(" '"); + error.AppendLiteral(" '"); tok.AppendToString(error); - error += NS_LITERAL_STRING("'."); + error.AppendLiteral("'."); sc->AddToError(error); } @@ -953,39 +953,39 @@ PRBool CSSParserImpl::ParseAtRule(nsresult& aErrorCode, RuleAppendFunc aAppendFu void* aData) { if ((mSection <= eCSSSection_Charset) && - (mToken.mIdent.EqualsIgnoreCase("charset"))) { + (mToken.mIdent.LowerCaseEqualsLiteral("charset"))) { if (ParseCharsetRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_Import; // only one charset allowed return PR_TRUE; } } if ((mSection <= eCSSSection_Import) && - mToken.mIdent.EqualsIgnoreCase("import")) { + mToken.mIdent.LowerCaseEqualsLiteral("import")) { if (ParseImportRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_Import; return PR_TRUE; } } if ((mSection <= eCSSSection_NameSpace) && - mToken.mIdent.EqualsIgnoreCase("namespace")) { + mToken.mIdent.LowerCaseEqualsLiteral("namespace")) { if (ParseNameSpaceRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_NameSpace; return PR_TRUE; } } - if (mToken.mIdent.EqualsIgnoreCase("media")) { + if (mToken.mIdent.LowerCaseEqualsLiteral("media")) { if (ParseMediaRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_General; return PR_TRUE; } } - if (mToken.mIdent.EqualsIgnoreCase("font-face")) { + if (mToken.mIdent.LowerCaseEqualsLiteral("font-face")) { if (ParseFontFaceRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_General; return PR_TRUE; } } - if (mToken.mIdent.EqualsIgnoreCase("page")) { + if (mToken.mIdent.LowerCaseEqualsLiteral("page")) { if (ParsePageRule(aErrorCode, aAppendFunc, aData)) { mSection = eCSSSection_General; return PR_TRUE; @@ -1111,7 +1111,7 @@ PRBool CSSParserImpl::ParseImportRule(nsresult& aErrorCode, RuleAppendFunc aAppe } } else if ((eCSSToken_Function == mToken.mType) && - (mToken.mIdent.EqualsIgnoreCase("url"))) { + (mToken.mIdent.LowerCaseEqualsLiteral("url"))) { if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) { if (GetURLToken(aErrorCode, PR_TRUE)) { if ((eCSSToken_String == mToken.mType) || (eCSSToken_URL == mToken.mType)) { @@ -1258,7 +1258,7 @@ PRBool CSSParserImpl::ParseNameSpaceRule(nsresult& aErrorCode, } } else if ((eCSSToken_Function == mToken.mType) && - (mToken.mIdent.EqualsIgnoreCase("url"))) { + (mToken.mIdent.LowerCaseEqualsLiteral("url"))) { if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) { if (GetURLToken(aErrorCode, PR_TRUE)) { if ((eCSSToken_String == mToken.mType) || (eCSSToken_URL == mToken.mType)) { @@ -2547,7 +2547,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue) } break; case eCSSToken_Function: - if (mToken.mIdent.EqualsIgnoreCase("rgb")) { + if (mToken.mIdent.LowerCaseEqualsLiteral("rgb")) { // rgb ( component , component , component ) PRUint8 r, g, b; PRInt32 type = COLOR_TYPE_UNKNOWN; @@ -2560,7 +2560,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue) } return PR_FALSE; // already pushed back } - else if (mToken.mIdent.EqualsIgnoreCase("-moz-rgba")) { + else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-rgba")) { // rgba ( component , component , component , opacity ) PRUint8 r, g, b, a; PRInt32 type = COLOR_TYPE_UNKNOWN; @@ -2574,7 +2574,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue) } return PR_FALSE; // already pushed back } - else if (mToken.mIdent.EqualsIgnoreCase("hsl")) { + else if (mToken.mIdent.LowerCaseEqualsLiteral("hsl")) { // hsl ( hue , saturation , lightness ) // "hue" is a number, "saturation" and "lightness" are percentages. if (ParseHSLColor(aErrorCode, rgba, ')')) { @@ -2583,7 +2583,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue) } return PR_FALSE; } - else if (mToken.mIdent.EqualsIgnoreCase("-moz-hsla")) { + else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-hsla")) { // hsla ( hue , saturation , lightness , opacity ) // "hue" is a number, "saturation" and "lightness" are percentages, // "opacity" is a number. @@ -2958,7 +2958,7 @@ CSSParserImpl::ParseDeclaration(nsresult& aErrorCode, return PR_FALSE; } if ((eCSSToken_Ident != tk->mType) || - !tk->mIdent.EqualsIgnoreCase("important")) { + !tk->mIdent.LowerCaseEqualsLiteral("important")) { REPORT_UNEXPECTED_TOKEN( NS_LITERAL_STRING("Expected 'important' but found")); OUTPUT_ERROR(); @@ -3424,7 +3424,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue, } if (((aVariantMask & VARIANT_URL) != 0) && (eCSSToken_Function == tk->mType) && - tk->mIdent.EqualsIgnoreCase("url")) { + tk->mIdent.LowerCaseEqualsLiteral("url")) { if (ParseURL(aErrorCode, aValue)) { return PR_TRUE; } @@ -3435,10 +3435,10 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue, (eCSSToken_ID == tk->mType) || (eCSSToken_Ident == tk->mType) || ((eCSSToken_Function == tk->mType) && - (tk->mIdent.EqualsIgnoreCase("rgb") || - tk->mIdent.EqualsIgnoreCase("hsl") || - tk->mIdent.EqualsIgnoreCase("-moz-rgba") || - tk->mIdent.EqualsIgnoreCase("-moz-hsla")))) { + (tk->mIdent.LowerCaseEqualsLiteral("rgb") || + tk->mIdent.LowerCaseEqualsLiteral("hsl") || + tk->mIdent.LowerCaseEqualsLiteral("-moz-rgba") || + tk->mIdent.LowerCaseEqualsLiteral("-moz-hsla")))) { // Put token back so that parse color can get it UngetToken(); if (ParseColor(aErrorCode, aValue)) { @@ -3463,8 +3463,8 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue, } if (((aVariantMask & VARIANT_COUNTER) != 0) && (eCSSToken_Function == tk->mType) && - (tk->mIdent.EqualsIgnoreCase("counter") || - tk->mIdent.EqualsIgnoreCase("counters"))) { + (tk->mIdent.LowerCaseEqualsLiteral("counter") || + tk->mIdent.LowerCaseEqualsLiteral("counters"))) { #ifdef ENABLE_COUNTERS if (ParseCounter(aErrorCode, aValue)) { return PR_TRUE; @@ -3474,7 +3474,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue, } if (((aVariantMask & VARIANT_ATTR) != 0) && (eCSSToken_Function == tk->mType) && - tk->mIdent.EqualsIgnoreCase("attr")) { + tk->mIdent.LowerCaseEqualsLiteral("attr")) { if (ParseAttr(aErrorCode, aValue)) { return PR_TRUE; @@ -3489,7 +3489,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue, PRBool CSSParserImpl::ParseCounter(nsresult& aErrorCode, nsCSSValue& aValue) { - nsCSSUnit unit = (mToken.mIdent.EqualsIgnoreCase("counter") ? + nsCSSUnit unit = (mToken.mIdent.LowerCaseEqualsLiteral("counter") ? eCSSUnit_Counter : eCSSUnit_Counters); if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) { @@ -4900,7 +4900,7 @@ CSSParserImpl::DoParseRect(nsCSSRect& aRect, nsresult& aErrorCode) break; } } else if ((eCSSToken_Function == mToken.mType) && - mToken.mIdent.EqualsIgnoreCase("rect")) { + mToken.mIdent.LowerCaseEqualsLiteral("rect")) { if (!ExpectSymbol(aErrorCode, '(', PR_TRUE)) { return PR_FALSE; } @@ -4997,21 +4997,21 @@ PRBool CSSParserImpl::ParseCounterData(nsresult& aErrorCode, if (nsnull == ident) { return PR_FALSE; } - if (ident->EqualsIgnoreCase("none")) { + if (ident->LowerCaseEqualsLiteral("none")) { if (ExpectEndProperty(aErrorCode, PR_TRUE)) { return SetSingleCounterValue(aResult, aErrorCode, aPropID, nsCSSValue(eCSSUnit_None)); } return PR_FALSE; } - else if (ident->EqualsIgnoreCase("inherit")) { + else if (ident->LowerCaseEqualsLiteral("inherit")) { if (ExpectEndProperty(aErrorCode, PR_TRUE)) { return SetSingleCounterValue(aResult, aErrorCode, aPropID, nsCSSValue(eCSSUnit_Inherit)); } return PR_FALSE; } - else if (ident->EqualsIgnoreCase("-moz-initial")) { + else if (ident->LowerCaseEqualsLiteral("-moz-initial")) { if (ExpectEndProperty(aErrorCode, PR_TRUE)) { return SetSingleCounterValue(aResult, aErrorCode, aPropID, nsCSSValue(eCSSUnit_Initial)); diff --git a/content/html/style/src/nsCSSRules.cpp b/content/html/style/src/nsCSSRules.cpp index 72209de14faa..d8375e310d11 100644 --- a/content/html/style/src/nsCSSRules.cpp +++ b/content/html/style/src/nsCSSRules.cpp @@ -302,9 +302,9 @@ CSSCharsetRuleImpl::GetType(PRUint16* aType) NS_IMETHODIMP CSSCharsetRuleImpl::GetCssText(nsAString& aCssText) { - aCssText.Assign(NS_LITERAL_STRING("@charset \"")); + aCssText.AssignLiteral("@charset \""); aCssText.Append(mEncoding); - aCssText.Append(NS_LITERAL_STRING("\";")); + aCssText.AppendLiteral("\";"); return NS_OK; } @@ -552,18 +552,18 @@ CSSImportRuleImpl::GetType(PRUint16* aType) NS_IMETHODIMP CSSImportRuleImpl::GetCssText(nsAString& aCssText) { - aCssText.Assign(NS_LITERAL_STRING("@import url(")); + aCssText.AssignLiteral("@import url("); aCssText.Append(mURLSpec); aCssText.Append(NS_LITERAL_STRING(")")); if (mMedia) { nsAutoString mediaText; mMedia->GetText(mediaText); if (!mediaText.IsEmpty()) { - aCssText.Append(NS_LITERAL_STRING(" ")); + aCssText.AppendLiteral(" "); aCssText.Append(mediaText); } } - aCssText.Append(NS_LITERAL_STRING(";")); + aCssText.AppendLiteral(";"); return NS_OK; } @@ -996,7 +996,7 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText) { PRUint32 index; PRUint32 count; - aCssText.Assign(NS_LITERAL_STRING("@media ")); + aCssText.AssignLiteral("@media "); // get all the media if (mMedia) { mMedia->Count(&count); @@ -1005,14 +1005,14 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText) if (medium) { nsAutoString tempString; if (index > 0) - aCssText.Append(NS_LITERAL_STRING(", ")); + aCssText.AppendLiteral(", "); medium->ToString(tempString); aCssText.Append(tempString); } } } - aCssText.Append(NS_LITERAL_STRING(" {\n")); + aCssText.AppendLiteral(" {\n"); // get all the rules if (mRules) { @@ -1032,7 +1032,7 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText) } } - aCssText.Append(NS_LITERAL_STRING("}")); + aCssText.AppendLiteral("}"); return NS_OK; } @@ -1301,14 +1301,14 @@ CSSNameSpaceRuleImpl::GetType(PRUint16* aType) NS_IMETHODIMP CSSNameSpaceRuleImpl::GetCssText(nsAString& aCssText) { - aCssText.Assign(NS_LITERAL_STRING("@namespace ")); + aCssText.AssignLiteral("@namespace "); if (mPrefix) { nsString atomStr; mPrefix->ToString(atomStr); aCssText.Append(atomStr); - aCssText.Append(NS_LITERAL_STRING(" ")); + aCssText.AppendLiteral(" "); } - aCssText.Append(NS_LITERAL_STRING("url(")); + aCssText.AppendLiteral("url("); aCssText.Append(mURLSpec); aCssText.Append(NS_LITERAL_STRING(");")); return NS_OK; diff --git a/content/html/style/src/nsCSSScanner.cpp b/content/html/style/src/nsCSSScanner.cpp index 7ffbd315887c..e01e408ddd5e 100644 --- a/content/html/style/src/nsCSSScanner.cpp +++ b/content/html/style/src/nsCSSScanner.cpp @@ -153,10 +153,10 @@ nsCSSToken::AppendToString(nsString& aBuffer) aBuffer.Append(mIdent); break; case eCSSToken_Includes: - aBuffer.Append(NS_LITERAL_STRING("~=")); + aBuffer.AppendLiteral("~="); break; case eCSSToken_Dashmatch: - aBuffer.Append(NS_LITERAL_STRING("|=")); + aBuffer.AppendLiteral("|="); break; default: @@ -507,7 +507,7 @@ PRBool nsCSSScanner::Next(nsresult& aErrorCode, nsCSSToken& aToken) if (LookAhead(aErrorCode, '-')) { if (LookAhead(aErrorCode, '-')) { aToken.mType = eCSSToken_HTMLComment; - aToken.mIdent.Assign(NS_LITERAL_STRING("")); + aToken.mIdent.AssignLiteral("-->"); return PR_TRUE; } Pushback('-'); diff --git a/content/html/style/src/nsCSSStruct.cpp b/content/html/style/src/nsCSSStruct.cpp index 98ab3f4afda3..f54b90772157 100644 --- a/content/html/style/src/nsCSSStruct.cpp +++ b/content/html/style/src/nsCSSStruct.cpp @@ -341,7 +341,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const if (eCSSProperty_UNKNOWN < aPropID) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); } mTop.AppendToString(buffer); @@ -359,22 +359,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co if (eCSSUnit_Null != mTop.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mLeft.AppendToString(buffer); } @@ -427,7 +427,7 @@ void nsCSSValueListRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) if (eCSSProperty_UNKNOWN < aPropID) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); } mTop.AppendToString(buffer); @@ -447,22 +447,22 @@ void nsCSSValueListRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aT if (eCSSUnit_Null != mTop.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); - buffer.Append(NS_LITERAL_STRING(": ")); + buffer.AppendLiteral(": "); mLeft.AppendToString(buffer); } diff --git a/content/html/style/src/nsCSSStyleRule.cpp b/content/html/style/src/nsCSSStyleRule.cpp index 205f879abcd3..0c1b5f6a39a9 100644 --- a/content/html/style/src/nsCSSStyleRule.cpp +++ b/content/html/style/src/nsCSSStyleRule.cpp @@ -78,7 +78,7 @@ if (nsnull != ptr) { delete ptr; ptr = nsnull; } #define NS_IF_NEGATED_START(bool,str) \ - if (bool) { str.Append(NS_LITERAL_STRING(":not(")); } + if (bool) { str.AppendLiteral(":not("); } #define NS_IF_NEGATED_END(bool,str) \ if (bool) { str.Append(PRUnichar(')')); } @@ -525,7 +525,7 @@ static PRBool IsPseudoElement(nsIAtom* aAtom) void nsCSSSelector::AppendNegationToString(nsAString& aString) { - aString.Append(NS_LITERAL_STRING(":not(")); + aString.AppendLiteral(":not("); } // @@ -780,7 +780,7 @@ nsCSSSelectorList::ToString(nsAString& aResult, nsICSSStyleSheet* aSheet) p = p->mNext; if (!p) break; - aResult.Append(NS_LITERAL_STRING(", ")); + aResult.AppendLiteral(", "); } } @@ -1480,7 +1480,7 @@ CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const if (mSelector) mSelector->ToString(buffer, mSheet); - buffer.Append(NS_LITERAL_STRING(" ")); + buffer.AppendLiteral(" "); fputs(NS_LossyConvertUCS2toASCII(buffer).get(), out); if (nsnull != mDeclaration) { mDeclaration->List(out); diff --git a/content/html/style/src/nsCSSStyleSheet.cpp b/content/html/style/src/nsCSSStyleSheet.cpp index 8ade8496b708..809445ff0ecf 100644 --- a/content/html/style/src/nsCSSStyleSheet.cpp +++ b/content/html/style/src/nsCSSStyleSheet.cpp @@ -1108,7 +1108,7 @@ DOMMediaListImpl::GetText(nsAString& aMediaText) medium->ToString(buffer); aMediaText.Append(buffer); if (index < count) { - aMediaText.Append(NS_LITERAL_STRING(", ")); + aMediaText.AppendLiteral(", "); } } @@ -1782,7 +1782,7 @@ CSSStyleSheetImpl::SetTitle(const nsAString& aTitle) NS_IMETHODIMP CSSStyleSheetImpl::GetType(nsString& aType) const { - aType.Assign(NS_LITERAL_STRING("text/css")); + aType.AssignLiteral("text/css"); return NS_OK; } @@ -2420,7 +2420,7 @@ CSSStyleSheetImpl::SetModified(PRBool aModified) NS_IMETHODIMP CSSStyleSheetImpl::GetType(nsAString& aType) { - aType.Assign(NS_LITERAL_STRING("text/css")); + aType.AssignLiteral("text/css"); return NS_OK; } diff --git a/content/html/style/src/nsCSSValue.cpp b/content/html/style/src/nsCSSValue.cpp index f734e267af2f..f2e59d35bb41 100644 --- a/content/html/style/src/nsCSSValue.cpp +++ b/content/html/style/src/nsCSSValue.cpp @@ -399,15 +399,15 @@ void nsCSSValue::AppendToString(nsAString& aBuffer, if (-1 < aPropID) { AppendASCIItoUTF16(nsCSSProps::GetStringValue(aPropID), aBuffer); - aBuffer.Append(NS_LITERAL_STRING(": ")); + aBuffer.AppendLiteral(": "); } switch (mUnit) { case eCSSUnit_Image: - case eCSSUnit_URL: aBuffer.Append(NS_LITERAL_STRING("url(")); break; - case eCSSUnit_Attr: aBuffer.Append(NS_LITERAL_STRING("attr(")); break; - case eCSSUnit_Counter: aBuffer.Append(NS_LITERAL_STRING("counter(")); break; - case eCSSUnit_Counters: aBuffer.Append(NS_LITERAL_STRING("counters(")); break; + case eCSSUnit_URL: aBuffer.AppendLiteral("url("); break; + case eCSSUnit_Attr: aBuffer.AppendLiteral("attr("); break; + case eCSSUnit_Counter: aBuffer.AppendLiteral("counter("); break; + case eCSSUnit_Counters: aBuffer.AppendLiteral("counters("); break; default: break; } if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Counters)) { @@ -417,7 +417,7 @@ void nsCSSValue::AppendToString(nsAString& aBuffer, aBuffer.Append(PRUnichar('"')); } else { - aBuffer.Append(NS_LITERAL_STRING("null str")); + aBuffer.AppendLiteral("null str"); } } else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) { @@ -425,7 +425,7 @@ void nsCSSValue::AppendToString(nsAString& aBuffer, intStr.AppendInt(mValue.mInt, 10); aBuffer.Append(intStr); - aBuffer.Append(NS_LITERAL_STRING("[0x")); + aBuffer.AppendLiteral("[0x"); intStr.Truncate(); intStr.AppendInt(mValue.mInt, 16); @@ -434,25 +434,25 @@ void nsCSSValue::AppendToString(nsAString& aBuffer, aBuffer.Append(PRUnichar(']')); } else if (eCSSUnit_Color == mUnit) { - aBuffer.Append(NS_LITERAL_STRING("(0x")); + aBuffer.AppendLiteral("(0x"); nsAutoString intStr; intStr.AppendInt(NS_GET_R(mValue.mColor), 16); aBuffer.Append(intStr); - aBuffer.Append(NS_LITERAL_STRING(" 0x")); + aBuffer.AppendLiteral(" 0x"); intStr.Truncate(); intStr.AppendInt(NS_GET_G(mValue.mColor), 16); aBuffer.Append(intStr); - aBuffer.Append(NS_LITERAL_STRING(" 0x")); + aBuffer.AppendLiteral(" 0x"); intStr.Truncate(); intStr.AppendInt(NS_GET_B(mValue.mColor), 16); aBuffer.Append(intStr); - aBuffer.Append(NS_LITERAL_STRING(" 0x")); + aBuffer.AppendLiteral(" 0x"); intStr.Truncate(); intStr.AppendInt(NS_GET_A(mValue.mColor), 16); @@ -479,49 +479,49 @@ void nsCSSValue::AppendToString(nsAString& aBuffer, switch (mUnit) { case eCSSUnit_Null: break; - case eCSSUnit_Auto: aBuffer.Append(NS_LITERAL_STRING("auto")); break; - case eCSSUnit_Inherit: aBuffer.Append(NS_LITERAL_STRING("inherit")); break; - case eCSSUnit_Initial: aBuffer.Append(NS_LITERAL_STRING("initial")); break; - case eCSSUnit_None: aBuffer.Append(NS_LITERAL_STRING("none")); break; - case eCSSUnit_Normal: aBuffer.Append(NS_LITERAL_STRING("normal")); break; + case eCSSUnit_Auto: aBuffer.AppendLiteral("auto"); break; + case eCSSUnit_Inherit: aBuffer.AppendLiteral("inherit"); break; + case eCSSUnit_Initial: aBuffer.AppendLiteral("initial"); break; + case eCSSUnit_None: aBuffer.AppendLiteral("none"); break; + case eCSSUnit_Normal: aBuffer.AppendLiteral("normal"); break; case eCSSUnit_String: break; case eCSSUnit_URL: case eCSSUnit_Image: case eCSSUnit_Attr: case eCSSUnit_Counter: case eCSSUnit_Counters: aBuffer.Append(NS_LITERAL_STRING(")")); break; - case eCSSUnit_Integer: aBuffer.Append(NS_LITERAL_STRING("int")); break; - case eCSSUnit_Enumerated: aBuffer.Append(NS_LITERAL_STRING("enum")); break; - case eCSSUnit_Color: aBuffer.Append(NS_LITERAL_STRING("rbga")); break; - case eCSSUnit_Percent: aBuffer.Append(NS_LITERAL_STRING("%")); break; - case eCSSUnit_Number: aBuffer.Append(NS_LITERAL_STRING("#")); break; - case eCSSUnit_Inch: aBuffer.Append(NS_LITERAL_STRING("in")); break; - case eCSSUnit_Foot: aBuffer.Append(NS_LITERAL_STRING("ft")); break; - case eCSSUnit_Mile: aBuffer.Append(NS_LITERAL_STRING("mi")); break; - case eCSSUnit_Millimeter: aBuffer.Append(NS_LITERAL_STRING("mm")); break; - case eCSSUnit_Centimeter: aBuffer.Append(NS_LITERAL_STRING("cm")); break; - case eCSSUnit_Meter: aBuffer.Append(NS_LITERAL_STRING("m")); break; - case eCSSUnit_Kilometer: aBuffer.Append(NS_LITERAL_STRING("km")); break; - case eCSSUnit_Point: aBuffer.Append(NS_LITERAL_STRING("pt")); break; - case eCSSUnit_Pica: aBuffer.Append(NS_LITERAL_STRING("pc")); break; - case eCSSUnit_Didot: aBuffer.Append(NS_LITERAL_STRING("dt")); break; - case eCSSUnit_Cicero: aBuffer.Append(NS_LITERAL_STRING("cc")); break; - case eCSSUnit_EM: aBuffer.Append(NS_LITERAL_STRING("em")); break; - case eCSSUnit_EN: aBuffer.Append(NS_LITERAL_STRING("en")); break; - case eCSSUnit_XHeight: aBuffer.Append(NS_LITERAL_STRING("ex")); break; - case eCSSUnit_CapHeight: aBuffer.Append(NS_LITERAL_STRING("cap")); break; - case eCSSUnit_Char: aBuffer.Append(NS_LITERAL_STRING("ch")); break; - case eCSSUnit_Pixel: aBuffer.Append(NS_LITERAL_STRING("px")); break; - case eCSSUnit_Proportional: aBuffer.Append(NS_LITERAL_STRING("*")); break; - case eCSSUnit_Degree: aBuffer.Append(NS_LITERAL_STRING("deg")); break; - case eCSSUnit_Grad: aBuffer.Append(NS_LITERAL_STRING("grad")); break; - case eCSSUnit_Radian: aBuffer.Append(NS_LITERAL_STRING("rad")); break; - case eCSSUnit_Hertz: aBuffer.Append(NS_LITERAL_STRING("Hz")); break; - case eCSSUnit_Kilohertz: aBuffer.Append(NS_LITERAL_STRING("kHz")); break; - case eCSSUnit_Seconds: aBuffer.Append(NS_LITERAL_STRING("s")); break; - case eCSSUnit_Milliseconds: aBuffer.Append(NS_LITERAL_STRING("ms")); break; + case eCSSUnit_Integer: aBuffer.AppendLiteral("int"); break; + case eCSSUnit_Enumerated: aBuffer.AppendLiteral("enum"); break; + case eCSSUnit_Color: aBuffer.AppendLiteral("rbga"); break; + case eCSSUnit_Percent: aBuffer.AppendLiteral("%"); break; + case eCSSUnit_Number: aBuffer.AppendLiteral("#"); break; + case eCSSUnit_Inch: aBuffer.AppendLiteral("in"); break; + case eCSSUnit_Foot: aBuffer.AppendLiteral("ft"); break; + case eCSSUnit_Mile: aBuffer.AppendLiteral("mi"); break; + case eCSSUnit_Millimeter: aBuffer.AppendLiteral("mm"); break; + case eCSSUnit_Centimeter: aBuffer.AppendLiteral("cm"); break; + case eCSSUnit_Meter: aBuffer.AppendLiteral("m"); break; + case eCSSUnit_Kilometer: aBuffer.AppendLiteral("km"); break; + case eCSSUnit_Point: aBuffer.AppendLiteral("pt"); break; + case eCSSUnit_Pica: aBuffer.AppendLiteral("pc"); break; + case eCSSUnit_Didot: aBuffer.AppendLiteral("dt"); break; + case eCSSUnit_Cicero: aBuffer.AppendLiteral("cc"); break; + case eCSSUnit_EM: aBuffer.AppendLiteral("em"); break; + case eCSSUnit_EN: aBuffer.AppendLiteral("en"); break; + case eCSSUnit_XHeight: aBuffer.AppendLiteral("ex"); break; + case eCSSUnit_CapHeight: aBuffer.AppendLiteral("cap"); break; + case eCSSUnit_Char: aBuffer.AppendLiteral("ch"); break; + case eCSSUnit_Pixel: aBuffer.AppendLiteral("px"); break; + case eCSSUnit_Proportional: aBuffer.AppendLiteral("*"); break; + case eCSSUnit_Degree: aBuffer.AppendLiteral("deg"); break; + case eCSSUnit_Grad: aBuffer.AppendLiteral("grad"); break; + case eCSSUnit_Radian: aBuffer.AppendLiteral("rad"); break; + case eCSSUnit_Hertz: aBuffer.AppendLiteral("Hz"); break; + case eCSSUnit_Kilohertz: aBuffer.AppendLiteral("kHz"); break; + case eCSSUnit_Seconds: aBuffer.AppendLiteral("s"); break; + case eCSSUnit_Milliseconds: aBuffer.AppendLiteral("ms"); break; } - aBuffer.Append(NS_LITERAL_STRING(" ")); + aBuffer.AppendLiteral(" "); } void nsCSSValue::ToString(nsAString& aBuffer, diff --git a/content/html/style/src/nsDOMCSSDeclaration.cpp b/content/html/style/src/nsDOMCSSDeclaration.cpp index 034adf9c2e31..708237119747 100644 --- a/content/html/style/src/nsDOMCSSDeclaration.cpp +++ b/content/html/style/src/nsDOMCSSDeclaration.cpp @@ -184,7 +184,7 @@ nsDOMCSSDeclaration::GetPropertyPriority(const nsAString& aPropertyName, aReturn.Truncate(); if (decl && decl->GetValueIsImportant(aPropertyName)) { - aReturn.Assign(NS_LITERAL_STRING("important")); + aReturn.AssignLiteral("important"); } return result; diff --git a/content/html/style/src/nsDOMCSSValueList.cpp b/content/html/style/src/nsDOMCSSValueList.cpp index cac8ae7d1a4c..f0988049aabb 100644 --- a/content/html/style/src/nsDOMCSSValueList.cpp +++ b/content/html/style/src/nsDOMCSSValueList.cpp @@ -98,7 +98,7 @@ nsDOMCSSValueList::GetCssText(nsAString& aCssText) nsAutoString separator; if (mCommaDelimited) { - separator.Assign(NS_LITERAL_STRING(", ")); + separator.AssignLiteral(", "); } else { separator.Assign(PRUnichar(' ')); diff --git a/content/html/style/src/nsHTMLCSSStyleSheet.cpp b/content/html/style/src/nsHTMLCSSStyleSheet.cpp index ce54ae824ef3..dc957ebd0f11 100644 --- a/content/html/style/src/nsHTMLCSSStyleSheet.cpp +++ b/content/html/style/src/nsHTMLCSSStyleSheet.cpp @@ -559,14 +559,14 @@ HTMLCSSStyleSheetImpl::GetURL(nsIURI*& aURL) const NS_IMETHODIMP HTMLCSSStyleSheetImpl::GetTitle(nsString& aTitle) const { - aTitle.Assign(NS_LITERAL_STRING("Internal HTML/CSS Style Sheet")); + aTitle.AssignLiteral("Internal HTML/CSS Style Sheet"); return NS_OK; } NS_IMETHODIMP HTMLCSSStyleSheetImpl::GetType(nsString& aType) const { - aType.Assign(NS_LITERAL_STRING("text/html")); + aType.AssignLiteral("text/html"); return NS_OK; } diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp index bdac8e3b87d0..812d37a0f4b0 100644 --- a/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/content/html/style/src/nsHTMLStyleSheet.cpp @@ -691,7 +691,7 @@ nsHTMLStyleSheet::GetTitle(nsString& aTitle) const NS_IMETHODIMP nsHTMLStyleSheet::GetType(nsString& aType) const { - aType.Assign(NS_LITERAL_STRING("text/html")); + aType.AssignLiteral("text/html"); return NS_OK; } diff --git a/content/html/style/src/nsROCSSPrimitiveValue.cpp b/content/html/style/src/nsROCSSPrimitiveValue.cpp index 8a5315b38010..e2c6cc2ba26f 100644 --- a/content/html/style/src/nsROCSSPrimitiveValue.cpp +++ b/content/html/style/src/nsROCSSPrimitiveValue.cpp @@ -122,35 +122,35 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText) { float val = NSTwipsToFloatPixels(mValue.mTwips, mT2P); tmpStr.AppendFloat(val); - tmpStr.Append(NS_LITERAL_STRING("px")); + tmpStr.AppendLiteral("px"); break; } case CSS_CM : { float val = NS_TWIPS_TO_CENTIMETERS(mValue.mTwips); tmpStr.AppendFloat(val); - tmpStr.Append(NS_LITERAL_STRING("cm")); + tmpStr.AppendLiteral("cm"); break; } case CSS_MM : { float val = NS_TWIPS_TO_MILLIMETERS(mValue.mTwips); tmpStr.AppendFloat(val); - tmpStr.Append(NS_LITERAL_STRING("mm")); + tmpStr.AppendLiteral("mm"); break; } case CSS_IN : { float val = NS_TWIPS_TO_INCHES(mValue.mTwips); tmpStr.AppendFloat(val); - tmpStr.Append(NS_LITERAL_STRING("in")); + tmpStr.AppendLiteral("in"); break; } case CSS_PT : { float val = NSTwipsToFloatPoints(mValue.mTwips); tmpStr.AppendFloat(val); - tmpStr.Append(NS_LITERAL_STRING("pt")); + tmpStr.AppendLiteral("pt"); break; } case CSS_IDENT : @@ -197,7 +197,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText) NS_NAMED_LITERAL_STRING(comma, ", "); nsCOMPtr sideCSSValue; nsAutoString sideValue; - tmpStr = NS_LITERAL_STRING("rect("); + tmpStr.AssignLiteral("rect("); // get the top result = mValue.mRect->GetTop(getter_AddRefs(sideCSSValue)); if (NS_FAILED(result)) @@ -238,7 +238,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText) NS_NAMED_LITERAL_STRING(comma, ", "); nsCOMPtr colorCSSValue; nsAutoString colorValue; - tmpStr = NS_LITERAL_STRING("rgb("); + tmpStr.AssignLiteral("rgb("); // get the red component result = mValue.mColor->GetRed(getter_AddRefs(colorCSSValue)); diff --git a/content/shared/src/nsStyleCoord.cpp b/content/shared/src/nsStyleCoord.cpp index 5822dffbcb97..abc8b13b7b59 100644 --- a/content/shared/src/nsStyleCoord.cpp +++ b/content/shared/src/nsStyleCoord.cpp @@ -199,22 +199,22 @@ void nsStyleCoord::AppendToString(nsString& aBuffer) const (eStyleUnit_Enumerated == mUnit) || (eStyleUnit_Integer == mUnit)) { aBuffer.AppendInt(mValue.mInt, 10); - aBuffer.Append(NS_LITERAL_STRING("[0x")); + aBuffer.AppendLiteral("[0x"); aBuffer.AppendInt(mValue.mInt, 16); aBuffer.Append(PRUnichar(']')); } switch (mUnit) { - case eStyleUnit_Null: aBuffer.Append(NS_LITERAL_STRING("Null")); break; - case eStyleUnit_Coord: aBuffer.Append(NS_LITERAL_STRING("tw")); break; - case eStyleUnit_Percent: aBuffer.Append(NS_LITERAL_STRING("%")); break; - case eStyleUnit_Factor: aBuffer.Append(NS_LITERAL_STRING("f")); break; - case eStyleUnit_Normal: aBuffer.Append(NS_LITERAL_STRING("Normal")); break; - case eStyleUnit_Auto: aBuffer.Append(NS_LITERAL_STRING("Auto")); break; - case eStyleUnit_Proportional: aBuffer.Append(NS_LITERAL_STRING("*")); break; - case eStyleUnit_Enumerated: aBuffer.Append(NS_LITERAL_STRING("enum")); break; - case eStyleUnit_Integer: aBuffer.Append(NS_LITERAL_STRING("int")); break; - case eStyleUnit_Chars: aBuffer.Append(NS_LITERAL_STRING("chars")); break; + case eStyleUnit_Null: aBuffer.AppendLiteral("Null"); break; + case eStyleUnit_Coord: aBuffer.AppendLiteral("tw"); break; + case eStyleUnit_Percent: aBuffer.AppendLiteral("%"); break; + case eStyleUnit_Factor: aBuffer.AppendLiteral("f"); break; + case eStyleUnit_Normal: aBuffer.AppendLiteral("Normal"); break; + case eStyleUnit_Auto: aBuffer.AppendLiteral("Auto"); break; + case eStyleUnit_Proportional: aBuffer.AppendLiteral("*"); break; + case eStyleUnit_Enumerated: aBuffer.AppendLiteral("enum"); break; + case eStyleUnit_Integer: aBuffer.AppendLiteral("int"); break; + case eStyleUnit_Chars: aBuffer.AppendLiteral("chars"); break; } aBuffer.Append(PRUnichar(' ')); } @@ -269,19 +269,19 @@ void nsStyleSides::AppendToString(nsString& aBuffer) const nsStyleCoord temp; GetLeft(temp); - aBuffer.Append(NS_LITERAL_STRING("left: ")); + aBuffer.AppendLiteral("left: "); temp.AppendToString(aBuffer); GetTop(temp); - aBuffer.Append(NS_LITERAL_STRING("top: ")); + aBuffer.AppendLiteral("top: "); temp.AppendToString(aBuffer); GetRight(temp); - aBuffer.Append(NS_LITERAL_STRING("right: ")); + aBuffer.AppendLiteral("right: "); temp.AppendToString(aBuffer); GetBottom(temp); - aBuffer.Append(NS_LITERAL_STRING("bottom: ")); + aBuffer.AppendLiteral("bottom: "); temp.AppendToString(aBuffer); } diff --git a/content/svg/content/src/nsSVGLengthList.cpp b/content/svg/content/src/nsSVGLengthList.cpp index 622e1687f7d7..5dc6d48ec26d 100644 --- a/content/svg/content/src/nsSVGLengthList.cpp +++ b/content/svg/content/src/nsSVGLengthList.cpp @@ -182,7 +182,7 @@ nsSVGLengthList::GetValueString(nsAString& aValue) if (++i >= count) break; - aValue.Append(NS_LITERAL_STRING(" ")); + aValue.AppendLiteral(" "); } return NS_OK; diff --git a/content/svg/content/src/nsSVGPathSeg.cpp b/content/svg/content/src/nsSVGPathSeg.cpp index b9a41e3e71e8..59bd21a69c1b 100644 --- a/content/svg/content/src/nsSVGPathSeg.cpp +++ b/content/svg/content/src/nsSVGPathSeg.cpp @@ -56,7 +56,7 @@ NS_IMETHODIMP \ cname::GetPathSegTypeAsLetter(nsAString & aPathSegTypeAsLetter) \ { \ aPathSegTypeAsLetter.Truncate(); \ - aPathSegTypeAsLetter.Append(NS_LITERAL_STRING(letter)); \ + aPathSegTypeAsLetter.AppendLiteral(letter); \ return NS_OK; \ } @@ -130,7 +130,7 @@ NS_IMETHODIMP nsSVGPathSegClosePath::GetValueString(nsAString& aValue) { aValue.Truncate(); - aValue.Append(NS_LITERAL_STRING("z")); + aValue.AppendLiteral("z"); return NS_OK; } diff --git a/content/svg/content/src/nsSVGPathSegList.cpp b/content/svg/content/src/nsSVGPathSegList.cpp index ac16d777f20d..8b29132e548c 100644 --- a/content/svg/content/src/nsSVGPathSegList.cpp +++ b/content/svg/content/src/nsSVGPathSegList.cpp @@ -180,7 +180,7 @@ nsSVGPathSegList::GetValueString(nsAString& aValue) if (++i >= count) break; - aValue.Append(NS_LITERAL_STRING(" ")); + aValue.AppendLiteral(" "); } return NS_OK; diff --git a/content/svg/content/src/nsSVGPointList.cpp b/content/svg/content/src/nsSVGPointList.cpp index 40b20f9754b4..f894d2a3e12a 100644 --- a/content/svg/content/src/nsSVGPointList.cpp +++ b/content/svg/content/src/nsSVGPointList.cpp @@ -236,7 +236,7 @@ nsSVGPointList::GetValueString(nsAString& aValue) if (++i >= count) break; - aValue.Append(NS_LITERAL_STRING(" ")); + aValue.AppendLiteral(" "); } return NS_OK; diff --git a/content/svg/content/src/nsSVGTransformList.cpp b/content/svg/content/src/nsSVGTransformList.cpp index 5644892b546f..1c7068a76e8a 100644 --- a/content/svg/content/src/nsSVGTransformList.cpp +++ b/content/svg/content/src/nsSVGTransformList.cpp @@ -360,7 +360,7 @@ nsSVGTransformList::GetValueString(nsAString& aValue) if (++i >= count) break; - aValue.Append(NS_LITERAL_STRING(" ")); + aValue.AppendLiteral(" "); } return NS_OK; diff --git a/content/xbl/src/nsXBLProtoImplField.cpp b/content/xbl/src/nsXBLProtoImplField.cpp index 82bda0a1a210..5033f2a33500 100644 --- a/content/xbl/src/nsXBLProtoImplField.cpp +++ b/content/xbl/src/nsXBLProtoImplField.cpp @@ -58,7 +58,7 @@ nsXBLProtoImplField::nsXBLProtoImplField(const PRUnichar* aName, const PRUnichar mJSAttributes = JSPROP_ENUMERATE; if (aReadOnly) { nsAutoString readOnly; readOnly.Assign(*aReadOnly); - if (readOnly.EqualsIgnoreCase("true")) + if (readOnly.LowerCaseEqualsLiteral("true")) mJSAttributes |= JSPROP_READONLY; } } diff --git a/content/xbl/src/nsXBLProtoImplProperty.cpp b/content/xbl/src/nsXBLProtoImplProperty.cpp index f374890ad8af..168e082e32f0 100644 --- a/content/xbl/src/nsXBLProtoImplProperty.cpp +++ b/content/xbl/src/nsXBLProtoImplProperty.cpp @@ -61,7 +61,7 @@ nsXBLProtoImplProperty::nsXBLProtoImplProperty(const PRUnichar* aName, if (aReadOnly) { nsAutoString readOnly; readOnly.Assign(*aReadOnly); - if (readOnly.EqualsIgnoreCase("true")) + if (readOnly.LowerCaseEqualsLiteral("true")) mJSAttributes |= JSPROP_READONLY; } diff --git a/content/xbl/src/nsXBLPrototypeHandler.cpp b/content/xbl/src/nsXBLPrototypeHandler.cpp index 7603a7cb2b26..ef7641070742 100644 --- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -810,7 +810,7 @@ nsXBLPrototypeHandler::GetEventType(nsAString& aEvent) if (aEvent.IsEmpty() && (mType & NS_HANDLER_TYPE_XUL)) // If no type is specified for a XUL element, let's assume that we're "keypress". - aEvent = NS_LITERAL_STRING("keypress"); + aEvent.AssignLiteral("keypress"); } void diff --git a/content/xml/content/src/nsXMLCDATASection.cpp b/content/xml/content/src/nsXMLCDATASection.cpp index 0f0046045975..7749aaded9ec 100644 --- a/content/xml/content/src/nsXMLCDATASection.cpp +++ b/content/xml/content/src/nsXMLCDATASection.cpp @@ -127,7 +127,7 @@ nsXMLCDATASection::IsContentOfType(PRUint32 aFlags) const NS_IMETHODIMP nsXMLCDATASection::GetNodeName(nsAString& aNodeName) { - aNodeName.Assign(NS_LITERAL_STRING("#cdata-section")); + aNodeName.AssignLiteral("#cdata-section"); return NS_OK; } diff --git a/content/xml/content/src/nsXMLStylesheetPI.cpp b/content/xml/content/src/nsXMLStylesheetPI.cpp index 9aa4a57216de..08220dc0754d 100644 --- a/content/xml/content/src/nsXMLStylesheetPI.cpp +++ b/content/xml/content/src/nsXMLStylesheetPI.cpp @@ -219,14 +219,14 @@ nsXMLStylesheetPI::GetStyleSheetInfo(nsAString& aTitle, nsAutoString mimeType; nsAutoString notUsed; nsParserUtils::SplitMimeType(type, mimeType, notUsed); - if (!mimeType.IsEmpty() && !mimeType.EqualsIgnoreCase("text/css")) { + if (!mimeType.IsEmpty() && !mimeType.LowerCaseEqualsLiteral("text/css")) { aType.Assign(type); return; } // If we get here we assume that we're loading a css file, so set the // type to 'text/css' - aType.Assign(NS_LITERAL_STRING("text/css")); + aType.AssignLiteral("text/css"); return; } diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index 7fb59fceecfc..30a4028f3bf1 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -1329,7 +1329,7 @@ nsXMLContentSink::HandleProcessingInstruction(const PRUnichar *aTarget, nsParserUtils::GetQuotedAttributeValue(data, NS_LITERAL_STRING("type"), type); if (mState == eXMLContentSinkState_InProlog && target.EqualsLiteral("xml-stylesheet") && - !type.EqualsIgnoreCase("text/css")) { + !type.LowerCaseEqualsLiteral("text/css")) { nsAutoString href, title, media, alternate; nsParserUtils::GetQuotedAttributeValue(data, NS_LITERAL_STRING("href"), href); diff --git a/content/xul/content/src/nsXULPopupListener.cpp b/content/xul/content/src/nsXULPopupListener.cpp index 674815601110..231000c89d5d 100644 --- a/content/xul/content/src/nsXULPopupListener.cpp +++ b/content/xul/content/src/nsXULPopupListener.cpp @@ -450,40 +450,40 @@ static void ConvertPosition(nsIDOMElement* aPopupElt, nsString& aAnchor, nsStrin return; if (position.EqualsLiteral("before_start")) { - aAnchor.Assign(NS_LITERAL_STRING("topleft")); - aAlign.Assign(NS_LITERAL_STRING("bottomleft")); + aAnchor.AssignLiteral("topleft"); + aAlign.AssignLiteral("bottomleft"); } else if (position.EqualsLiteral("before_end")) { - aAnchor.Assign(NS_LITERAL_STRING("topright")); - aAlign.Assign(NS_LITERAL_STRING("bottomright")); + aAnchor.AssignLiteral("topright"); + aAlign.AssignLiteral("bottomright"); } else if (position.EqualsLiteral("after_start")) { - aAnchor.Assign(NS_LITERAL_STRING("bottomleft")); - aAlign.Assign(NS_LITERAL_STRING("topleft")); + aAnchor.AssignLiteral("bottomleft"); + aAlign.AssignLiteral("topleft"); } else if (position.EqualsLiteral("after_end")) { - aAnchor.Assign(NS_LITERAL_STRING("bottomright")); - aAlign.Assign(NS_LITERAL_STRING("topright")); + aAnchor.AssignLiteral("bottomright"); + aAlign.AssignLiteral("topright"); } else if (position.EqualsLiteral("start_before")) { - aAnchor.Assign(NS_LITERAL_STRING("topleft")); - aAlign.Assign(NS_LITERAL_STRING("topright")); + aAnchor.AssignLiteral("topleft"); + aAlign.AssignLiteral("topright"); } else if (position.EqualsLiteral("start_after")) { - aAnchor.Assign(NS_LITERAL_STRING("bottomleft")); - aAlign.Assign(NS_LITERAL_STRING("bottomright")); + aAnchor.AssignLiteral("bottomleft"); + aAlign.AssignLiteral("bottomright"); } else if (position.EqualsLiteral("end_before")) { - aAnchor.Assign(NS_LITERAL_STRING("topright")); - aAlign.Assign(NS_LITERAL_STRING("topleft")); + aAnchor.AssignLiteral("topright"); + aAlign.AssignLiteral("topleft"); } else if (position.EqualsLiteral("end_after")) { - aAnchor.Assign(NS_LITERAL_STRING("bottomright")); - aAlign.Assign(NS_LITERAL_STRING("bottomleft")); + aAnchor.AssignLiteral("bottomright"); + aAlign.AssignLiteral("bottomleft"); } else if (position.EqualsLiteral("overlap")) { - aAnchor.Assign(NS_LITERAL_STRING("topleft")); - aAlign.Assign(NS_LITERAL_STRING("topleft")); + aAnchor.AssignLiteral("topleft"); + aAlign.AssignLiteral("topleft"); } else if (position.EqualsLiteral("after_pointer")) aY += 21; @@ -507,7 +507,7 @@ XULPopupListenerImpl::LaunchPopup(PRInt32 aClientX, PRInt32 aClientY) nsAutoString type(NS_LITERAL_STRING("popup")); if ( popupType == eXULPopupType_context ) { - type.Assign(NS_LITERAL_STRING("context")); + type.AssignLiteral("context"); // position the menu two pixels down and to the right from the current // mouse position. This makes it easier to dismiss the menu by just diff --git a/content/xul/document/src/nsXULContentSink.cpp b/content/xul/document/src/nsXULContentSink.cpp index d80997641f32..693361cd9947 100644 --- a/content/xul/document/src/nsXULContentSink.cpp +++ b/content/xul/document/src/nsXULContentSink.cpp @@ -373,7 +373,7 @@ XULContentSinkImpl::~XULContentSinkImpl() } else { - prefix.Assign(NS_LITERAL_STRING("")); + prefix.AssignLiteral(""); } char* prefixStr = ToNewCString(prefix); @@ -1396,8 +1396,8 @@ XULContentSinkImpl::OpenScript(const PRUnichar** aAttributes, nsAutoString params; nsParserUtils::SplitMimeType(type, mimeType, params); - isJavaScript = mimeType.EqualsIgnoreCase("application/x-javascript") || - mimeType.EqualsIgnoreCase("text/javascript"); + isJavaScript = mimeType.LowerCaseEqualsLiteral("application/x-javascript") || + mimeType.LowerCaseEqualsLiteral("text/javascript"); if (isJavaScript) { JSVersion jsVersion = JSVERSION_DEFAULT; if (params.Find("version=", PR_TRUE) == 0) { @@ -1527,7 +1527,7 @@ XULContentSinkImpl::AddAttributes(const PRUnichar** aAttributes, nsAutoString extraWhiteSpace; PRInt32 cnt = mContextStack.Depth(); while (--cnt >= 0) - extraWhiteSpace.Append(NS_LITERAL_STRING(" ")); + extraWhiteSpace.AppendLiteral(" "); nsAutoString qnameC,valueC; qnameC.Assign(aAttributes[0]); valueC.Assign(aAttributes[1]); diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 380986a97e43..90cc32973f7d 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -366,7 +366,7 @@ nsXULDocument::nsXULDocument(void) // bother initializing members to 0. // Override the default in nsDocument - mCharacterSet.Assign(NS_LITERAL_CSTRING("UTF-8")); + mCharacterSet.AssignLiteral("UTF-8"); } nsXULDocument::~nsXULDocument() @@ -511,7 +511,7 @@ nsXULDocument::ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup) NS_IMETHODIMP nsXULDocument::GetContentType(nsAString& aContentType) { - aContentType.Assign(NS_LITERAL_STRING("application/vnd.mozilla.xul+xml")); + aContentType.AssignLiteral("application/vnd.mozilla.xul+xml"); return NS_OK; } @@ -3802,7 +3802,7 @@ nsXULDocument::BroadcasterHookup::~BroadcasterHookup() rv = mObservesElement->GetAttr(kNameSpaceID_None, nsXULAtoms::observes, broadcasterID); if (NS_FAILED(rv)) return; - attribute.Assign(NS_LITERAL_STRING("*")); + attribute.AssignLiteral("*"); } nsAutoString tagStr; @@ -3925,7 +3925,7 @@ nsXULDocument::CheckBroadcasterHookup(nsXULDocument* aDocument, listener = do_QueryInterface(aElement); - attribute.Assign(NS_LITERAL_STRING("*")); + attribute.AssignLiteral("*"); } // Make sure we got a valid listener. diff --git a/content/xul/templates/src/nsXULContentUtils.cpp b/content/xul/templates/src/nsXULContentUtils.cpp index 79158ec33f18..0b13a56ec585 100644 --- a/content/xul/templates/src/nsXULContentUtils.cpp +++ b/content/xul/templates/src/nsXULContentUtils.cpp @@ -510,13 +510,13 @@ nsXULContentUtils::SetCommandUpdater(nsIDocument* aDocument, nsIContent* aElemen rv = aElement->GetAttr(kNameSpaceID_None, nsXULAtoms::events, events); if (rv != NS_CONTENT_ATTR_HAS_VALUE) - events.Assign(NS_LITERAL_STRING("*")); + events.AssignLiteral("*"); nsAutoString targets; rv = aElement->GetAttr(kNameSpaceID_None, nsXULAtoms::targets, targets); if (rv != NS_CONTENT_ATTR_HAS_VALUE) - targets.Assign(NS_LITERAL_STRING("*")); + targets.AssignLiteral("*"); nsCOMPtr domelement = do_QueryInterface(aElement); NS_ASSERTION(domelement != nsnull, "not a DOM element"); diff --git a/content/xul/templates/src/nsXULSortService.cpp b/content/xul/templates/src/nsXULSortService.cpp index da101b913db3..765b91561e41 100644 --- a/content/xul/templates/src/nsXULSortService.cpp +++ b/content/xul/templates/src/nsXULSortService.cpp @@ -1348,13 +1348,13 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort sortState->sortProperty = sortInfo.sortProperty; nsAutoString resourceUrl = sortResource; - resourceUrl.Append(NS_LITERAL_STRING("?collation=true")); + resourceUrl.AppendLiteral("?collation=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertyColl)); if (NS_FAILED(rv)) return rv; sortState->sortPropertyColl = sortInfo.sortPropertyColl; resourceUrl = sortResource; - resourceUrl.Append(NS_LITERAL_STRING("?sort=true")); + resourceUrl.AppendLiteral("?sort=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertySort)); if (NS_FAILED(rv)) return rv; sortState->sortPropertySort = sortInfo.sortPropertySort; @@ -1366,13 +1366,13 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort sortState->sortProperty2 = sortInfo.sortProperty2; resourceUrl = sortResource2; - resourceUrl.Append(NS_LITERAL_STRING("?collation=true")); + resourceUrl.AppendLiteral("?collation=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertyColl2)); if (NS_FAILED(rv)) return rv; sortState->sortPropertyColl2 = sortInfo.sortPropertyColl2; resourceUrl = sortResource2; - resourceUrl.Append(NS_LITERAL_STRING("?sort=true")); + resourceUrl.AppendLiteral("?sort=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertySort2)); if (NS_FAILED(rv)) return rv; sortState->sortPropertySort2 = sortInfo.sortPropertySort2; @@ -1634,12 +1634,12 @@ XULSortServiceImpl::Sort(nsIDOMNode* node, const nsAString& sortResource, const nsAutoString resourceUrl; resourceUrl.Assign(sortResource); - resourceUrl.Append(NS_LITERAL_STRING("?collation=true")); + resourceUrl.AppendLiteral("?collation=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertyColl)); if (NS_FAILED(rv)) return rv; resourceUrl.Assign(sortResource); - resourceUrl.Append(NS_LITERAL_STRING("?sort=true")); + resourceUrl.AppendLiteral("?sort=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertySort)); if (NS_FAILED(rv)) return rv; @@ -1649,12 +1649,12 @@ XULSortServiceImpl::Sort(nsIDOMNode* node, const nsAString& sortResource, const if (NS_FAILED(rv)) return rv; resourceUrl = sortResource2; - resourceUrl.Append(NS_LITERAL_STRING("?collation=true")); + resourceUrl.AppendLiteral("?collation=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertyColl2)); if (NS_FAILED(rv)) return rv; resourceUrl = sortResource2; - resourceUrl.Append(NS_LITERAL_STRING("?sort=true")); + resourceUrl.AppendLiteral("?sort=true"); rv = gRDFService->GetUnicodeResource(resourceUrl, getter_AddRefs(sortInfo.sortPropertySort2)); if (NS_FAILED(rv)) return rv; } diff --git a/content/xul/templates/src/nsXULTreeBuilder.cpp b/content/xul/templates/src/nsXULTreeBuilder.cpp index 39793238a306..8fb10234f8e7 100644 --- a/content/xul/templates/src/nsXULTreeBuilder.cpp +++ b/content/xul/templates/src/nsXULTreeBuilder.cpp @@ -435,15 +435,15 @@ nsXULTreeBuilder::Sort(nsIDOMElement* aElement) header->GetAttr(kNameSpaceID_None, nsXULAtoms::sortDirection, dir); if (dir.EqualsLiteral("ascending")) { - dir = NS_LITERAL_STRING("descending"); + dir.AssignLiteral("descending"); mSortDirection = eDirection_Descending; } else if (dir.EqualsLiteral("descending")) { - dir = NS_LITERAL_STRING("natural"); + dir.AssignLiteral("natural"); mSortDirection = eDirection_Natural; } else { - dir = NS_LITERAL_STRING("ascending"); + dir.AssignLiteral("ascending"); mSortDirection = eDirection_Ascending; } diff --git a/directory/xpcom/base/src/nsLDAPChannel.cpp b/directory/xpcom/base/src/nsLDAPChannel.cpp index c679e39384c4..74013a8d2084 100644 --- a/directory/xpcom/base/src/nsLDAPChannel.cpp +++ b/directory/xpcom/base/src/nsLDAPChannel.cpp @@ -318,7 +318,7 @@ nsLDAPChannel::SetLoadFlags(nsLoadFlags aLoadFlags) NS_IMETHODIMP nsLDAPChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING(TEXT_PLAIN); + aContentType.AssignLiteral(TEXT_PLAIN); return NS_OK; } diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index f2d1ea97a517..62ee16cc4846 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -141,7 +141,7 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, PRUint32 aFixupF // after it. The easiest way to do that is to call this method again with the // "view-source:" lopped off and then prepend it again afterwards. - if (scheme.EqualsIgnoreCase("view-source")) + if (scheme.LowerCaseEqualsLiteral("view-source")) { nsCOMPtr uri; PRUint32 newFixupFlags = aFixupFlags & ~FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP; @@ -178,9 +178,9 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, PRUint32 aFixupF // http:\\broken.com#odd\ref (stops at hash) // if (scheme.IsEmpty() || - scheme.EqualsIgnoreCase("http") || - scheme.EqualsIgnoreCase("https") || - scheme.EqualsIgnoreCase("ftp")) + scheme.LowerCaseEqualsLiteral("http") || + scheme.LowerCaseEqualsLiteral("https") || + scheme.LowerCaseEqualsLiteral("ftp")) { // Walk the string replacing backslashes with forward slashes until // the end is reached, or a question mark, or a hash, or a forward @@ -208,10 +208,10 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, PRUint32 aFixupF PRBool bUseNonDefaultCharsetForURI = !bAsciiURI && (scheme.IsEmpty() || - scheme.EqualsIgnoreCase("http") || - scheme.EqualsIgnoreCase("https") || - scheme.EqualsIgnoreCase("ftp") || - scheme.EqualsIgnoreCase("file")); + scheme.LowerCaseEqualsLiteral("http") || + scheme.LowerCaseEqualsLiteral("https") || + scheme.LowerCaseEqualsLiteral("ftp") || + scheme.LowerCaseEqualsLiteral("file")); // Now we need to check whether "scheme" is something we don't // really know about. @@ -641,7 +641,7 @@ const char * nsDefaultURIFixup::GetFileSystemCharset() rv = plat->GetCharset(kPlatformCharsetSel_FileName, charset); if (charset.IsEmpty()) - mFsCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + mFsCharset.AssignLiteral("ISO-8859-1"); else mFsCharset.Assign(charset); } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 2904c7c7304e..49ab3c9043d1 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -1020,22 +1020,22 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget, *aResult = nsnull; *aIsNewWindow = PR_FALSE; - if(!name.Length() || name.EqualsIgnoreCase("_self")) + if(!name.Length() || name.LowerCaseEqualsLiteral("_self")) { *aResult = this; } - else if (name.EqualsIgnoreCase("_blank") || name.EqualsIgnoreCase("_new")) + else if (name.LowerCaseEqualsLiteral("_blank") || name.LowerCaseEqualsLiteral("_new")) { mustMakeNewWindow = PR_TRUE; name.Truncate(); } - else if(name.EqualsIgnoreCase("_parent")) + else if(name.LowerCaseEqualsLiteral("_parent")) { GetSameTypeParent(getter_AddRefs(treeItem)); if(!treeItem) *aResult = this; } - else if(name.EqualsIgnoreCase("_top")) + else if(name.LowerCaseEqualsLiteral("_top")) { GetSameTypeRootTreeItem(getter_AddRefs(treeItem)); if(!treeItem) @@ -1043,7 +1043,7 @@ nsresult nsDocShell::FindTarget(const PRUnichar *aWindowTarget, } // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details - else if(name.EqualsIgnoreCase("_content") || name.EqualsLiteral("_main")) + else if(name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main")) { if (mTreeOwner) { mTreeOwner->FindItemWithName(name.get(), nsnull, @@ -2573,7 +2573,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR aURI->GetScheme(scheme); CopyASCIItoUCS2(scheme, formatStrs[0]); formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("protocolNotFound")); + error.AssignLiteral("protocolNotFound"); } else if (NS_ERROR_FILE_NOT_FOUND == aError) { NS_ENSURE_ARG_POINTER(aURI); @@ -2591,7 +2591,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR rv = NS_OK; } formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("fileNotFound")); + error.AssignLiteral("fileNotFound"); } else if (NS_ERROR_UNKNOWN_HOST == aError) { NS_ENSURE_ARG_POINTER(aURI); @@ -2600,7 +2600,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR aURI->GetHost(host); CopyUTF8toUTF16(host, formatStrs[0]); formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("dnsNotFound")); + error.AssignLiteral("dnsNotFound"); } else if(NS_ERROR_CONNECTION_REFUSED == aError) { NS_ENSURE_ARG_POINTER(aURI); @@ -2609,7 +2609,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR aURI->GetHostPort(hostport); CopyUTF8toUTF16(hostport, formatStrs[0]); formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("connectionFailure")); + error.AssignLiteral("connectionFailure"); } else if(NS_ERROR_NET_INTERRUPT == aError) { NS_ENSURE_ARG_POINTER(aURI); @@ -2618,7 +2618,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR aURI->GetHostPort(hostport); CopyUTF8toUTF16(hostport, formatStrs[0]); formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("netInterrupt")); + error.AssignLiteral("netInterrupt"); } else if (NS_ERROR_NET_TIMEOUT == aError) { NS_ENSURE_ARG_POINTER(aURI); @@ -2627,48 +2627,48 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aUR aURI->GetHost(host); CopyUTF8toUTF16(host, formatStrs[0]); formatStrCount = 1; - error.Assign(NS_LITERAL_STRING("netTimeout")); + error.AssignLiteral("netTimeout"); } else { // Errors requiring simple formatting switch (aError) { case NS_ERROR_MALFORMED_URI: // URI is malformed - error.Assign(NS_LITERAL_STRING("malformedURI")); + error.AssignLiteral("malformedURI"); break; case NS_ERROR_REDIRECT_LOOP: // Doc failed to load because the server generated too many redirects - error.Assign(NS_LITERAL_STRING("redirectLoop")); + error.AssignLiteral("redirectLoop"); break; case NS_ERROR_UNKNOWN_SOCKET_TYPE: // Doc failed to load because PSM is not installed - error.Assign(NS_LITERAL_STRING("unknownSocketType")); + error.AssignLiteral("unknownSocketType"); break; case NS_ERROR_NET_RESET: // Doc failed to load because the server kept reseting the connection // before we could read any data from it - error.Assign(NS_LITERAL_STRING("netReset")); + error.AssignLiteral("netReset"); break; case NS_ERROR_DOCUMENT_NOT_CACHED: // Doc falied to load because we are offline and the cache does not // contain a copy of the document. - error.Assign(NS_LITERAL_STRING("netOffline")); + error.AssignLiteral("netOffline"); break; case NS_ERROR_DOCUMENT_IS_PRINTMODE: // Doc navigation attempted while Printing or Print Preview - error.Assign(NS_LITERAL_STRING("isprinting")); + error.AssignLiteral("isprinting"); break; case NS_ERROR_PORT_ACCESS_NOT_ALLOWED: // Port blocked for security reasons - error.Assign(NS_LITERAL_STRING("deniedPortAccess")); + error.AssignLiteral("deniedPortAccess"); break; case NS_ERROR_UNKNOWN_PROXY_HOST: // Proxy hostname could not be resolved. - error.Assign(NS_LITERAL_STRING("proxyResolveFailure")); + error.AssignLiteral("proxyResolveFailure"); break; case NS_ERROR_PROXY_CONNECTION_REFUSED: // Proxy connection was refused. - error.Assign(NS_LITERAL_STRING("proxyConnectFailure")); + error.AssignLiteral("proxyConnectFailure"); break; } } @@ -2747,11 +2747,11 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL, const PRUnichar * nsAutoString errorType(aErrorType); nsAutoString errorPageUrl; - errorPageUrl.Assign(NS_LITERAL_STRING("chrome://global/content/netError.xhtml?e=")); + errorPageUrl.AssignLiteral("chrome://global/content/netError.xhtml?e="); errorPageUrl.AppendWithConversion(escapedError); - errorPageUrl.Append(NS_LITERAL_STRING("&u=")); + errorPageUrl.AppendLiteral("&u="); errorPageUrl.AppendWithConversion(escapedUrl); - errorPageUrl.Append(NS_LITERAL_STRING("&d=")); + errorPageUrl.AppendLiteral("&d="); errorPageUrl.AppendWithConversion(escapedDescription); PR_FREEIF(escapedDescription); @@ -2981,7 +2981,7 @@ nsDocShell::LoadPage(nsISupports *aPageDescriptor, PRUint32 aDisplayType) return rv; oldUri->GetSpec(spec); - newSpec.Append(NS_LITERAL_CSTRING("view-source:")); + newSpec.AppendLiteral("view-source:"); newSpec.Append(spec); rv = NS_NewURI(getter_AddRefs(newUri), newSpec); @@ -5183,8 +5183,8 @@ nsDocShell::InternalLoad(nsIURI * aURI, // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details if (!bIsJavascript && - (name.EqualsIgnoreCase("_content") || name.EqualsLiteral("_main") || - name.EqualsIgnoreCase("_blank"))) + (name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main") || + name.LowerCaseEqualsLiteral("_blank"))) { nsCOMPtr extProtService; nsCAutoString urlScheme; @@ -5220,15 +5220,15 @@ nsDocShell::InternalLoad(nsIURI * aURI, } } if (!bIsChromeOrResource) { - if (name.EqualsIgnoreCase("_blank") || - name.EqualsIgnoreCase("_new")) { - name.Assign(NS_LITERAL_STRING("_top")); + if (name.LowerCaseEqualsLiteral("_blank") || + name.LowerCaseEqualsLiteral("_new")) { + name.AssignLiteral("_top"); } // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details - else if (!name.EqualsIgnoreCase("_parent") && - !name.EqualsIgnoreCase("_self") && - !name.EqualsIgnoreCase("_content") && + else if (!name.LowerCaseEqualsLiteral("_parent") && + !name.LowerCaseEqualsLiteral("_self") && + !name.LowerCaseEqualsLiteral("_content") && !name.EqualsLiteral("_main")) { nsCOMPtr targetTreeItem; FindItemWithName(name.get(), @@ -5237,7 +5237,7 @@ nsDocShell::InternalLoad(nsIURI * aURI, if (targetTreeItem) targetDocShell = do_QueryInterface(targetTreeItem); else - name.Assign(NS_LITERAL_STRING("_top")); + name.AssignLiteral("_top"); } } } diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index 1bd45e2719b6..f620b3661c9d 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -664,7 +664,7 @@ nsWebShell::OnLinkClickSyncInternal(nsIContent *aContent, switch(aVerb) { case eLinkVerb_New: - target.Assign(NS_LITERAL_STRING("_blank")); + target.AssignLiteral("_blank"); // Fall into replace case case eLinkVerb_Undefined: // Fall through, this seems like the most reasonable action diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index ffdfd85f32c6..ca97d4caa694 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -2247,7 +2247,7 @@ GlobalWindowImpl::MakeScriptDialogTitle(const nsAString &aInTitle, nsAString &aO // Just in case if (aOutTitle.IsEmpty()) { NS_WARNING("could not get ScriptDlgTitle string from string bundle"); - aOutTitle.Assign(NS_LITERAL_STRING("[Script] ")); + aOutTitle.AssignLiteral("[Script] "); aOutTitle.Append(aInTitle); } } @@ -3140,9 +3140,9 @@ PRBool GlobalWindowImpl::CheckOpenAllow(PRUint32 aAbuseLevel, // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details if (!name.IsEmpty()) { - if (name.EqualsIgnoreCase("_top") || - name.EqualsIgnoreCase("_self") || - name.EqualsIgnoreCase("_content") || + if (name.LowerCaseEqualsLiteral("_top") || + name.LowerCaseEqualsLiteral("_self") || + name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main")) allowWindow = PR_TRUE; else { @@ -5883,14 +5883,14 @@ NavigatorImpl::GetAppVersion(nsAString& aAppVersion) res = service->GetAppVersion(str); CopyASCIItoUCS2(str, aAppVersion); - aAppVersion.Append(NS_LITERAL_STRING(" (")); + aAppVersion.AppendLiteral(" ("); res = service->GetPlatform(str); if (NS_FAILED(res)) return res; AppendASCIItoUTF16(str, aAppVersion); - aAppVersion.Append(NS_LITERAL_STRING("; ")); + aAppVersion.AppendLiteral("; "); res = service->GetLanguage(str); if (NS_FAILED(res)) return res; @@ -5906,7 +5906,7 @@ NavigatorImpl::GetAppVersion(nsAString& aAppVersion) NS_IMETHODIMP NavigatorImpl::GetAppName(nsAString& aAppName) { - aAppName.Assign(NS_LITERAL_STRING("Netscape")); + aAppName.AssignLiteral("Netscape"); return NS_OK; } @@ -5936,13 +5936,13 @@ NavigatorImpl::GetPlatform(nsAString& aPlatform) // likewise hardcoded and we're seeking backward compatibility // here (bug 47080) #if defined(WIN32) - aPlatform = NS_LITERAL_STRING("Win32"); + aPlatform.AssignLiteral("Win32"); #elif defined(XP_MAC) || defined(XP_MACOSX) // XXX not sure what to do about Mac OS X on non-PPC, but since Comm 4.x // doesn't know about it this will actually be backward compatible - aPlatform = NS_LITERAL_STRING("MacPPC"); + aPlatform.AssignLiteral("MacPPC"); #elif defined(XP_OS2) - aPlatform = NS_LITERAL_STRING("OS/2"); + aPlatform.AssignLiteral("OS/2"); #else // XXX Communicator uses compiled-in build-time string defines // to indicate the platform it was compiled *for*, not what it is diff --git a/editor/composer/src/nsComposeTxtSrvFilter.cpp b/editor/composer/src/nsComposeTxtSrvFilter.cpp index 09abde87e2dc..1b487ae81574 100644 --- a/editor/composer/src/nsComposeTxtSrvFilter.cpp +++ b/editor/composer/src/nsComposeTxtSrvFilter.cpp @@ -73,14 +73,14 @@ nsComposeTxtSrvFilter::Skip(nsIDOMNode* aNode, PRBool *_retval) if (mIsForMail) { nsAutoString cite; if (NS_SUCCEEDED(content->GetAttr(kNameSpaceID_None, mTypeAtom, cite))) { - *_retval = cite.EqualsIgnoreCase("cite"); + *_retval = cite.LowerCaseEqualsLiteral("cite"); } } } else if (tag == mPreAtom || tag == mSpanAtom) { if (mIsForMail) { nsAutoString mozQuote; if (NS_SUCCEEDED(content->GetAttr(kNameSpaceID_None, mMozQuoteAtom, mozQuote))) { - *_retval = mozQuote.EqualsIgnoreCase("true"); + *_retval = mozQuote.LowerCaseEqualsLiteral("true"); } } } else if (tag == mScriptAtom || diff --git a/editor/composer/src/nsComposerCommands.cpp b/editor/composer/src/nsComposerCommands.cpp index f3978cc75453..c7cd0f80aaee 100644 --- a/editor/composer/src/nsComposerCommands.cpp +++ b/editor/composer/src/nsComposerCommands.cpp @@ -283,12 +283,12 @@ nsStyleUpdatingCommand::ToggleState(nsIEditor *aEditor, const char* aTagName) if (tagName.EqualsLiteral("sub")) { - removeName.AssignWithConversion("sup"); + removeName.AssignLiteral("sup"); rv = RemoveTextProperty(aEditor,tagName.get(), nsnull); } else if (tagName.EqualsLiteral("sup")) { - removeName.AssignWithConversion("sub"); + removeName.AssignLiteral("sub"); rv = RemoveTextProperty(aEditor, tagName.get(), nsnull); } if (NS_SUCCEEDED(rv)) @@ -1052,19 +1052,19 @@ nsAlignCommand::GetCurrentState(nsIEditor *aEditor, nsICommandParams *aParams) { default: case nsIHTMLEditor::eLeft: - outStateString.Assign(NS_LITERAL_STRING("left")); + outStateString.AssignLiteral("left"); break; case nsIHTMLEditor::eCenter: - outStateString.Assign(NS_LITERAL_STRING("center")); + outStateString.AssignLiteral("center"); break; case nsIHTMLEditor::eRight: - outStateString.Assign(NS_LITERAL_STRING("right")); + outStateString.AssignLiteral("right"); break; case nsIHTMLEditor::eJustify: - outStateString.Assign(NS_LITERAL_STRING("justify")); + outStateString.AssignLiteral("justify"); break; } nsCAutoString tOutStateString; @@ -1133,7 +1133,7 @@ nsAbsolutePositioningCommand::GetCurrentState(nsIEditor *aEditor, const char* aT nsAutoString outStateString; if (elt) - outStateString.Assign(NS_LITERAL_STRING("absolute")); + outStateString.AssignLiteral("absolute"); aParams->SetBooleanValue(STATE_MIXED,PR_FALSE); aParams->SetCStringValue(STATE_ATTRIBUTE, NS_ConvertUCS2toUTF8(outStateString).get()); @@ -1567,9 +1567,9 @@ nsInsertTagCommand::DoCommandParams(const char *aCommandName, // filter out tags we don't know how to insert nsAutoString attributeType; if (0 == nsCRT::strcmp(mTagName, "a")) { - attributeType = NS_LITERAL_STRING("href"); + attributeType.AssignLiteral("href"); } else if (0 == nsCRT::strcmp(mTagName, "img")) { - attributeType = NS_LITERAL_STRING("src"); + attributeType.AssignLiteral("src"); } else { return NS_ERROR_NOT_IMPLEMENTED; } @@ -1632,11 +1632,11 @@ GetListState(nsIEditor *aEditor, PRBool *aMixed, PRUnichar **_retval) { nsAutoString tagStr; if (bOL) - tagStr.AssignWithConversion("ol"); + tagStr.AssignLiteral("ol"); else if (bUL) - tagStr.AssignWithConversion("ul"); + tagStr.AssignLiteral("ul"); else if (bDL) - tagStr.AssignWithConversion("dl"); + tagStr.AssignLiteral("dl"); *_retval = ToNewUnicode(tagStr); } } diff --git a/editor/composer/src/nsEditingSession.cpp b/editor/composer/src/nsEditingSession.cpp index ede0bf96f4bd..dd0dd950e92d 100644 --- a/editor/composer/src/nsEditingSession.cpp +++ b/editor/composer/src/nsEditingSession.cpp @@ -316,7 +316,7 @@ nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *aWindow) if (IsSupportedTextType(mimeCType.get())) { - mEditorType = NS_LITERAL_CSTRING("text"); + mEditorType.AssignLiteral("text"); mimeCType = "text/plain"; } else if (!mimeCType.EqualsLiteral("text/html")) @@ -325,8 +325,8 @@ nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *aWindow) mEditorStatus = eEditorErrorCantEditMimeType; // Turn editor into HTML -- we will load blank page later - mEditorType = NS_LITERAL_CSTRING("html"); - mimeCType = NS_LITERAL_CSTRING("text/html"); + mEditorType.AssignLiteral("html"); + mimeCType.AssignLiteral("text/html"); } } } diff --git a/editor/libeditor/base/ChangeAttributeTxn.cpp b/editor/libeditor/base/ChangeAttributeTxn.cpp index 71bf3caa4e1f..d5568f07e213 100644 --- a/editor/libeditor/base/ChangeAttributeTxn.cpp +++ b/editor/libeditor/base/ChangeAttributeTxn.cpp @@ -124,12 +124,12 @@ NS_IMETHODIMP ChangeAttributeTxn::Merge(nsITransaction *aTransaction, PRBool *aD NS_IMETHODIMP ChangeAttributeTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("ChangeAttributeTxn: [mRemoveAttribute == ")); + aString.AssignLiteral("ChangeAttributeTxn: [mRemoveAttribute == "); if (!mRemoveAttribute) - aString += NS_LITERAL_STRING("false] "); + aString.AppendLiteral("false] "); else - aString += NS_LITERAL_STRING("true] "); + aString.AppendLiteral("true] "); aString += mAttribute; return NS_OK; } diff --git a/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp b/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp index 9914ff578e40..48c6ed98591a 100644 --- a/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp +++ b/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp @@ -316,12 +316,12 @@ NS_IMETHODIMP ChangeCSSInlineStyleTxn::Merge(nsITransaction *aTransaction, PRBoo NS_IMETHODIMP ChangeCSSInlineStyleTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("ChangeCSSInlineStyleTxn: [mRemoveProperty == ")); + aString.AssignLiteral("ChangeCSSInlineStyleTxn: [mRemoveProperty == "); if (!mRemoveProperty) - aString += NS_LITERAL_STRING("false] "); + aString.AppendLiteral("false] "); else - aString += NS_LITERAL_STRING("true] "); + aString.AppendLiteral("true] "); nsAutoString tempString; mProperty->ToString(tempString); aString += tempString; @@ -343,8 +343,7 @@ NS_IMETHODIMP ChangeCSSInlineStyleTxn::AddValueToMultivalueProperty(nsAString & aValues, const nsAString & aNewValue) { if (aValues.IsEmpty() - || aValues.Equals(NS_LITERAL_STRING("none"), - nsCaseInsensitiveStringComparator())) { + || aValues.LowerCaseEqualsLiteral("none")) { // the list of values is empty of the value is 'none' aValues.Assign(aNewValue); } diff --git a/editor/libeditor/base/CreateElementTxn.cpp b/editor/libeditor/base/CreateElementTxn.cpp index 477b94aa7ab7..3d951bc38f59 100644 --- a/editor/libeditor/base/CreateElementTxn.cpp +++ b/editor/libeditor/base/CreateElementTxn.cpp @@ -230,7 +230,7 @@ NS_IMETHODIMP CreateElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid NS_IMETHODIMP CreateElementTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("CreateElementTxn: ")); + aString.AssignLiteral("CreateElementTxn: "); aString += mTag; return NS_OK; } diff --git a/editor/libeditor/base/DeleteElementTxn.cpp b/editor/libeditor/base/DeleteElementTxn.cpp index 63e7ab593516..3106644d2d4e 100644 --- a/editor/libeditor/base/DeleteElementTxn.cpp +++ b/editor/libeditor/base/DeleteElementTxn.cpp @@ -183,6 +183,6 @@ NS_IMETHODIMP DeleteElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid NS_IMETHODIMP DeleteElementTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("DeleteElementTxn")); + aString.AssignLiteral("DeleteElementTxn"); return NS_OK; } diff --git a/editor/libeditor/base/DeleteRangeTxn.cpp b/editor/libeditor/base/DeleteRangeTxn.cpp index 5cf8c5f44da6..36ba0909cb57 100644 --- a/editor/libeditor/base/DeleteRangeTxn.cpp +++ b/editor/libeditor/base/DeleteRangeTxn.cpp @@ -223,7 +223,7 @@ NS_IMETHODIMP DeleteRangeTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe NS_IMETHODIMP DeleteRangeTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("DeleteRangeTxn")); + aString.AssignLiteral("DeleteRangeTxn"); return NS_OK; } diff --git a/editor/libeditor/base/DeleteTextTxn.cpp b/editor/libeditor/base/DeleteTextTxn.cpp index d784459ad306..5b1e014222f7 100644 --- a/editor/libeditor/base/DeleteTextTxn.cpp +++ b/editor/libeditor/base/DeleteTextTxn.cpp @@ -140,7 +140,7 @@ NS_IMETHODIMP DeleteTextTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMer NS_IMETHODIMP DeleteTextTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("DeleteTextTxn: ")); + aString.AssignLiteral("DeleteTextTxn: "); aString += mDeletedText; return NS_OK; } diff --git a/editor/libeditor/base/EditAggregateTxn.cpp b/editor/libeditor/base/EditAggregateTxn.cpp index 0baec506110d..8cd19534f5fe 100644 --- a/editor/libeditor/base/EditAggregateTxn.cpp +++ b/editor/libeditor/base/EditAggregateTxn.cpp @@ -141,7 +141,7 @@ NS_IMETHODIMP EditAggregateTxn::Merge(nsITransaction *aTransaction, PRBool *aDid NS_IMETHODIMP EditAggregateTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("EditAggregateTxn: ")); + aString.AssignLiteral("EditAggregateTxn: "); if (mName) { diff --git a/editor/libeditor/base/EditTxn.cpp b/editor/libeditor/base/EditTxn.cpp index 10fc35a18077..644829c0139e 100644 --- a/editor/libeditor/base/EditTxn.cpp +++ b/editor/libeditor/base/EditTxn.cpp @@ -77,7 +77,7 @@ NS_IMETHODIMP EditTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) NS_IMETHODIMP EditTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("EditTxn")); + aString.AssignLiteral("EditTxn"); return NS_OK; } diff --git a/editor/libeditor/base/IMETextTxn.cpp b/editor/libeditor/base/IMETextTxn.cpp index 6dc6ac09aea4..de6618fe55b9 100644 --- a/editor/libeditor/base/IMETextTxn.cpp +++ b/editor/libeditor/base/IMETextTxn.cpp @@ -191,7 +191,7 @@ NS_IMETHODIMP IMETextTxn::MarkFixed(void) NS_IMETHODIMP IMETextTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("IMETextTxn: ")); + aString.AssignLiteral("IMETextTxn: "); aString += mStringToInsert; return NS_OK; } diff --git a/editor/libeditor/base/InsertElementTxn.cpp b/editor/libeditor/base/InsertElementTxn.cpp index fef8ce355d14..d365d2522f2f 100644 --- a/editor/libeditor/base/InsertElementTxn.cpp +++ b/editor/libeditor/base/InsertElementTxn.cpp @@ -157,6 +157,6 @@ NS_IMETHODIMP InsertElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid NS_IMETHODIMP InsertElementTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("InsertElementTxn")); + aString.AssignLiteral("InsertElementTxn"); return NS_OK; } diff --git a/editor/libeditor/base/InsertTextTxn.cpp b/editor/libeditor/base/InsertTextTxn.cpp index e14ab4f122ba..8775540777e5 100644 --- a/editor/libeditor/base/InsertTextTxn.cpp +++ b/editor/libeditor/base/InsertTextTxn.cpp @@ -210,7 +210,7 @@ NS_IMETHODIMP InsertTextTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMer NS_IMETHODIMP InsertTextTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("InsertTextTxn: ")); + aString.AssignLiteral("InsertTextTxn: "); aString += mStringToInsert; return NS_OK; } diff --git a/editor/libeditor/base/JoinElementTxn.cpp b/editor/libeditor/base/JoinElementTxn.cpp index 64104edc96d6..424be2b73434 100644 --- a/editor/libeditor/base/JoinElementTxn.cpp +++ b/editor/libeditor/base/JoinElementTxn.cpp @@ -178,6 +178,6 @@ nsresult JoinElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) NS_IMETHODIMP JoinElementTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("JoinElementTxn")); + aString.AssignLiteral("JoinElementTxn"); return NS_OK; } diff --git a/editor/libeditor/base/PlaceholderTxn.cpp b/editor/libeditor/base/PlaceholderTxn.cpp index 1367ae1c466b..842fb9aec6e2 100644 --- a/editor/libeditor/base/PlaceholderTxn.cpp +++ b/editor/libeditor/base/PlaceholderTxn.cpp @@ -238,7 +238,7 @@ NS_IMETHODIMP PlaceholderTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe NS_IMETHODIMP PlaceholderTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("PlaceholderTxn: ")); + aString.AssignLiteral("PlaceholderTxn: "); if (mName) { diff --git a/editor/libeditor/base/SetDocTitleTxn.cpp b/editor/libeditor/base/SetDocTitleTxn.cpp index 96246964e466..aeb9314f393b 100644 --- a/editor/libeditor/base/SetDocTitleTxn.cpp +++ b/editor/libeditor/base/SetDocTitleTxn.cpp @@ -226,7 +226,7 @@ NS_IMETHODIMP SetDocTitleTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe NS_IMETHODIMP SetDocTitleTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("SetDocTitleTxn: ")); + aString.AssignLiteral("SetDocTitleTxn: "); aString += mValue; return NS_OK; } diff --git a/editor/libeditor/base/SplitElementTxn.cpp b/editor/libeditor/base/SplitElementTxn.cpp index fd8442f64b82..1ad362f69540 100644 --- a/editor/libeditor/base/SplitElementTxn.cpp +++ b/editor/libeditor/base/SplitElementTxn.cpp @@ -222,7 +222,7 @@ NS_IMETHODIMP SplitElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDidM NS_IMETHODIMP SplitElementTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("SplitElementTxn")); + aString.AssignLiteral("SplitElementTxn"); return NS_OK; } diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index bdf34a99e492..c82d4da080ef 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -2315,7 +2315,7 @@ nsresult nsEditor::GetTextNodeTag(nsAString& aOutString) { if ( (gTextNodeTag = new nsString) == 0 ) return NS_ERROR_OUT_OF_MEMORY; - gTextNodeTag->Assign(NS_LITERAL_STRING("special text node tag")); + gTextNodeTag->AssignLiteral("special text node tag"); } aOutString = *gTextNodeTag; return NS_OK; @@ -3555,7 +3555,7 @@ nsEditor::TagCanContain(const nsAString &aParentTag, nsIDOMNode* aChild) if (IsTextNode(aChild)) { - childStringTag.Assign(NS_LITERAL_STRING("__moz_text")); + childStringTag.AssignLiteral("__moz_text"); } else { diff --git a/editor/libeditor/base/nsStyleSheetTxns.cpp b/editor/libeditor/base/nsStyleSheetTxns.cpp index 05d50e103cdb..16bd686a81da 100644 --- a/editor/libeditor/base/nsStyleSheetTxns.cpp +++ b/editor/libeditor/base/nsStyleSheetTxns.cpp @@ -139,7 +139,7 @@ AddStyleSheetTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) NS_IMETHODIMP AddStyleSheetTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("AddStyleSheetTxn")); + aString.AssignLiteral("AddStyleSheetTxn"); return NS_OK; } @@ -214,6 +214,6 @@ RemoveStyleSheetTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) NS_IMETHODIMP RemoveStyleSheetTxn::GetTxnDescription(nsAString& aString) { - aString.Assign(NS_LITERAL_STRING("RemoveStyleSheetTxn")); + aString.AssignLiteral("RemoveStyleSheetTxn"); return NS_OK; } diff --git a/editor/libeditor/html/nsEditorTxnLog.cpp b/editor/libeditor/html/nsEditorTxnLog.cpp index df815dcd3cd6..3e4d2829e3b2 100644 --- a/editor/libeditor/html/nsEditorTxnLog.cpp +++ b/editor/libeditor/html/nsEditorTxnLog.cpp @@ -340,7 +340,7 @@ nsEditorTxnLog::WriteTransaction(nsITransaction *aTransaction) if (txn) { txn->GetTxnDescription(str); if (str.IsEmpty()) - str.Assign(NS_LITERAL_STRING("")); + str.AssignLiteral(""); } return Write(NS_LossyConvertUCS2toASCII(str).get()); diff --git a/editor/libeditor/html/nsHTMLAbsPosition.cpp b/editor/libeditor/html/nsHTMLAbsPosition.cpp index a38cb13ea1f5..10a6ea20716e 100644 --- a/editor/libeditor/html/nsHTMLAbsPosition.cpp +++ b/editor/libeditor/html/nsHTMLAbsPosition.cpp @@ -729,9 +729,9 @@ nsHTMLEditor::CheckPositionedElementBGandFG(nsIDOMElement * aElement, if (r >= BLACK_BG_RGB_TRIGGER && g >= BLACK_BG_RGB_TRIGGER && b >= BLACK_BG_RGB_TRIGGER) - aReturn = NS_LITERAL_STRING("black"); + aReturn.AssignLiteral("black"); else - aReturn = NS_LITERAL_STRING("white"); + aReturn.AssignLiteral("white"); return NS_OK; } } diff --git a/editor/libeditor/html/nsHTMLCSSUtils.cpp b/editor/libeditor/html/nsHTMLCSSUtils.cpp index d7d54e7d2226..c18e929c2757 100644 --- a/editor/libeditor/html/nsHTMLCSSUtils.cpp +++ b/editor/libeditor/html/nsHTMLCSSUtils.cpp @@ -63,10 +63,10 @@ void ProcessBValue(const nsAString * aInputString, nsAString & aOutputString, const char * aPrependString, const char* aAppendString) { if (aInputString && aInputString->EqualsLiteral("-moz-editor-invert-value")) { - aOutputString.Assign(NS_LITERAL_STRING("normal")); + aOutputString.AssignLiteral("normal"); } else { - aOutputString.Assign(NS_LITERAL_STRING("bold")); + aOutputString.AssignLiteral("bold"); } } @@ -116,7 +116,7 @@ void ProcessLengthValue(const nsAString * aInputString, nsAString & aOutputStrin if (aInputString) { aOutputString.Append(*aInputString); if (-1 == aOutputString.FindChar(PRUnichar('%'))) { - aOutputString.Append(NS_LITERAL_STRING("px")); + aOutputString.AppendLiteral("px"); } } } @@ -129,19 +129,19 @@ void ProcessListStyleTypeValue(const nsAString * aInputString, nsAString & aOutp aOutputString.Truncate(); if (aInputString) { if (aInputString->EqualsLiteral("1")) { - aOutputString.Append(NS_LITERAL_STRING("decimal")); + aOutputString.AppendLiteral("decimal"); } else if (aInputString->EqualsLiteral("a")) { - aOutputString.Append(NS_LITERAL_STRING("lower-alpha")); + aOutputString.AppendLiteral("lower-alpha"); } else if (aInputString->EqualsLiteral("A")) { - aOutputString.Append(NS_LITERAL_STRING("upper-alpha")); + aOutputString.AppendLiteral("upper-alpha"); } else if (aInputString->EqualsLiteral("i")) { - aOutputString.Append(NS_LITERAL_STRING("lower-roman")); + aOutputString.AppendLiteral("lower-roman"); } else if (aInputString->EqualsLiteral("I")) { - aOutputString.Append(NS_LITERAL_STRING("upper-roman")); + aOutputString.AppendLiteral("upper-roman"); } else if (aInputString->EqualsLiteral("square") || aInputString->EqualsLiteral("circle") @@ -160,14 +160,14 @@ void ProcessMarginLeftValue(const nsAString * aInputString, nsAString & aOutputS if (aInputString) { if (aInputString->EqualsLiteral("center") || aInputString->EqualsLiteral("-moz-center")) { - aOutputString.Append(NS_LITERAL_STRING("auto")); + aOutputString.AppendLiteral("auto"); } else if (aInputString->EqualsLiteral("right") || aInputString->EqualsLiteral("-moz-right")) { - aOutputString.Append(NS_LITERAL_STRING("auto")); + aOutputString.AppendLiteral("auto"); } else { - aOutputString.Append(NS_LITERAL_STRING("0px")); + aOutputString.AppendLiteral("0px"); } } } @@ -181,14 +181,14 @@ void ProcessMarginRightValue(const nsAString * aInputString, nsAString & aOutput if (aInputString) { if (aInputString->EqualsLiteral("center") || aInputString->EqualsLiteral("-moz-center")) { - aOutputString.Append(NS_LITERAL_STRING("auto")); + aOutputString.AppendLiteral("auto"); } else if (aInputString->EqualsLiteral("left") || aInputString->EqualsLiteral("-moz-left")) { - aOutputString.Append(NS_LITERAL_STRING("auto")); + aOutputString.AppendLiteral("auto"); } else { - aOutputString.Append(NS_LITERAL_STRING("0px")); + aOutputString.AppendLiteral("0px"); } } } @@ -690,7 +690,7 @@ nsHTMLCSSUtils::GetDefaultBackgroundColor(nsAString & aColor) nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &result); if (NS_FAILED(result)) return result; - aColor.Assign(NS_LITERAL_STRING("#ffffff")); + aColor.AssignLiteral("#ffffff"); nsXPIDLCString returnColor; if (prefBranch) { PRBool useCustomColors; @@ -726,7 +726,7 @@ nsHTMLCSSUtils::GetDefaultLengthUnit(nsAString & aLengthUnit) nsCOMPtr prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &result); if (NS_FAILED(result)) return result; - aLengthUnit.Assign(NS_LITERAL_STRING("px")); + aLengthUnit.AssignLiteral("px"); if (NS_SUCCEEDED(result) && prefBranch) { nsXPIDLCString returnLengthUnit; result = prefBranch->GetCharPref("editor.css.default_length_unit", @@ -1177,7 +1177,7 @@ nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode, } else { aIsSet = PR_FALSE; - valueString.Assign(NS_LITERAL_STRING("normal")); + valueString.AssignLiteral("normal"); } } } @@ -1191,13 +1191,13 @@ nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode, else if (nsEditProperty::u == aHTMLProperty) { nsAutoString val; - val.Assign(NS_LITERAL_STRING("underline")); + val.AssignLiteral("underline"); aIsSet = PRBool(ChangeCSSInlineStyleTxn::ValueIncludes(valueString, val, PR_FALSE)); } else if (nsEditProperty::strike == aHTMLProperty) { nsAutoString val; - val.Assign(NS_LITERAL_STRING("line-through")); + val.AssignLiteral("line-through"); aIsSet = PRBool(ChangeCSSInlineStyleTxn::ValueIncludes(valueString, val, PR_FALSE)); } @@ -1214,7 +1214,7 @@ nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode, if (NS_ColorNameToRGB(htmlValueString, &rgba) || NS_HexToRGB(subStr, &rgba)) { nsAutoString htmlColor, tmpStr; - htmlColor.Append(NS_LITERAL_STRING("rgb(")); + htmlColor.AppendLiteral("rgb("); NS_NAMED_LITERAL_STRING(comma, ", "); diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index 9d0b1af81955..ecb9744e1831 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -775,7 +775,7 @@ nsHTMLEditor::GetAttributeToModifyOnNode(nsIDOMNode *aNode, nsAString &aAttr) nsCOMPtr nodeAsAnchor = do_QueryInterface(aNode); if (nodeAsAnchor) { - aAttr = NS_LITERAL_STRING("href"); + aAttr.AssignLiteral("href"); return NS_OK; } @@ -825,7 +825,7 @@ nsHTMLEditor::GetAttributeToModifyOnNode(nsIDOMNode *aNode, nsAString &aAttr) nsCOMPtr nodeAsObject = do_QueryInterface(aNode); if (nodeAsObject) { - aAttr = NS_LITERAL_STRING("data"); + aAttr.AssignLiteral("data"); return NS_OK; } @@ -857,10 +857,9 @@ nsHTMLEditor::GetAttributeToModifyOnNode(nsIDOMNode *aNode, nsAString &aAttr) } while (current != end && !nsCRT::IsAsciiSpace(*current)); // Store the link for fix up if it says "stylesheet" - if (Substring(startWord, current).Equals(NS_LITERAL_STRING("stylesheet"), - nsCaseInsensitiveStringComparator())) + if (Substring(startWord, current).LowerCaseEqualsLiteral("stylesheet")) { - aAttr = NS_LITERAL_STRING("href"); + aAttr.AssignLiteral("href"); return NS_OK; } if (current == end) @@ -1368,17 +1367,17 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable { if (insertAsImage) { - stuffToPaste.Assign(NS_LITERAL_STRING("\"\"")); + stuffToPaste.AppendLiteral("\" alt=\"\" >"); } else /* insert as link */ { - stuffToPaste.Assign(NS_LITERAL_STRING("")); + stuffToPaste.AppendLiteral("\">"); AppendUTF8toUTF16(urltext, stuffToPaste); - stuffToPaste.Append(NS_LITERAL_STRING("")); + stuffToPaste.AppendLiteral(""); } nsAutoEditBatch beginBatching(this); @@ -2220,9 +2219,9 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsAString & aQuotedText, // Wrap the inserted quote in a
 so it won't be wrapped:
       nsAutoString tag;
       if (quotesInPre)
-        tag.Assign(NS_LITERAL_STRING("pre"));
+        tag.AssignLiteral("pre");
       else
-        tag.Assign(NS_LITERAL_STRING("span"));
+        tag.AssignLiteral("span");
 
       rv = DeleteSelectionAndCreateNode(tag, getter_AddRefs(preNode));
       
diff --git a/editor/libeditor/html/nsHTMLEditRules.cpp b/editor/libeditor/html/nsHTMLEditRules.cpp
index 0bb8836a7053..e107be502063 100644
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -2871,10 +2871,10 @@ nsHTMLEditRules::WillMakeList(nsISelection *aSelection,
   nsAutoString itemType;
   if (aItemType) 
     itemType = *aItemType;
-  else if (aListType->Equals(NS_LITERAL_STRING("dl"),nsCaseInsensitiveStringComparator()))
-    itemType.Assign(NS_LITERAL_STRING("dd"));
+  else if (aListType->LowerCaseEqualsLiteral("dl"))
+    itemType.AssignLiteral("dd");
   else
-    itemType.Assign(NS_LITERAL_STRING("li"));
+    itemType.AssignLiteral("li");
     
   // convert the selection ranges into "promoted" selection ranges:
   // this basically just expands the range to include the immediate
@@ -6907,7 +6907,7 @@ nsHTMLEditRules::ApplyBlockStyle(nsCOMArray& arrayOfNodes, const nsA
     else if (IsInlineNode(curNode))
     {
       // if curNode is a non editable, drop it if we are going to 
-      if (tString.Equals(NS_LITERAL_STRING("pre"),nsCaseInsensitiveStringComparator()) 
+      if (tString.LowerCaseEqualsLiteral("pre") 
         && (!mHTMLEditor->IsEditable(curNode)))
         continue; // do nothing to this block
       
diff --git a/editor/libeditor/html/nsHTMLEditUtils.cpp b/editor/libeditor/html/nsHTMLEditUtils.cpp
index 5d97611fa2fe..f36397cb638b 100644
--- a/editor/libeditor/html/nsHTMLEditUtils.cpp
+++ b/editor/libeditor/html/nsHTMLEditUtils.cpp
@@ -406,7 +406,7 @@ nsHTMLEditUtils::IsMailCite(nsIDOMNode *node)
   }
 
   // ... but our plaintext mailcites by "_moz_quote=true".  go figure.
-  attrName.Assign(NS_LITERAL_STRING("_moz_quote"));
+  attrName.AssignLiteral("_moz_quote");
   res = elem->GetAttribute(attrName, attrVal);
   if (NS_SUCCEEDED(res))
   {
diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp
index 93acad338d7a..6223056b514a 100644
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -1316,8 +1316,8 @@ NS_IMETHODIMP nsHTMLEditor::HandleKeyPress(nsIDOMKeyEvent* aKeyEvent)
           else if (nsHTMLEditUtils::IsListItem(blockParent))
           {
             nsAutoString indentstr;
-            if (isShift) indentstr.Assign(NS_LITERAL_STRING("outdent"));
-            else         indentstr.Assign(NS_LITERAL_STRING("indent"));
+            if (isShift) indentstr.AssignLiteral("outdent");
+            else         indentstr.AssignLiteral("indent");
             res = Indent(indentstr);
             bHandled = PR_TRUE;
           }
@@ -2374,7 +2374,7 @@ nsHTMLEditor::GetHighlightColorState(PRBool *aMixed, nsAString &aOutColor)
   PRBool useCSS;
   GetIsCSSEnabled(&useCSS);
   *aMixed = PR_FALSE;
-  aOutColor.Assign(NS_LITERAL_STRING("transparent"));
+  aOutColor.AssignLiteral("transparent");
   if (useCSS) {
     // in CSS mode, text background can be added by the Text Highlight button
     // we need to query the background of the selection without looking for
@@ -2404,7 +2404,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P
   if (!aMixed) return NS_ERROR_NULL_POINTER;
   *aMixed = PR_FALSE;
   // the default background color is transparent
-  aOutColor.Assign(NS_LITERAL_STRING("transparent"));
+  aOutColor.AssignLiteral("transparent");
   
   // get selection
   nsCOMPtrselection;
@@ -2483,7 +2483,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, P
       if (NS_FAILED(res)) return res;
       if (isBlock) {
         // yes it is a block; in that case, the text background color is transparent
-        aOutColor.Assign(NS_LITERAL_STRING("transparent"));
+        aOutColor.AssignLiteral("transparent");
         break;
       }
       else {
@@ -2694,7 +2694,7 @@ nsHTMLEditor::RemoveList(const nsAString& aListType)
   if (!selection) return NS_ERROR_NULL_POINTER;
 
   nsTextRulesInfo ruleInfo(nsTextEditRules::kRemoveList);
-  if (aListType.Equals(NS_LITERAL_STRING("ol"),nsCaseInsensitiveStringComparator()))
+  if (aListType.LowerCaseEqualsLiteral("ol"))
     ruleInfo.bOrdered = PR_TRUE;
   else  ruleInfo.bOrdered = PR_FALSE;
   res = mRules->WillDoAction(selection, &ruleInfo, &cancel, &handled);
@@ -2817,7 +2817,7 @@ nsHTMLEditor::Indent(const nsAString& aIndent)
   PRBool cancel, handled;
   PRInt32 theAction = nsTextEditRules::kIndent;
   PRInt32 opID = kOpIndent;
-  if (aIndent.Equals(NS_LITERAL_STRING("outdent"),nsCaseInsensitiveStringComparator()))
+  if (aIndent.LowerCaseEqualsLiteral("outdent"))
   {
     theAction = nsTextEditRules::kOutdent;
     opID = kOpOutdent;
@@ -2964,7 +2964,7 @@ nsHTMLEditor::GetElementOrParentByTagName(const nsAString& aTagName, nsIDOMNode
   PRBool getNamedAnchor = IsNamedAnchorTag(TagName);
   if ( getLink || getNamedAnchor)
   {
-    TagName.Assign(NS_LITERAL_STRING("a"));  
+    TagName.AssignLiteral("a");  
   }
   PRBool findTableCell = TagName.EqualsLiteral("td");
   PRBool findList = TagName.EqualsLiteral("list");
@@ -3021,7 +3021,7 @@ NODE_FOUND:
     //  but that's too messy when you are trying to find the parent table
     //PRBool isRoot;
     //if (NS_FAILED(IsRootTag(parentTagName, isRoot)) || isRoot)
-    if(parentTagName.EqualsIgnoreCase("body"))
+    if(parentTagName.LowerCaseEqualsLiteral("body"))
       break;
 
     currentNode = parent;
@@ -3293,7 +3293,7 @@ nsHTMLEditor::CreateElementWithDefaults(const nsAString& aTagName, nsIDOMElement
 
   if (IsLinkTag(TagName) || IsNamedAnchorTag(TagName))
   {
-    realTagName.Assign(NS_LITERAL_STRING("a"));
+    realTagName.AssignLiteral("a");
   } else {
     realTagName = TagName;
   }
@@ -4334,20 +4334,20 @@ PRBool
 nsHTMLEditor::TagCanContainTag(const nsAString& aParentTag, const nsAString& aChildTag)  
 {
   // COtherDTD gives some unwanted results.  We override them here.
-  if (aParentTag.Equals(NS_LITERAL_STRING("ol"),nsCaseInsensitiveStringComparator()) ||
-      aParentTag.Equals(NS_LITERAL_STRING("ul"),nsCaseInsensitiveStringComparator()))
+  if (aParentTag.LowerCaseEqualsLiteral("ol") ||
+      aParentTag.LowerCaseEqualsLiteral("ul"))
   {
     // if parent is a list and tag is also a list, say "yes".
     // This is because the editor does sublists illegally for now. 
-      if (aChildTag.Equals(NS_LITERAL_STRING("ol"),nsCaseInsensitiveStringComparator()) ||
-          aChildTag.Equals(NS_LITERAL_STRING("ul"),nsCaseInsensitiveStringComparator()))
+      if (aChildTag.LowerCaseEqualsLiteral("ol") ||
+          aChildTag.LowerCaseEqualsLiteral("ul"))
       return PR_TRUE;
   }
 
-  if (aParentTag.Equals(NS_LITERAL_STRING("li"),nsCaseInsensitiveStringComparator()))
+  if (aParentTag.LowerCaseEqualsLiteral("li"))
   {
     // list items cant contain list items
-    if (aChildTag.Equals(NS_LITERAL_STRING("li"),nsCaseInsensitiveStringComparator()))
+    if (aChildTag.LowerCaseEqualsLiteral("li"))
       return PR_FALSE;
   }
 
@@ -5518,7 +5518,7 @@ nsHTMLEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
         PRBool wasSet = PR_FALSE;
         res = GetAttributeValue(aElement, NS_LITERAL_STRING("style"), existingValue, &wasSet);
         if (NS_FAILED(res)) return res;
-        existingValue.Append(NS_LITERAL_STRING(" "));
+        existingValue.AppendLiteral(" ");
         existingValue.Append(aValue);
         if (aSuppressTransaction)
           res = aElement->SetAttribute(aAttribute, existingValue);
@@ -5620,7 +5620,7 @@ nsHTMLEditor::SetCSSBackgroundColor(const nsAString& aColor)
     // loop thru the ranges in the selection
     enumerator->First(); 
     nsCOMPtr currentItem;
-    nsAutoString bgcolor; bgcolor.AssignWithConversion("bgcolor");
+    nsAutoString bgcolor; bgcolor.AssignLiteral("bgcolor");
     nsCOMPtr cachedBlockParent = nsnull;
     while ((NS_ENUMERATOR_FALSE == enumerator->IsDone()))
     {
diff --git a/editor/libeditor/html/nsHTMLEditorStyle.cpp b/editor/libeditor/html/nsHTMLEditorStyle.cpp
index 4511cb0670ef..1476dbd3fa2b 100644
--- a/editor/libeditor/html/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/html/nsHTMLEditorStyle.cpp
@@ -768,7 +768,7 @@ nsresult nsHTMLEditor::RemoveStyleInside(nsIDOMNode *aNode,
   }  
   if ( aProperty == nsEditProperty::font &&    // or node is big or small and we are setting font size
        (nsHTMLEditUtils::IsBig(aNode) || nsHTMLEditUtils::IsSmall(aNode)) &&
-       aAttribute->Equals(NS_LITERAL_STRING("size"),nsCaseInsensitiveStringComparator()))       
+       aAttribute->LowerCaseEqualsLiteral("size"))       
   {
     res = RemoveContainer(aNode);  // if we are setting font size, remove any nested bigs and smalls
   }
@@ -798,7 +798,7 @@ PRBool nsHTMLEditor::IsOnlyAttribute(nsIDOMNode *aNode,
     if (attrString.Equals(*aAttribute,nsCaseInsensitiveStringComparator())) continue;
     // if it's a special _moz... attribute, keep looking
     attrString.Left(tmp,4);
-    if (tmp.Equals(NS_LITERAL_STRING("_moz"),nsCaseInsensitiveStringComparator())) continue;
+    if (tmp.LowerCaseEqualsLiteral("_moz")) continue;
     // otherwise, it's another attribute, so return false
     return PR_FALSE;
   }
@@ -1367,7 +1367,7 @@ nsresult nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAStr
             // remove is applied; but we found no element in the ancestors of startNode
             // carrying specified styles; assume it comes from a rule and let's try to
             // insert a span "inverting" the style
-            nsAutoString value; value.AssignWithConversion("-moz-editor-invert-value");
+            nsAutoString value; value.AssignLiteral("-moz-editor-invert-value");
             PRInt32 startOffset, endOffset;
             range->GetStartOffset(&startOffset);
             range->GetEndOffset(&endOffset);
@@ -1430,7 +1430,7 @@ nsresult nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAStr
               // carrying specified styles; assume it comes from a rule and let's try to
               // insert a span "inverting" the style
               if (mHTMLCSSUtils->IsCSSInvertable(aProperty, aAttribute)) {
-                nsAutoString value; value.AssignWithConversion("-moz-editor-invert-value");
+                nsAutoString value; value.AssignLiteral("-moz-editor-invert-value");
                 SetInlinePropertyOnNode(node, aProperty, aAttribute, &value);
               }
             }
@@ -1711,8 +1711,8 @@ nsHTMLEditor::RelativeFontChangeHelper( PRInt32 aSizeChange,
 
   nsresult res = NS_OK;
   nsAutoString tag;
-  if (aSizeChange == 1) tag.Assign(NS_LITERAL_STRING("big"));
-  else tag.Assign(NS_LITERAL_STRING("small"));
+  if (aSizeChange == 1) tag.AssignLiteral("big");
+  else tag.AssignLiteral("small");
   nsCOMPtr childNodes;
   PRInt32 j;
   PRUint32 childCount;
@@ -1774,8 +1774,8 @@ nsHTMLEditor::RelativeFontChangeOnNode( PRInt32 aSizeChange,
   nsresult res = NS_OK;
   nsCOMPtr tmp;
   nsAutoString tag;
-  if (aSizeChange == 1) tag.Assign(NS_LITERAL_STRING("big"));
-  else tag.Assign(NS_LITERAL_STRING("small"));
+  if (aSizeChange == 1) tag.AssignLiteral("big");
+  else tag.AssignLiteral("small");
   
   // is it the opposite of what we want?  
   if ( ((aSizeChange == 1) && nsHTMLEditUtils::IsSmall(aNode)) || 
diff --git a/editor/libeditor/html/nsHTMLObjectResizer.cpp b/editor/libeditor/html/nsHTMLObjectResizer.cpp
index d237552ef0a9..359f5bbef768 100644
--- a/editor/libeditor/html/nsHTMLObjectResizer.cpp
+++ b/editor/libeditor/html/nsHTMLObjectResizer.cpp
@@ -238,9 +238,9 @@ nsHTMLEditor::CreateShadow(nsIDOMElement ** aReturn, nsIDOMNode * aParentNode,
   // let's create an image through the element factory
   nsAutoString name;
   if (nsHTMLEditUtils::IsImage(aOriginalObject))
-    name = NS_LITERAL_STRING("img");
+    name.AssignLiteral("img");
   else
-    name = NS_LITERAL_STRING("span");
+    name.AssignLiteral("span");
   nsresult res = CreateAnonymousElement(name,
                                         aParentNode,
                                         NS_LITERAL_STRING("mozResizingShadow"),
@@ -754,9 +754,9 @@ nsHTMLEditor::SetResizingInfoPosition(PRInt32 aX, PRInt32 aY, PRInt32 aW, PRInt3
   PRInt32 diffWidth  = aW - mResizedObjectWidth;
   PRInt32 diffHeight = aH - mResizedObjectHeight;
   if (diffWidth > 0)
-    diffWidthStr = NS_LITERAL_STRING("+");
+    diffWidthStr.AssignLiteral("+");
   if (diffHeight > 0)
-    diffHeightStr = NS_LITERAL_STRING("+");
+    diffHeightStr.AssignLiteral("+");
   diffWidthStr.AppendInt(diffWidth);
   diffHeightStr.AppendInt(diffHeight);
 
diff --git a/editor/libeditor/html/nsTableEditor.cpp b/editor/libeditor/html/nsTableEditor.cpp
index b085cec0999b..f974d53d088a 100644
--- a/editor/libeditor/html/nsTableEditor.cpp
+++ b/editor/libeditor/html/nsTableEditor.cpp
@@ -3341,13 +3341,13 @@ nsHTMLEditor::GetSelectedOrParentTableElement(nsAString& aTagName,
         else if (atom == nsEditProperty::table)
         {
           tableOrCellElement = do_QueryInterface(selectedNode);
-          aTagName = NS_LITERAL_STRING("table");
+          aTagName.AssignLiteral("table");
           *aSelectedCount = 1;
         }
         else if (atom == nsEditProperty::tr)
         {
           tableOrCellElement = do_QueryInterface(selectedNode);
-          aTagName = NS_LITERAL_STRING("tr");
+          aTagName.AssignLiteral("tr");
           *aSelectedCount = 1;
         }
       }
diff --git a/editor/libeditor/text/nsAOLCiter.cpp b/editor/libeditor/text/nsAOLCiter.cpp
index 44873ae89453..28c46e7edfda 100644
--- a/editor/libeditor/text/nsAOLCiter.cpp
+++ b/editor/libeditor/text/nsAOLCiter.cpp
@@ -58,7 +58,7 @@ NS_IMPL_ISUPPORTS1(nsAOLCiter, nsICiter)
 NS_IMETHODIMP
 nsAOLCiter::GetCiteString(const nsAString& aInString, nsAString& aOutString)
 {
-  aOutString = NS_LITERAL_STRING("\n\n>> ");
+  aOutString.AssignLiteral("\n\n>> ");
   aOutString += aInString;
 
   // See if the last char is a newline, and replace it if so
@@ -68,7 +68,7 @@ nsAOLCiter::GetCiteString(const nsAString& aInString, nsAString& aOutString)
     aOutString.SetLength(aOutString.Length() - 1);
   }
 
-  aOutString.Append(NS_LITERAL_STRING(" <<\n"));
+  aOutString.AppendLiteral(" <<\n");
 
   return NS_OK;
 }
diff --git a/editor/libeditor/text/nsPlaintextDataTransfer.cpp b/editor/libeditor/text/nsPlaintextDataTransfer.cpp
index 2561d88c4448..e4a7d9c5c647 100644
--- a/editor/libeditor/text/nsPlaintextDataTransfer.cpp
+++ b/editor/libeditor/text/nsPlaintextDataTransfer.cpp
@@ -513,10 +513,10 @@ nsPlaintextEditor::SetupDocEncoder(nsIDocumentEncoder **aDocEncoder)
   if (bIsPlainTextControl)
   {
     docEncoderFlags |= nsIDocumentEncoder::OutputBodyOnly | nsIDocumentEncoder::OutputPreformatted;
-    mimeType = NS_LITERAL_STRING(kUnicodeMime);
+    mimeType.AssignLiteral(kUnicodeMime);
   }
   else
-    mimeType = NS_LITERAL_STRING(kHTMLMime);
+    mimeType.AssignLiteral(kHTMLMime);
 
   // set up docEncoder
   nsCOMPtr encoder = do_CreateInstance(NS_HTMLCOPY_ENCODER_CONTRACTID);
diff --git a/editor/libeditor/text/nsPlaintextEditor.cpp b/editor/libeditor/text/nsPlaintextEditor.cpp
index 6d02a86219b1..2571589017d2 100644
--- a/editor/libeditor/text/nsPlaintextEditor.cpp
+++ b/editor/libeditor/text/nsPlaintextEditor.cpp
@@ -1165,14 +1165,14 @@ nsPlaintextEditor::SetWrapWidth(PRInt32 aWrapColumn)
   if (!styleValue.IsEmpty())
   {
     styleValue.Trim("; \t", PR_FALSE, PR_TRUE);
-    styleValue.Append(NS_LITERAL_STRING("; "));
+    styleValue.AppendLiteral("; ");
   }
 
   // Make sure we have fixed-width font.  This should be done for us,
   // but it isn't, see bug 22502, so we have to add "font: -moz-fixed;".
   // Only do this if we're wrapping.
   if ((flags & eEditorEnableWrapHackMask) && aWrapColumn >= 0)
-    styleValue.Append(NS_LITERAL_STRING("font-family: -moz-fixed; "));
+    styleValue.AppendLiteral("font-family: -moz-fixed; ");
 
   // If "mail.compose.wrap_to_window_width" is set, and we're a mail editor,
   // then remember our wrap width (for output purposes) but set the visual
@@ -1191,14 +1191,14 @@ nsPlaintextEditor::SetWrapWidth(PRInt32 aWrapColumn)
   // and now we're ready to set the new whitespace/wrapping style.
   if (aWrapColumn > 0 && !mWrapToWindow)        // Wrap to a fixed column
   {
-    styleValue.Append(NS_LITERAL_STRING("white-space: -moz-pre-wrap; width: "));
+    styleValue.AppendLiteral("white-space: -moz-pre-wrap; width: ");
     styleValue.AppendInt(aWrapColumn);
-    styleValue.Append(NS_LITERAL_STRING("ch;"));
+    styleValue.AppendLiteral("ch;");
   }
   else if (mWrapToWindow || aWrapColumn == 0)
-    styleValue.Append(NS_LITERAL_STRING("white-space: -moz-pre-wrap;"));
+    styleValue.AppendLiteral("white-space: -moz-pre-wrap;");
   else
-    styleValue.Append(NS_LITERAL_STRING("white-space: pre;"));
+    styleValue.AppendLiteral("white-space: pre;");
 
   return bodyElement->SetAttribute(styleName, styleValue);
 }
@@ -1423,7 +1423,7 @@ nsPlaintextEditor::OutputToString(const nsAString& aFormatType,
   nsCAutoString charsetStr;
   rv = GetDocumentCharacterSet(charsetStr);
   if(NS_FAILED(rv) || charsetStr.IsEmpty())
-    charsetStr = NS_LITERAL_CSTRING("ISO-8859-1");
+    charsetStr.AssignLiteral("ISO-8859-1");
 
   nsCOMPtr encoder;
   rv = GetAndInitDocEncoder(aFormatType, aFlags, charsetStr, getter_AddRefs(encoder));
diff --git a/editor/libeditor/text/nsTextEditUtils.cpp b/editor/libeditor/text/nsTextEditUtils.cpp
index 37619180f9d4..e5b4d55806d0 100644
--- a/editor/libeditor/text/nsTextEditUtils.cpp
+++ b/editor/libeditor/text/nsTextEditUtils.cpp
@@ -91,7 +91,7 @@ nsTextEditUtils::HasMozAttr(nsIDOMNode *node)
   {
     nsAutoString typeAttrVal;
     nsresult res = elem->GetAttribute(NS_LITERAL_STRING("type"), typeAttrVal);
-    if (NS_SUCCEEDED(res) && (typeAttrVal.EqualsIgnoreCase("_moz")))
+    if (NS_SUCCEEDED(res) && (typeAttrVal.LowerCaseEqualsLiteral("_moz")))
       return PR_TRUE;
   }
   return PR_FALSE;
diff --git a/embedding/browser/activex/src/control/MozillaBrowser.cpp b/embedding/browser/activex/src/control/MozillaBrowser.cpp
index 40fc9288bf20..d6c7afeef8bc 100644
--- a/embedding/browser/activex/src/control/MozillaBrowser.cpp
+++ b/embedding/browser/activex/src/control/MozillaBrowser.cpp
@@ -180,7 +180,7 @@ CMozillaBrowser::CMozillaBrowser()
     mBrowserHelperListCount = 0;
 
     // Name of the default profile to use
-    mProfileName = NS_LITERAL_STRING("MozillaControl");
+    mProfileName.AssignLiteral("MozillaControl");
 
     // Initialise the web browser
     Initialize();
@@ -789,7 +789,7 @@ LRESULT CMozillaBrowser::OnViewSource(WORD wNotifyCode, WORD wID, HWND hWndCtl,
     uri->GetSpec(aURI);
 
     nsAutoString strURI;
-    strURI.Assign(NS_LITERAL_STRING("view-source:"));
+    strURI.AssignLiteral("view-source:");
     strURI.Append(NS_ConvertUTF8toUCS2(aURI));
 
     // Ask the client to create a window to view the source in
diff --git a/embedding/browser/gtk/src/GtkPromptService.cpp b/embedding/browser/gtk/src/GtkPromptService.cpp
index d9bcd1afe19c..7256ea181e1d 100644
--- a/embedding/browser/gtk/src/GtkPromptService.cpp
+++ b/embedding/browser/gtk/src/GtkPromptService.cpp
@@ -310,25 +310,25 @@ GtkPromptService::GetButtonLabel(PRUint32 aFlags, PRUint32 aPos,
     PRUint32 posFlag = (aFlags & (255 * aPos)) / aPos;
     switch (posFlag) {
     case BUTTON_TITLE_OK:
-        aLabel = NS_LITERAL_STRING(GTK_STOCK_OK);
+        aLabel.AssignLiteral(GTK_STOCK_OK);
         break;
     case BUTTON_TITLE_CANCEL:
-        aLabel = NS_LITERAL_STRING(GTK_STOCK_CANCEL);
+        aLabel.AssignLiteral(GTK_STOCK_CANCEL);
         break;
     case BUTTON_TITLE_YES:
-        aLabel = NS_LITERAL_STRING(GTK_STOCK_YES);
+        aLabel.AssignLiteral(GTK_STOCK_YES);
         break;
     case BUTTON_TITLE_NO:
-        aLabel = NS_LITERAL_STRING(GTK_STOCK_NO);
+        aLabel.AssignLiteral(GTK_STOCK_NO);
         break;
     case BUTTON_TITLE_SAVE:
-        aLabel = NS_LITERAL_STRING(GTK_STOCK_SAVE);
+        aLabel.AssignLiteral(GTK_STOCK_SAVE);
         break;
     case BUTTON_TITLE_DONT_SAVE:
-        aLabel = NS_LITERAL_STRING("Don't Save");
+        aLabel.AssignLiteral("Don't Save");
         break;
     case BUTTON_TITLE_REVERT:
-        aLabel = NS_LITERAL_STRING("Revert");
+        aLabel.AssignLiteral("Revert");
         break;
     case BUTTON_TITLE_IS_STRING:
         aLabel = aStringValue;
diff --git a/embedding/browser/photon/src/nsPrintSettingsImpl.cpp b/embedding/browser/photon/src/nsPrintSettingsImpl.cpp
index 0c92a944d89e..26409cb85136 100644
--- a/embedding/browser/photon/src/nsPrintSettingsImpl.cpp
+++ b/embedding/browser/photon/src/nsPrintSettingsImpl.cpp
@@ -76,11 +76,11 @@ nsPrintSettings::nsPrintSettings() :
 
   mPrintOptions = kOptPrintOddPages | kOptPrintEvenPages;
 
-  mHeaderStrs[0].Assign(NS_LITERAL_STRING("&T"));
-  mHeaderStrs[2].Assign(NS_LITERAL_STRING("&U"));
+  mHeaderStrs[0].AssignLiteral("&T");
+  mHeaderStrs[2].AssignLiteral("&U");
 
-  mFooterStrs[0].Assign(NS_LITERAL_STRING("&PT")); // Use &P (Page Num Only) or &PT (Page Num of Page Total)
-  mFooterStrs[2].Assign(NS_LITERAL_STRING("&D"));
+  mFooterStrs[0].AssignLiteral("&PT"); // Use &P (Page Num Only) or &PT (Page Num of Page Total)
+  mFooterStrs[2].AssignLiteral("&D");
 
 }
 
diff --git a/embedding/browser/powerplant/source/CBrowserShell.cpp b/embedding/browser/powerplant/source/CBrowserShell.cpp
index 8aff62f375c3..4c7b2573a1ea 100644
--- a/embedding/browser/powerplant/source/CBrowserShell.cpp
+++ b/embedding/browser/powerplant/source/CBrowserShell.cpp
@@ -1137,8 +1137,8 @@ NS_METHOD CBrowserShell::SaveInternal(nsIURI* inURI, nsIDOMDocument* inDocument,
     nsAutoString tmpNo; tmpNo.AppendInt(tmpRandom++);
     nsAutoString saveFile(NS_LITERAL_STRING("-sav"));
     saveFile += tmpNo;
-    saveFile += NS_LITERAL_STRING("tmp");
-    tmpFile->Append(saveFile); 
+    saveFile.Append(NS_LITERAL_STRING("tmp"));
+    tmpFile->Append(saveFile);
     
     // Get the post data if we're an HTML doc.
     nsCOMPtr postData;
diff --git a/embedding/browser/powerplant/source/CHeaderSniffer.cpp b/embedding/browser/powerplant/source/CHeaderSniffer.cpp
index bae50ccf02b8..824d0c234039 100644
--- a/embedding/browser/powerplant/source/CHeaderSniffer.cpp
+++ b/embedding/browser/powerplant/source/CHeaderSniffer.cpp
@@ -250,7 +250,7 @@ nsresult CHeaderSniffer::PerformSave(nsIURI* inOriginalURI, const ESaveFormat in
     
     // One last case to handle about:blank and other fruity untitled pages.
     if (defaultFileName.IsEmpty())
-        defaultFileName.AssignWithConversion("untitled");
+        defaultFileName.AssignLiteral("untitled");
         
     // Validate the file name to ensure legality.
     for (PRUint32 i = 0; i < defaultFileName.Length(); i++)
@@ -271,7 +271,7 @@ nsresult CHeaderSniffer::PerformSave(nsIURI* inOriginalURI, const ESaveFormat in
     PRBool setExtension = PR_FALSE;
     if (mContentType.Equals("text/html")) {
         if (fileExtension.IsEmpty() || (!fileExtension.Equals("htm") && !fileExtension.Equals("html"))) {
-            defaultFileName.AppendWithConversion(".html");
+            defaultFileName.AppendLiteral(".html");
             setExtension = PR_TRUE;
         }
     }
@@ -434,7 +434,7 @@ nsresult CHeaderSniffer::InitiateDownload(nsISupports* inSourceData, nsILocalFil
       PRInt32 index = nameMinusExt.RFind(".");
       if (index >= 0)
           nameMinusExt.Left(nameMinusExt, index);
-      nameMinusExt += NS_LITERAL_STRING(" Files"); // XXXdwh needs to be localizable!
+      nameMinusExt.AppendLiteral(" Files"); // XXXdwh needs to be localizable!
       filesFolder->SetLeafName(nameMinusExt);
       PRBool exists = PR_FALSE;
       filesFolder->Exists(&exists);
diff --git a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
index a79b35f0534c..ef656b792089 100644
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -224,11 +224,11 @@ nsDocShellTreeOwner::FindItemWithName(const PRUnichar* aName,
   /* special cases */
   if(name.IsEmpty())
     return NS_OK;
-  if(name.EqualsIgnoreCase("_blank"))
+  if(name.LowerCaseEqualsLiteral("_blank"))
     return NS_OK;
   // _main is an IE target which should be case-insensitive but isn't
   // see bug 217886 for details
-  if(name.EqualsIgnoreCase("_content") || name.EqualsLiteral("_main")) {
+  if(name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main")) {
     *aFoundItem = mWebBrowser->mDocShellAsItem;
     NS_IF_ADDREF(*aFoundItem);
     return NS_OK;
@@ -1608,7 +1608,7 @@ ChromeContextMenuListener::ContextMenu(nsIDOMEvent* aMouseEvent)
           if (inputElement) {
             nsAutoString inputElemType;
             inputElement->GetType(inputElemType);
-            if (inputElemType.Equals(NS_LITERAL_STRING("image"), nsCaseInsensitiveStringComparator()))
+            if (inputElemType.LowerCaseEqualsLiteral("image"))
               flags2 |= nsIContextMenuListener2::CONTEXT_IMAGE;
           }
         }
diff --git a/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp b/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
index fba9cce2924f..fb99b70c936f 100644
--- a/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
+++ b/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp
@@ -1266,7 +1266,7 @@ ShowNativePrintDialogEx(HWND              aHWnd,
   if (NS_SUCCEEDED(GetLocalizedBundle(PRINTDLG_PROPERTIES, getter_AddRefs(strBundle)))) {
     nsAutoString doExtendStr;
     if (NS_SUCCEEDED(GetLocalizedString(strBundle, "extend", doExtendStr))) {
-      doExtend = doExtendStr.EqualsIgnoreCase("true");
+      doExtend = doExtendStr.LowerCaseEqualsLiteral("true");
     }
   }
 
diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
index c75453fddbb8..05e77475fe29 100644
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
@@ -999,25 +999,25 @@ nsresult nsWebBrowserPersist::SendErrorStatusChange(
     case NS_ERROR_FILE_DISK_FULL:
     case NS_ERROR_FILE_NO_DEVICE_SPACE:
         // Out of space on target volume.
-        msgId = NS_LITERAL_STRING("diskFull");
+        msgId.AssignLiteral("diskFull");
         break;
 
     case NS_ERROR_FILE_READ_ONLY:
         // Attempt to write to read/only file.
-        msgId = NS_LITERAL_STRING("readOnly");
+        msgId.AssignLiteral("readOnly");
         break;
 
     case NS_ERROR_FILE_ACCESS_DENIED:
         // Attempt to write without sufficient permissions.
-        msgId = NS_LITERAL_STRING("accessError");
+        msgId.AssignLiteral("accessError");
         break;
 
     default:
         // Generic read/write error message.
         if (aIsReadError)
-            msgId = NS_LITERAL_STRING("readError");
+            msgId.AssignLiteral("readError");
         else
-            msgId = NS_LITERAL_STRING("writeError");
+            msgId.AssignLiteral("writeError");
         break;
     }
     // Get properties file bundle and extract status string.
@@ -2715,8 +2715,7 @@ nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
 
                 // Store the link for fix up if it says "stylesheet"
                 if (Substring(startWord, current)
-                        .Equals(NS_LITERAL_STRING("stylesheet"),
-                                nsCaseInsensitiveStringComparator()))
+                        .LowerCaseEqualsLiteral("stylesheet"))
                 {
                     StoreURIAttribute(aNode, "href");
                     return NS_OK;
@@ -2743,7 +2742,7 @@ nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
             {
                 nsXPIDLString ext;
                 GetDocumentExtension(content, getter_Copies(ext));
-                data->mSubFrameExt.Assign(NS_LITERAL_STRING("."));
+                data->mSubFrameExt.AssignLiteral(".");
                 data->mSubFrameExt.Append(ext);
                 SaveSubframeContent(content, data);
             }
@@ -2766,7 +2765,7 @@ nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
             {
                 nsXPIDLString ext;
                 GetDocumentExtension(content, getter_Copies(ext));
-                data->mSubFrameExt.Assign(NS_LITERAL_STRING("."));
+                data->mSubFrameExt.AssignLiteral(".");
                 data->mSubFrameExt.Append(ext);
                 SaveSubframeContent(content, data);
             }
@@ -2841,7 +2840,7 @@ nsWebBrowserPersist::CloneNodeWithFixedUpURIAttributes(
                 nsAutoString href;
                 nodeAsBase->GetHref(href); // Doesn't matter if this fails
                 nsCOMPtr comment;
-                nsAutoString commentText; commentText.Assign(NS_LITERAL_STRING(" base "));
+                nsAutoString commentText; commentText.AssignLiteral(" base ");
                 if (!href.IsEmpty())
                 {
                     commentText += NS_LITERAL_STRING("href=\"") + href + NS_LITERAL_STRING("\" ");
@@ -3282,7 +3281,7 @@ nsWebBrowserPersist::SaveSubframeContent(
     nsAutoString newFrameDataPath(aData->mFilename);
 
     // Append _data
-    newFrameDataPath.Append(NS_LITERAL_STRING("_data"));
+    newFrameDataPath.AppendLiteral("_data");
     rv = AppendPathToURI(frameDataURI, newFrameDataPath);
     NS_ENSURE_SUCCESS(rv, PR_FALSE);
 
diff --git a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
index 4d0361a29a57..2ed80cac0bf8 100644
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -531,14 +531,14 @@ nsWindowWatcher::OpenWindowJS(nsIDOMWindow *aParent,
        for browser windows by name, as it does.)
      */
     if (aParent) {
-      if (name.EqualsIgnoreCase("_self")) {
+      if (name.LowerCaseEqualsLiteral("_self")) {
         GetWindowTreeItem(aParent, getter_AddRefs(newDocShellItem));
-      } else if (name.EqualsIgnoreCase("_top")) {
+      } else if (name.LowerCaseEqualsLiteral("_top")) {
         nsCOMPtr shelltree;
         GetWindowTreeItem(aParent, getter_AddRefs(shelltree));
         if (shelltree)
           shelltree->GetSameTypeRootTreeItem(getter_AddRefs(newDocShellItem));
-      } else if (name.EqualsIgnoreCase("_parent")) {
+      } else if (name.LowerCaseEqualsLiteral("_parent")) {
         nsCOMPtr shelltree;
         GetWindowTreeItem(aParent, getter_AddRefs(shelltree));
         if (shelltree)
@@ -680,7 +680,7 @@ nsWindowWatcher::OpenWindowJS(nsIDOMWindow *aParent,
      _self where the given name is different (and invalid)). also _blank
      is not a window name. */
   if (windowIsNew)
-    newDocShellItem->SetName(nameSpecified && !name.EqualsIgnoreCase("_blank") ?
+    newDocShellItem->SetName(nameSpecified && !name.LowerCaseEqualsLiteral("_blank") ?
                              name.get() : nsnull);
 
   nsCOMPtr newDocShell(do_QueryInterface(newDocShellItem));
@@ -1151,7 +1151,7 @@ void nsWindowWatcher::CheckWindowName(nsString& aName)
       // Don't use js_ReportError as this will cause the application
       // to shut down (JS_ASSERT calls abort())  See bug 32898
       nsAutoString warn;
-      warn.Assign(NS_LITERAL_STRING("Illegal character in window name "));
+      warn.AssignLiteral("Illegal character in window name ");
       warn.Append(aName);
       char *cp = ToNewCString(warn);
       NS_WARNING(cp);
@@ -1395,7 +1395,7 @@ nsWindowWatcher::FindItemWithName(
   /* special cases */
   if(name.IsEmpty())
     return NS_OK;
-  if(name.EqualsIgnoreCase("_blank") || name.EqualsIgnoreCase("_new"))
+  if(name.LowerCaseEqualsLiteral("_blank") || name.LowerCaseEqualsLiteral("_new"))
     return NS_OK;
   // _content will be handled by individual windows, below
 
diff --git a/embedding/qa/testembed/nsIWebProg.cpp b/embedding/qa/testembed/nsIWebProg.cpp
index 74c5b8d3f98f..68491ab6fa6f 100644
--- a/embedding/qa/testembed/nsIWebProg.cpp
+++ b/embedding/qa/testembed/nsIWebProg.cpp
@@ -144,44 +144,44 @@ void CnsiWebProg::ConvertWPFlagToString(PRUint32 theFlag,
 	switch(theFlag)
 	{
 	case nsIWebProgress::NOTIFY_STATE_REQUEST:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_REQUEST"));
+		flagName.AssignLiteral("NOTIFY_STATE_REQUEST");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_DOCUMENT:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_DOCUMENT"));
+		flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_NETWORK:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_NETWORK"));
+		flagName.AssignLiteral("NOTIFY_STATE_NETWORK");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_WINDOW:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_WINDOW"));
+		flagName.AssignLiteral("NOTIFY_STATE_WINDOW");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_ALL:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_ALL"));
+		flagName.AssignLiteral("NOTIFY_STATE_ALL");
 		break;
 	case nsIWebProgress::NOTIFY_PROGRESS:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_PROGRESS"));
+		flagName.AssignLiteral("NOTIFY_PROGRESS");
 		break;
 	case nsIWebProgress::NOTIFY_STATUS:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATUS"));
+		flagName.AssignLiteral("NOTIFY_STATUS");
 		break;
 	case nsIWebProgress::NOTIFY_SECURITY:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_SECURITY"));
+		flagName.AssignLiteral("NOTIFY_SECURITY");
 		break;
 	case nsIWebProgress::NOTIFY_LOCATION:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_LOCATION"));
+		flagName.AssignLiteral("NOTIFY_LOCATION");
 		break;
 	case nsIWebProgress::NOTIFY_ALL:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_ALL"));
+		flagName.AssignLiteral("NOTIFY_ALL");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_DOCUMENT | nsIWebProgress::NOTIFY_STATE_REQUEST:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_DOCUMENT&REQUEST"));
+		flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT&REQUEST");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_DOCUMENT | nsIWebProgress::NOTIFY_STATE_REQUEST
 					| nsIWebProgress::NOTIFY_STATE_NETWORK	:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_DOCUMENT&REQUEST&NETWORK"));
+		flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT&REQUEST&NETWORK");
 		break;
 	case nsIWebProgress::NOTIFY_STATE_NETWORK | nsIWebProgress::NOTIFY_STATE_WINDOW:
-		flagName.Assign(NS_LITERAL_CSTRING("NOTIFY_STATE_NETWORK&WINDOW"));
+		flagName.AssignLiteral("NOTIFY_STATE_NETWORK&WINDOW");
 		break;
 	}
 }
diff --git a/embedding/tests/mfcembed/components/nsPrintDialogUtil.cpp b/embedding/tests/mfcembed/components/nsPrintDialogUtil.cpp
index 96fc5033e6e1..9b425e280764 100644
--- a/embedding/tests/mfcembed/components/nsPrintDialogUtil.cpp
+++ b/embedding/tests/mfcembed/components/nsPrintDialogUtil.cpp
@@ -1226,7 +1226,7 @@ ShowNativePrintDialogEx(HWND              aHWnd,
   if (NS_SUCCEEDED(GetLocalizedBundle(PRINTDLG_PROPERTIES, getter_AddRefs(strBundle)))) {
     nsAutoString doExtendStr;
     if (NS_SUCCEEDED(GetLocalizedString(strBundle, "extend", doExtendStr))) {
-      doExtend = doExtendStr.EqualsIgnoreCase("true");
+      doExtend = doExtendStr.LowerCaseEqualsLiteral("true");
     }
   }
 
diff --git a/embedding/tests/os2Embed/WebBrowserChrome.cpp b/embedding/tests/os2Embed/WebBrowserChrome.cpp
index 3322aa1d6fe6..837db21f4d42 100644
--- a/embedding/tests/os2Embed/WebBrowserChrome.cpp
+++ b/embedding/tests/os2Embed/WebBrowserChrome.cpp
@@ -390,13 +390,13 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
     if(!(nsCRT::strcmp(operation, "back")))
     {
         // Going back. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going back to url:"));
+        uriAStr.AppendLiteral("Going back to url:");
         uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "forward")))
     {
         // Going forward. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going forward to url:"));
+        uriAStr.AppendLiteral("Going forward to url:");
         uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "reload")))
@@ -425,21 +425,21 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
     {
         // Adding new entry. XXX Get string from a resource file
         uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
-        uriAStr.Append(NS_LITERAL_STRING(" added to session History"));
+        uriAStr.AppendLiteral(" added to session History");
     }
     else if (!(nsCRT::strcmp(operation, "goto")))
     {
         // Goto. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going to HistoryIndex:"));
+        uriAStr.AppendLiteral("Going to HistoryIndex:");
         uriAStr.AppendInt(info1);
-        uriAStr.Append(NS_LITERAL_STRING(" Url:"));
+        uriAStr.AppendLiteral(" Url:");
         uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "purge")))
     {
         // Purging old entries
         uriAStr.AppendInt(info1);
-        uriAStr.Append(NS_LITERAL_STRING(" purged from Session History"));
+        uriAStr.AppendLiteral(" purged from Session History");
     }
 
     WebBrowserChromeUI::UpdateStatusBarText(this, uriAStr.get());
diff --git a/embedding/tests/winEmbed/WebBrowserChrome.cpp b/embedding/tests/winEmbed/WebBrowserChrome.cpp
index 86fceafa51e0..7633cafa785c 100644
--- a/embedding/tests/winEmbed/WebBrowserChrome.cpp
+++ b/embedding/tests/winEmbed/WebBrowserChrome.cpp
@@ -390,13 +390,13 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
     if(!(nsCRT::strcmp(operation, "back")))
     {
         // Going back. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going back to url:"));
+        uriAStr.AppendLiteral("Going back to url:");
         uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "forward")))
     {
         // Going forward. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going forward to url:"));
+        uriAStr.AppendLiteral("Going forward to url:");
         uriAStr.Append(NS_ConvertUTF8toUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "reload")))
@@ -425,21 +425,21 @@ WebBrowserChrome::SendHistoryStatusMessage(nsIURI * aURI, char * operation, PRIn
     {
         // Adding new entry. XXX Get string from a resource file
         uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
-        uriAStr.Append(NS_LITERAL_STRING(" added to session History"));
+        uriAStr.AppendLiteral(" added to session History");
     }
     else if (!(nsCRT::strcmp(operation, "goto")))
     {
         // Goto. XXX Get string from a resource file
-        uriAStr.Append(NS_LITERAL_STRING("Going to HistoryIndex:"));
+        uriAStr.AppendLiteral("Going to HistoryIndex:");
         uriAStr.AppendInt(info1);
-        uriAStr.Append(NS_LITERAL_STRING(" Url:"));
+        uriAStr.AppendLiteral(" Url:");
         uriAStr.Append(NS_ConvertASCIItoUCS2(uriCStr));
     }
     else if (!(nsCRT::strcmp(operation, "purge")))
     {
         // Purging old entries
         uriAStr.AppendInt(info1);
-        uriAStr.Append(NS_LITERAL_STRING(" purged from Session History"));
+        uriAStr.AppendLiteral(" purged from Session History");
     }
 
     WebBrowserChromeUI::UpdateStatusBarText(this, uriAStr.get());
diff --git a/embedding/tests/winEmbed/winEmbed.cpp b/embedding/tests/winEmbed/winEmbed.cpp
index 61fc08fd3411..14cf98190727 100644
--- a/embedding/tests/winEmbed/winEmbed.cpp
+++ b/embedding/tests/winEmbed/winEmbed.cpp
@@ -825,7 +825,7 @@ nsresult StartupProfile()
 	if (NS_FAILED(rv))
       return rv;
     
-	appDataDir->Append(NS_LITERAL_STRING("winembed"));
+	appData->Append(NS_LITERAL_STRING("winembed"));
 	nsCOMPtr localAppDataDir(do_QueryInterface(appDataDir));
 
 	nsCOMPtr locProvider;
diff --git a/extensions/datetime/nsDateTimeChannel.cpp b/extensions/datetime/nsDateTimeChannel.cpp
index 96832dd86d88..2a54c05353dd 100644
--- a/extensions/datetime/nsDateTimeChannel.cpp
+++ b/extensions/datetime/nsDateTimeChannel.cpp
@@ -96,7 +96,7 @@ nsDateTimeChannel::Init(nsIURI *uri, nsIProxyInfo *proxyInfo)
     if (mHost.IsEmpty())
         return NS_ERROR_MALFORMED_URI;
 
-    mContentType = NS_LITERAL_CSTRING(TEXT_HTML); // expected content-type
+    mContentType.AssignLiteral(TEXT_HTML); // expected content-type
     return NS_OK;
 }
 
diff --git a/extensions/finger/nsFingerChannel.cpp b/extensions/finger/nsFingerChannel.cpp
index 898c04d89ec5..40dd29a1f9ba 100644
--- a/extensions/finger/nsFingerChannel.cpp
+++ b/extensions/finger/nsFingerChannel.cpp
@@ -115,7 +115,7 @@ nsFingerChannel::Init(nsIURI *uri, nsIProxyInfo *proxyInfo)
     if (mHost.IsEmpty())
         return NS_ERROR_MALFORMED_URI;
 
-    mContentType = NS_LITERAL_CSTRING(TEXT_HTML); // expected content-type
+    mContentType.AssignLiteral(TEXT_HTML); // expected content-type
     return NS_OK;
 }
 
@@ -256,7 +256,7 @@ nsFingerChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
         rv = mURI->GetPath(userHost);
 
         nsAutoString title;
-        title = NS_LITERAL_STRING("Finger information for ");
+        title.AssignLiteral("Finger information for ");
         AppendUTF8toUTF16(userHost, title);
 
         conv->SetTitle(title.get());
diff --git a/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp b/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
index 105af2cf8f0f..3e425c5d325e 100644
--- a/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
+++ b/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
@@ -614,13 +614,13 @@ nsGnomeVFSInputStream::DoRead(char *aBuf, PRUint32 aCount, PRUint32 *aCountRead)
         switch (info->type)
         {
           case GNOME_VFS_FILE_TYPE_REGULAR:
-            mDirBuf += NS_LITERAL_CSTRING("FILE ");
+            mDirBuf.AppendLiteral("FILE ");
             break;
           case GNOME_VFS_FILE_TYPE_DIRECTORY:
-            mDirBuf += NS_LITERAL_CSTRING("DIRECTORY ");
+            mDirBuf.AppendLiteral("DIRECTORY ");
             break;
           case GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK:
-            mDirBuf += NS_LITERAL_CSTRING("SYMBOLIC-LINK ");
+            mDirBuf.AppendLiteral("SYMBOLIC-LINK ");
             break;
           default:
             break;
@@ -861,7 +861,7 @@ nsGnomeVFSProtocolHandler::InitSupportedProtocolsPref(nsIPrefBranch *prefs)
   if (NS_SUCCEEDED(rv))
     mSupportedProtocols.StripWhitespace();
   else
-    mSupportedProtocols = NS_LITERAL_CSTRING("smb:,sftp:"); // use defaults
+    mSupportedProtocols.AssignLiteral("smb:,sftp:"); // use defaults
 
   LOG(("gnomevfs: supported protocols \"%s\"\n", mSupportedProtocols.get()));
 }
@@ -888,7 +888,7 @@ nsGnomeVFSProtocolHandler::IsSupportedProtocol(const nsCString &spec)
 NS_IMETHODIMP
 nsGnomeVFSProtocolHandler::GetScheme(nsACString &aScheme)
 {
-  aScheme = NS_LITERAL_CSTRING(MOZ_GNOMEVFS_SCHEME);
+  aScheme.AssignLiteral(MOZ_GNOMEVFS_SCHEME);
   return NS_OK;
 }
 
diff --git a/extensions/p3p/src/nsP3PService.cpp b/extensions/p3p/src/nsP3PService.cpp
index d08f6bd9b822..4b6fbd0f4163 100644
--- a/extensions/p3p/src/nsP3PService.cpp
+++ b/extensions/p3p/src/nsP3PService.cpp
@@ -80,7 +80,7 @@ nsP3PService::PrefChanged(nsIPrefBranch *aPrefBranch)
   // check for a malformed string, or no prefbranch
   if (!aPrefBranch || NS_FAILED(rv) || mCookiesP3PString.Length() != 8) {
     // reassign to default string
-    mCookiesP3PString = NS_LITERAL_CSTRING(kCookiesP3PStringDefault);
+    mCookiesP3PString.AssignLiteral(kCookiesP3PStringDefault);
   }
 }
 
diff --git a/extensions/p3p/src/nsPolicyReference.cpp b/extensions/p3p/src/nsPolicyReference.cpp
index 8524501ac5ef..ce9c29d14b51 100755
--- a/extensions/p3p/src/nsPolicyReference.cpp
+++ b/extensions/p3p/src/nsPolicyReference.cpp
@@ -186,7 +186,7 @@ nsPolicyReference::LoadPolicyReferenceFileFor(nsIURI* aURI,
     if (!mDocument) {
       nsXPIDLCString value;
       mMainURI->GetPrePath(value);
-      value += NS_LITERAL_CSTRING(kWellKnownLocation);
+      value.AppendLiteral(kWellKnownLocation);
       result = Load(value);
     }
     else {
@@ -200,7 +200,7 @@ nsPolicyReference::LoadPolicyReferenceFileFor(nsIURI* aURI,
     // well known location
     nsXPIDLCString value;
     mCurrentURI->GetPrePath(value);
-    value += NS_LITERAL_CSTRING(kWellKnownLocation);
+    value.AppendLiteral(kWellKnownLocation);
     result = Load(value);
   }
   else if (mFlags & IS_LINKED_URI) {
diff --git a/extensions/spellcheck/myspell/src/mozMySpell.cpp b/extensions/spellcheck/myspell/src/mozMySpell.cpp
index 56e59e2090ef..7e4bbacfe2d9 100644
--- a/extensions/spellcheck/myspell/src/mozMySpell.cpp
+++ b/extensions/spellcheck/myspell/src/mozMySpell.cpp
@@ -118,7 +118,7 @@ NS_IMETHODIMP mozMySpell::SetDictionary(const PRUnichar * aDictionary)
     nsString language;
     PRInt32 pos = mDictionary.FindChar('-');
     if(pos == -1){
-      language.Assign(NS_LITERAL_STRING("en"));      
+      language.AssignLiteral("en");      
     }
     else{
       language = Substring(mDictionary,0,pos);
@@ -143,7 +143,7 @@ NS_IMETHODIMP mozMySpell::GetLanguage(PRUnichar * *aLanguage)
     nsString language;
     PRInt32 pos = mDictionary.FindChar('-');
     if(pos == -1){
-      language.Assign(NS_LITERAL_STRING("en"));      
+      language.AssignLiteral("en");      
     }
     else{
       language = Substring(mDictionary,0,pos);
diff --git a/extensions/spellcheck/myspell/src/myspAffixmgr.cpp b/extensions/spellcheck/myspell/src/myspAffixmgr.cpp
index d398c379a304..ca205d9452a2 100644
--- a/extensions/spellcheck/myspell/src/myspAffixmgr.cpp
+++ b/extensions/spellcheck/myspell/src/myspAffixmgr.cpp
@@ -118,7 +118,7 @@ myspAffixMgr::Load(const nsString& aDictionary)
 
   //get the affix file
   nsString affName=aDictionary;
-  affName.Append(NS_LITERAL_STRING(".aff"));
+  affName.AppendLiteral(".aff");
   res=affFile->Append(affName);
   if(NS_FAILED(res)) return res; 
   res = affFile->Exists(&fileExists);
@@ -127,7 +127,7 @@ myspAffixMgr::Load(const nsString& aDictionary)
 
   //get the dictionary file
   nsString dicName=aDictionary;
-  dicName.Append(NS_LITERAL_STRING(".dic"));
+  dicName.AppendLiteral(".dic");
   res=dicFile->Append(dicName);
   if(NS_FAILED(res)) return res; 
   res = dicFile->Exists(&fileExists);
diff --git a/extensions/spellcheck/src/mozEnglishWordUtils.cpp b/extensions/spellcheck/src/mozEnglishWordUtils.cpp
index 4d1191962b36..db54cea6be5c 100644
--- a/extensions/spellcheck/src/mozEnglishWordUtils.cpp
+++ b/extensions/spellcheck/src/mozEnglishWordUtils.cpp
@@ -49,7 +49,7 @@ NS_IMPL_ISUPPORTS1(mozEnglishWordUtils, mozISpellI18NUtil)
 
 mozEnglishWordUtils::mozEnglishWordUtils()
 {
-  mLanguage.Assign(NS_LITERAL_STRING("en"));
+  mLanguage.AssignLiteral("en");
 
   nsresult rv;
   mURLDetector = do_CreateInstance(MOZ_TXTTOHTMLCONV_CONTRACTID, &rv);
diff --git a/extensions/sql/base/src/mozSqlResult.cpp b/extensions/sql/base/src/mozSqlResult.cpp
index 13b1f5bd7f78..4589ebcadf4b 100644
--- a/extensions/sql/base/src/mozSqlResult.cpp
+++ b/extensions/sql/base/src/mozSqlResult.cpp
@@ -256,28 +256,28 @@ mozSqlResult::GetColumnTypeAsString(PRInt32 aColumnIndex, nsAString& _retval)
   PRInt32 type = ((ColumnInfo*)mColumnInfo[aColumnIndex])->mType;
   switch (type) {
     case mozISqlResult::TYPE_STRING:
-      _retval.Assign(NS_LITERAL_STRING("string"));
+      _retval.AssignLiteral("string");
       break;
     case mozISqlResult::TYPE_INT:
-      _retval.Assign(NS_LITERAL_STRING("int"));
+      _retval.AssignLiteral("int");
       break;
     case mozISqlResult::TYPE_FLOAT:
-      _retval.Assign(NS_LITERAL_STRING("float"));
+      _retval.AssignLiteral("float");
       break;
     case mozISqlResult::TYPE_DECIMAL:
-      _retval.Assign(NS_LITERAL_STRING("decimal"));
+      _retval.AssignLiteral("decimal");
       break;
     case mozISqlResult::TYPE_DATE:
-      _retval.Assign(NS_LITERAL_STRING("date"));
+      _retval.AssignLiteral("date");
       break;
     case mozISqlResult::TYPE_TIME:
-      _retval.Assign(NS_LITERAL_STRING("time"));
+      _retval.AssignLiteral("time");
       break;
     case mozISqlResult::TYPE_DATETIME:
-      _retval.Assign(NS_LITERAL_STRING("datetime"));
+      _retval.AssignLiteral("datetime");
       break;
     case mozISqlResult::TYPE_BOOL:
-      _retval.Assign(NS_LITERAL_STRING("bool"));
+      _retval.AssignLiteral("bool");
       break;
   }
 
@@ -827,9 +827,9 @@ mozSqlResult::GetCellValue(PRInt32 row, nsITreeColumn* col, nsAString & _retval)
     PRInt32 type = cell->GetType();
     if (type == mozISqlResult::TYPE_BOOL) {
       if (cell->mBool)
-        _retval.Assign(NS_LITERAL_STRING("true"));
+        _retval.AssignLiteral("true");
       else
-        _retval.Assign(NS_LITERAL_STRING("false"));
+        _retval.AssignLiteral("false");
     }
   }
   return NS_OK;
@@ -844,7 +844,7 @@ mozSqlResult::GetCellText(PRInt32 row, nsITreeColumn* col, nsAString & _retval)
   Cell* cell = ((Row*)mRows[row])->mCells[columnIndex];
   if (cell->IsNull()) {
     if (mDisplayNullAsText)
-      _retval.Assign(NS_LITERAL_STRING("null"));
+      _retval.AssignLiteral("null");
   }
   else {
     PRInt32 type = cell->GetType();
@@ -874,9 +874,9 @@ mozSqlResult::GetCellText(PRInt32 row, nsITreeColumn* col, nsAString & _retval)
     }
     else if (type == mozISqlResult::TYPE_BOOL) {
       if (cell->mBool)
-        _retval.Assign(NS_LITERAL_STRING("true"));
+        _retval.AssignLiteral("true");
       else
-        _retval.Assign(NS_LITERAL_STRING("false"));
+        _retval.AssignLiteral("false");
     }
   }
   return NS_OK;
@@ -1064,9 +1064,9 @@ void
 mozSqlResult::AppendValue(Cell* aCell, nsAutoString& aValues)
 {
   if (aCell->IsNull())
-    aValues.Append(NS_LITERAL_STRING("NULL"));
+    aValues.AppendLiteral("NULL");
   else if (aCell->IsDefault())
-    aValues.Append(NS_LITERAL_STRING("DEFAULT"));
+    aValues.AppendLiteral("DEFAULT");
   else {
     PRInt32 type = aCell->GetType();
     if (type == mozISqlResult::TYPE_STRING) {
@@ -1108,7 +1108,7 @@ mozSqlResult::AppendKeys(Row* aRow, nsAutoString& aKeys)
   PRBool hasNext = PR_FALSE;
   do {
     if (hasNext)
-      aKeys.Append(NS_LITERAL_STRING(" AND "));
+      aKeys.AppendLiteral(" AND ");
 
     mPrimaryKeys->Next(&hasNext);
 
@@ -1120,7 +1120,7 @@ mozSqlResult::AppendKeys(Row* aRow, nsAutoString& aKeys)
     PRInt32 index;
     GetColumnIndex(value, &index);
     if (index == -1) {
-      mErrorMessage = NS_LITERAL_STRING("MOZSQL: The result doesn't contain all primary key fields");
+      mErrorMessage.AssignLiteral("MOZSQL: The result doesn't contain all primary key fields");
       return NS_ERROR_FAILURE;
     }
 
@@ -1162,7 +1162,7 @@ mozSqlResult::GetValues(Row* aRow, mozISqlResult** aResult, PRBool aUseID)
         return rv;
     }
 
-    keys.Append(NS_LITERAL_STRING(" AND "));
+    keys.AppendLiteral(" AND ");
     query.Insert(keys, Distance(start, e));
   }
   else {
@@ -1279,8 +1279,8 @@ mozSqlResult::InsertRow(Row* aSrcRow, PRInt32* _retval)
   PRInt32 i;
   for (i = 0; i < mColumnInfo.Count(); i++) {
     if (i) {
-      names.Append(NS_LITERAL_STRING(", "));
-      values.Append(NS_LITERAL_STRING(", "));
+      names.AppendLiteral(", ");
+      values.AppendLiteral(", ");
     }
     names.Append(((ColumnInfo*)mColumnInfo[i])->mName);
 
@@ -1350,7 +1350,7 @@ mozSqlResult::UpdateRow(PRInt32 aRowIndex, Row* aSrcRow, PRInt32* _retval)
   PRInt32 i;
   for (i = 0; i < mColumnInfo.Count(); i++) {
     if (i)
-      values.Append(NS_LITERAL_STRING(", "));
+      values.AppendLiteral(", ");
     values.Append(((ColumnInfo*)mColumnInfo[i])->mName);
     values.Append(PRUnichar('='));
 
@@ -2234,18 +2234,18 @@ nsresult
 mozSqlResultStream::EnsureBuffer()
 {
   if (!mInitialized) {
-    mBuffer.Append(NS_LITERAL_CSTRING("\n"));
-    mBuffer.Append(NS_LITERAL_CSTRING("\n\n"));
+    mBuffer.AppendLiteral("\n");
+    mBuffer.AppendLiteral("\n\n");
     PRInt32 rowCount = mResult->mRows.Count();
     PRInt32 columnCount = mResult->mColumnInfo.Count();
     for (PRInt32 i = 0; i < rowCount; i++) {
-      mBuffer.Append(NS_LITERAL_CSTRING("\n"));
+      mBuffer.AppendLiteral("\n");
       Row* row = (Row*)mResult->mRows[i];
       for (PRInt32 j = 0; j < columnCount; j++) {
-        mBuffer.Append(NS_LITERAL_CSTRING("\n"));
+        mBuffer.AppendLiteral("\n");
         Cell* cell = row->mCells[j];
         if (cell->IsNull())
-          mBuffer.Append(NS_LITERAL_CSTRING("null"));
+          mBuffer.AppendLiteral("null");
         else {
           PRInt32 type = cell->GetType();
           if (type == mozISqlResult::TYPE_STRING)
@@ -2268,16 +2268,16 @@ mozSqlResultStream::EnsureBuffer()
           }
           else if (type == mozISqlResult::TYPE_BOOL) {
             if (cell->mBool)
-              mBuffer.Append(NS_LITERAL_CSTRING("true"));
+              mBuffer.AppendLiteral("true");
             else
-              mBuffer.Append(NS_LITERAL_CSTRING("false"));
+              mBuffer.AppendLiteral("false");
           }
         }
-        mBuffer.Append(NS_LITERAL_CSTRING("\n"));
+        mBuffer.AppendLiteral("\n");
       }
-      mBuffer.Append(NS_LITERAL_CSTRING("\n"));
+      mBuffer.AppendLiteral("\n");
     }
-    mBuffer.Append(NS_LITERAL_CSTRING("\n\n"));
+    mBuffer.AppendLiteral("\n\n");
 
     mInitialized = PR_TRUE;
   }
diff --git a/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp b/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp
index aa0ec483f173..ac3f0dadc8c8 100644
--- a/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp
+++ b/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp
@@ -88,17 +88,17 @@ mozSqlConnectionPgsql::GetPrimaryKeys(const nsAString& aSchema, const nsAString&
   nsAutoString from;
   nsAutoString where;
   if (mVersion >= SERVER_VERSION(7,3,0)) {
-    select = NS_LITERAL_STRING("SELECT n.nspname AS TABLE_SCHEM, ");
-    from = NS_LITERAL_STRING(" FROM pg_catalog.pg_namespace n, pg_catalog.pg_class ct, pg_catalog.pg_class ci, pg_catalog.pg_attribute a, pg_catalog.pg_index i");
-    where = NS_LITERAL_STRING(" AND ct.relnamespace = n.oid ");
+    select.AssignLiteral("SELECT n.nspname AS TABLE_SCHEM, ");
+    from.AssignLiteral(" FROM pg_catalog.pg_namespace n, pg_catalog.pg_class ct, pg_catalog.pg_class ci, pg_catalog.pg_attribute a, pg_catalog.pg_index i");
+    where.AssignLiteral(" AND ct.relnamespace = n.oid ");
     if (!aSchema.IsEmpty()) {
       where.Append(NS_LITERAL_STRING(" AND n.nspname = '") + aSchema);
       where.Append(PRUnichar('\''));
     }
   }
   else {
-    select = NS_LITERAL_STRING("SELECT NULL AS TABLE_SCHEM, ");
-    from = NS_LITERAL_STRING(" FROM pg_class ct, pg_class ci, pg_attribute a, pg_index i ");
+    select.AssignLiteral("SELECT NULL AS TABLE_SCHEM, ");
+    from.AssignLiteral(" FROM pg_class ct, pg_class ci, pg_attribute a, pg_index i ");
   }
 
   if (!aTable.IsEmpty()) {
@@ -272,6 +272,6 @@ mozSqlConnectionPgsql::CancelExec()
 nsresult
 mozSqlConnectionPgsql::GetIDName(nsAString& aIDName)
 {
-  aIDName = NS_LITERAL_STRING("OID");
+  aIDName.AssignLiteral("OID");
   return NS_OK;
 }
diff --git a/extensions/transformiix/source/base/Double.cpp b/extensions/transformiix/source/base/Double.cpp
index 8813395b3f1f..8fd9e0c4cd45 100644
--- a/extensions/transformiix/source/base/Double.cpp
+++ b/extensions/transformiix/source/base/Double.cpp
@@ -283,13 +283,13 @@ void Double::toString(double aValue, nsAString& aDest)
     // check for special cases
 
     if (isNaN(aValue)) {
-        aDest.Append(NS_LITERAL_STRING("NaN"));
+        aDest.AppendLiteral("NaN");
         return;
     }
     if (isInfinite(aValue)) {
         if (aValue < 0)
             aDest.Append(PRUnichar('-'));
-        aDest.Append(NS_LITERAL_STRING("Infinity"));
+        aDest.AppendLiteral("Infinity");
         return;
     }
 
diff --git a/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp b/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp
index 1e1999fc2e14..4fe622244636 100644
--- a/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp
+++ b/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp
@@ -65,27 +65,27 @@ NodeDefinition::NodeDefinition(NodeType aType, const nsAString& aValue,
   {
     case CDATA_SECTION_NODE:
     {
-      nodeName = NS_LITERAL_STRING("#cdata-section");
+      nodeName.AssignLiteral("#cdata-section");
       break;
     }
     case COMMENT_NODE:
     {
-      nodeName = NS_LITERAL_STRING("#comment");
+      nodeName.AssignLiteral("#comment");
       break;
     }
     case DOCUMENT_NODE:
     {
-      nodeName = NS_LITERAL_STRING("#document");
+      nodeName.AssignLiteral("#document");
       break;
     }
     case DOCUMENT_FRAGMENT_NODE:
     {
-      nodeName = NS_LITERAL_STRING("#document-fragment");
+      nodeName.AssignLiteral("#document-fragment");
       break;
     }
     case TEXT_NODE:
     {
-      nodeName = NS_LITERAL_STRING("#text");
+      nodeName.AssignLiteral("#text");
       break;
     }
     default:
diff --git a/extensions/transformiix/source/xml/parser/txXMLParser.cpp b/extensions/transformiix/source/xml/parser/txXMLParser.cpp
index 858d178c8526..d453d519c6aa 100644
--- a/extensions/transformiix/source/xml/parser/txXMLParser.cpp
+++ b/extensions/transformiix/source/xml/parser/txXMLParser.cpp
@@ -236,7 +236,7 @@ txXMLParser::parse(istream& aInputStream, const nsAString& aUri,
     mErrorString.Truncate();
     *aResultDoc = nsnull;
     if (!aInputStream) {
-        mErrorString.Append(NS_LITERAL_STRING("unable to parse xml: invalid or unopen stream encountered."));
+        mErrorString.AppendLiteral("unable to parse xml: invalid or unopen stream encountered.");
         return NS_ERROR_FAILURE;
     }
     mExpatParser = XML_ParserCreate(nsnull);
@@ -427,9 +427,9 @@ txXMLParser::createErrorString()
 {
     XML_Error errCode = XML_GetErrorCode(mExpatParser);
     mErrorString.AppendWithConversion(XML_ErrorString(errCode));
-    mErrorString.Append(NS_LITERAL_STRING(" at line "));
+    mErrorString.AppendLiteral(" at line ");
     mErrorString.AppendInt(XML_GetCurrentLineNumber(mExpatParser));
-    mErrorString.Append(NS_LITERAL_STRING(" in "));
+    mErrorString.AppendLiteral(" in ");
     mErrorString.Append((const PRUnichar*)XML_GetBase(mExpatParser));
 }
 #endif
diff --git a/extensions/transformiix/source/xpath/AdditiveExpr.cpp b/extensions/transformiix/source/xpath/AdditiveExpr.cpp
index e94c1ea325bb..acf5b01d732c 100644
--- a/extensions/transformiix/source/xpath/AdditiveExpr.cpp
+++ b/extensions/transformiix/source/xpath/AdditiveExpr.cpp
@@ -88,18 +88,18 @@ void
 AdditiveExpr::toString(nsAString& str)
 {
     if ( leftExpr ) leftExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
     switch ( op ) {
         case SUBTRACTION:
-            str.Append(NS_LITERAL_STRING(" - "));
+            str.AppendLiteral(" - ");
             break;
         default:
-            str.Append(NS_LITERAL_STRING(" + "));
+            str.AppendLiteral(" + ");
             break;
     }
     if ( rightExpr ) rightExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
 }
 #endif
diff --git a/extensions/transformiix/source/xpath/BooleanExpr.cpp b/extensions/transformiix/source/xpath/BooleanExpr.cpp
index 94755e80d65f..841250bcb7c4 100644
--- a/extensions/transformiix/source/xpath/BooleanExpr.cpp
+++ b/extensions/transformiix/source/xpath/BooleanExpr.cpp
@@ -90,18 +90,18 @@ void
 BooleanExpr::toString(nsAString& str)
 {
     if ( leftExpr ) leftExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
     switch ( op ) {
         case OR:
-            str.Append(NS_LITERAL_STRING(" or "));
+            str.AppendLiteral(" or ");
             break;
         default:
-            str.Append(NS_LITERAL_STRING(" and "));
+            str.AppendLiteral(" and ");
             break;
     }
     if ( rightExpr ) rightExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
 }
 #endif
diff --git a/extensions/transformiix/source/xpath/BooleanResult.cpp b/extensions/transformiix/source/xpath/BooleanResult.cpp
index 952a898ba15c..c61df5d73dbd 100644
--- a/extensions/transformiix/source/xpath/BooleanResult.cpp
+++ b/extensions/transformiix/source/xpath/BooleanResult.cpp
@@ -61,8 +61,8 @@ short BooleanResult::getResultType() {
 } //-- getResultType
 
 void BooleanResult::stringValue(nsAString& str)  {
-    if ( value ) str.Append(NS_LITERAL_STRING("true"));
-    else str.Append(NS_LITERAL_STRING("false"));
+    if ( value ) str.AppendLiteral("true");
+    else str.AppendLiteral("false");
 } //-- toString
 
 nsAString*
diff --git a/extensions/transformiix/source/xpath/FilterExpr.cpp b/extensions/transformiix/source/xpath/FilterExpr.cpp
index 5e8c0191f0c3..109057fc5fdb 100644
--- a/extensions/transformiix/source/xpath/FilterExpr.cpp
+++ b/extensions/transformiix/source/xpath/FilterExpr.cpp
@@ -91,7 +91,7 @@ void
 FilterExpr::toString(nsAString& str)
 {
     if ( expr ) expr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
     PredicateList::toString(str);
 }
 #endif
diff --git a/extensions/transformiix/source/xpath/FunctionCall.cpp b/extensions/transformiix/source/xpath/FunctionCall.cpp
index 797e994dfe28..daf942e74d85 100644
--- a/extensions/transformiix/source/xpath/FunctionCall.cpp
+++ b/extensions/transformiix/source/xpath/FunctionCall.cpp
@@ -160,7 +160,7 @@ PRBool FunctionCall::requireParams(PRInt32 aParamCountMin,
         (aParamCountMax > -1 && argc > aParamCountMax)) {
         nsAutoString err(NS_LITERAL_STRING("invalid number of parameters for function"));
 #ifdef TX_TO_STRING
-        err.Append(NS_LITERAL_STRING(": "));
+        err.AppendLiteral(": ");
         toString(err);
 #endif
         aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG);
diff --git a/extensions/transformiix/source/xpath/LocationStep.cpp b/extensions/transformiix/source/xpath/LocationStep.cpp
index b4781645552b..7e03f8dce496 100644
--- a/extensions/transformiix/source/xpath/LocationStep.cpp
+++ b/extensions/transformiix/source/xpath/LocationStep.cpp
@@ -282,40 +282,40 @@ LocationStep::toString(nsAString& str)
 {
     switch (mAxisIdentifier) {
         case ANCESTOR_AXIS :
-            str.Append(NS_LITERAL_STRING("ancestor::"));
+            str.AppendLiteral("ancestor::");
             break;
         case ANCESTOR_OR_SELF_AXIS :
-            str.Append(NS_LITERAL_STRING("ancestor-or-self::"));
+            str.AppendLiteral("ancestor-or-self::");
             break;
         case ATTRIBUTE_AXIS:
             str.Append(PRUnichar('@'));
             break;
         case DESCENDANT_AXIS:
-            str.Append(NS_LITERAL_STRING("descendant::"));
+            str.AppendLiteral("descendant::");
             break;
         case DESCENDANT_OR_SELF_AXIS:
-            str.Append(NS_LITERAL_STRING("descendant-or-self::"));
+            str.AppendLiteral("descendant-or-self::");
             break;
         case FOLLOWING_AXIS :
-            str.Append(NS_LITERAL_STRING("following::"));
+            str.AppendLiteral("following::");
             break;
         case FOLLOWING_SIBLING_AXIS:
-            str.Append(NS_LITERAL_STRING("following-sibling::"));
+            str.AppendLiteral("following-sibling::");
             break;
         case NAMESPACE_AXIS:
-            str.Append(NS_LITERAL_STRING("namespace::"));
+            str.AppendLiteral("namespace::");
             break;
         case PARENT_AXIS :
-            str.Append(NS_LITERAL_STRING("parent::"));
+            str.AppendLiteral("parent::");
             break;
         case PRECEDING_AXIS :
-            str.Append(NS_LITERAL_STRING("preceding::"));
+            str.AppendLiteral("preceding::");
             break;
         case PRECEDING_SIBLING_AXIS :
-            str.Append(NS_LITERAL_STRING("preceding-sibling::"));
+            str.AppendLiteral("preceding-sibling::");
             break;
         case SELF_AXIS :
-            str.Append(NS_LITERAL_STRING("self::"));
+            str.AppendLiteral("self::");
             break;
         default:
             break;
diff --git a/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp b/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
index 6beff6c3f102..570a89385d1d 100644
--- a/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
+++ b/extensions/transformiix/source/xpath/MultiplicativeExpr.cpp
@@ -119,21 +119,21 @@ void
 MultiplicativeExpr::toString(nsAString& str)
 {
     if ( leftExpr ) leftExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
     switch ( op ) {
         case DIVIDE:
-            str.Append(NS_LITERAL_STRING(" div "));
+            str.AppendLiteral(" div ");
             break;
         case MODULUS:
-            str.Append(NS_LITERAL_STRING(" mod "));
+            str.AppendLiteral(" mod ");
             break;
         default:
-            str.Append(NS_LITERAL_STRING(" * "));
+            str.AppendLiteral(" * ");
             break;
     }
     if ( rightExpr ) rightExpr->toString(str);
-    else str.Append(NS_LITERAL_STRING("null"));
+    else str.AppendLiteral("null");
 
 }
 #endif
diff --git a/extensions/transformiix/source/xpath/PathExpr.cpp b/extensions/transformiix/source/xpath/PathExpr.cpp
index a1fd07d2bec1..ef7d58a6d166 100644
--- a/extensions/transformiix/source/xpath/PathExpr.cpp
+++ b/extensions/transformiix/source/xpath/PathExpr.cpp
@@ -234,7 +234,7 @@ PathExpr::toString(nsAString& dest)
     while ((pxi = (PathExprItem*)iter.next())) {
         switch (pxi->pathOp) {
             case DESCENDANT_OP:
-                dest.Append(NS_LITERAL_STRING("//"));
+                dest.AppendLiteral("//");
                 break;
             case RELATIVE_OP:
                 dest.Append(PRUnichar('/'));
diff --git a/extensions/transformiix/source/xpath/RelationalExpr.cpp b/extensions/transformiix/source/xpath/RelationalExpr.cpp
index b563c934c4d1..e4fc1b96b331 100644
--- a/extensions/transformiix/source/xpath/RelationalExpr.cpp
+++ b/extensions/transformiix/source/xpath/RelationalExpr.cpp
@@ -213,19 +213,19 @@ RelationalExpr::toString(nsAString& str)
 
     switch (mOp) {
         case NOT_EQUAL:
-            str.Append(NS_LITERAL_STRING("!="));
+            str.AppendLiteral("!=");
             break;
         case LESS_THAN:
             str.Append(PRUnichar('<'));
             break;
         case LESS_OR_EQUAL:
-            str.Append(NS_LITERAL_STRING("<="));
+            str.AppendLiteral("<=");
             break;
         case GREATER_THAN :
             str.Append(PRUnichar('>'));
             break;
         case GREATER_OR_EQUAL:
-            str.Append(NS_LITERAL_STRING(">="));
+            str.AppendLiteral(">=");
             break;
         default:
             str.Append(PRUnichar('='));
diff --git a/extensions/transformiix/source/xpath/UnionExpr.cpp b/extensions/transformiix/source/xpath/UnionExpr.cpp
index 2b044b8a8916..7029e1a0c5f4 100644
--- a/extensions/transformiix/source/xpath/UnionExpr.cpp
+++ b/extensions/transformiix/source/xpath/UnionExpr.cpp
@@ -135,7 +135,7 @@ UnionExpr::toString(nsAString& dest)
     while (iter.hasNext()) {
         //-- set operator
         if (count > 0)
-            dest.Append(NS_LITERAL_STRING(" | "));
+            dest.AppendLiteral(" | ");
         ((Expr*)iter.next())->toString(dest);
         ++count;
     }
diff --git a/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp b/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp
index 3aa982008fdb..a38f583e0a4f 100644
--- a/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp
+++ b/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp
@@ -63,7 +63,7 @@ nsXPathNSResolver::LookupNamespaceURI(const nsAString & aPrefix,
                                       nsAString & aResult)
 {
     if (aPrefix.EqualsLiteral("xml")) {
-        aResult = NS_LITERAL_STRING("http://www.w3.org/XML/1998/namespace");
+        aResult.AssignLiteral("http://www.w3.org/XML/1998/namespace");
 
         return NS_OK;
     }
diff --git a/extensions/transformiix/source/xpath/txNodeTypeTest.cpp b/extensions/transformiix/source/xpath/txNodeTypeTest.cpp
index 48877ef446ba..1fa6201009c1 100644
--- a/extensions/transformiix/source/xpath/txNodeTypeTest.cpp
+++ b/extensions/transformiix/source/xpath/txNodeTypeTest.cpp
@@ -106,7 +106,7 @@ txNodeTypeTest::toString(nsAString& aDest)
             aDest.Append(NS_LITERAL_STRING("text()"));
             break;
         case PI_TYPE:
-            aDest.Append(NS_LITERAL_STRING("processing-instruction("));
+            aDest.AppendLiteral("processing-instruction(");
             if (mNodeName) {
                 nsAutoString str;
                 mNodeName->ToString(str);
diff --git a/extensions/transformiix/source/xslt/functions/txFormatNumberFunctionCall.cpp b/extensions/transformiix/source/xslt/functions/txFormatNumberFunctionCall.cpp
index d55fcd035ad3..83d12c65e64d 100644
--- a/extensions/transformiix/source/xslt/functions/txFormatNumberFunctionCall.cpp
+++ b/extensions/transformiix/source/xslt/functions/txFormatNumberFunctionCall.cpp
@@ -102,7 +102,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
     if (!format) {
         nsAutoString err(NS_LITERAL_STRING("unknown decimal format"));
 #ifdef TX_TO_STRING
-        err.Append(NS_LITERAL_STRING(" for: "));
+        err.AppendLiteral(" for: ");
         toString(err);
 #endif
         aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG);
@@ -177,7 +177,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
                     else {
                         nsAutoString err(INVALID_PARAM_VALUE);
 #ifdef TX_TO_STRING
-                        err.Append(NS_LITERAL_STRING(": "));
+                        err.AppendLiteral(": ");
                         toString(err);
 #endif
                         aContext->receiveError(err,
@@ -191,7 +191,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
                     else {
                         nsAutoString err(INVALID_PARAM_VALUE);
 #ifdef TX_TO_STRING
-                        err.Append(NS_LITERAL_STRING(": "));
+                        err.AppendLiteral(": ");
                         toString(err);
 #endif
                         aContext->receiveError(err,
@@ -279,7 +279,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
         groupSize == 0) {
         nsAutoString err(INVALID_PARAM_VALUE);
 #ifdef TX_TO_STRING
-        err.Append(NS_LITERAL_STRING(": "));
+        err.AppendLiteral(": ");
         toString(err);
 #endif
         aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG);
diff --git a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp b/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp
index bf6e2a39b395..3cbce6fc7802 100644
--- a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp
+++ b/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp
@@ -585,7 +585,7 @@ void txMozillaXMLOutput::startHTMLElement(nsIDOMElement* aElement, PRBool aXHTML
         NS_ASSERTION(NS_SUCCEEDED(rv), "Can't set http-equiv on meta");
         nsAutoString metacontent;
         metacontent.Append(mOutputFormat.mMediaType);
-        metacontent.Append(NS_LITERAL_STRING("; charset="));
+        metacontent.AppendLiteral("; charset=");
         metacontent.Append(mOutputFormat.mEncoding);
         rv = meta->SetAttribute(NS_LITERAL_STRING("content"),
                                 metacontent);
@@ -770,7 +770,7 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, PRInt32 aNsID,
         NS_ENSURE_SUCCESS(rv, rv);
         nsAutoString qName;
         if (mOutputFormat.mMethod == eHTMLOutput) {
-            qName.Assign(NS_LITERAL_STRING("html"));
+            qName.AssignLiteral("html");
         }
         else {
             qName.Assign(aName);
diff --git a/extensions/transformiix/source/xslt/txOutputFormat.cpp b/extensions/transformiix/source/xslt/txOutputFormat.cpp
index fb7693e42a20..afedacf6bb57 100644
--- a/extensions/transformiix/source/xslt/txOutputFormat.cpp
+++ b/extensions/transformiix/source/xslt/txOutputFormat.cpp
@@ -118,10 +118,10 @@ void txOutputFormat::setFromDefaults()
         case eXMLOutput:
         {
             if (mVersion.IsEmpty())
-                mVersion.Append(NS_LITERAL_STRING("1.0"));
+                mVersion.AppendLiteral("1.0");
 
             if (mEncoding.IsEmpty())
-                mEncoding.Append(NS_LITERAL_STRING("UTF-8"));
+                mEncoding.AppendLiteral("UTF-8");
 
             if (mOmitXMLDeclaration == eNotSet)
                 mOmitXMLDeclaration = eFalse;
@@ -130,33 +130,33 @@ void txOutputFormat::setFromDefaults()
                 mIndent = eFalse;
 
             if (mMediaType.IsEmpty())
-                mMediaType.Append(NS_LITERAL_STRING("text/xml"));
+                mMediaType.AppendLiteral("text/xml");
 
             break;
         }
         case eHTMLOutput:
         {
             if (mVersion.IsEmpty())
-                mVersion.Append(NS_LITERAL_STRING("4.0"));
+                mVersion.AppendLiteral("4.0");
 
             if (mEncoding.IsEmpty())
-                mEncoding.Append(NS_LITERAL_STRING("UTF-8"));
+                mEncoding.AppendLiteral("UTF-8");
 
             if (mIndent == eNotSet)
                 mIndent = eTrue;
 
             if (mMediaType.IsEmpty())
-                mMediaType.Append(NS_LITERAL_STRING("text/html"));
+                mMediaType.AppendLiteral("text/html");
 
             break;
         }
         case eTextOutput:
         {
             if (mEncoding.IsEmpty())
-                mEncoding.Append(NS_LITERAL_STRING("UTF-8"));
+                mEncoding.AppendLiteral("UTF-8");
 
             if (mMediaType.IsEmpty())
-                mMediaType.Append(NS_LITERAL_STRING("text/plain"));
+                mMediaType.AppendLiteral("text/plain");
 
             break;
         }
diff --git a/extensions/transformiix/source/xslt/txStandaloneStylesheetCompiler.cpp b/extensions/transformiix/source/xslt/txStandaloneStylesheetCompiler.cpp
index 96bd830b0513..31127f367d33 100644
--- a/extensions/transformiix/source/xslt/txStandaloneStylesheetCompiler.cpp
+++ b/extensions/transformiix/source/xslt/txStandaloneStylesheetCompiler.cpp
@@ -171,7 +171,7 @@ txDriver::parse(istream& aInputStream, const nsAString& aUri)
 {
     mErrorString.Truncate();
     if (!aInputStream) {
-        mErrorString.Append(NS_LITERAL_STRING("unable to parse xml: invalid or unopen stream encountered."));
+        mErrorString.AppendLiteral("unable to parse xml: invalid or unopen stream encountered.");
         return NS_ERROR_FAILURE;
     }
     mExpatParser = XML_ParserCreate(nsnull);
@@ -318,9 +318,9 @@ txDriver::createErrorString()
 {
     XML_Error errCode = XML_GetErrorCode(mExpatParser);
     mErrorString.AppendWithConversion(XML_ErrorString(errCode));
-    mErrorString.Append(NS_LITERAL_STRING(" at line "));
+    mErrorString.AppendLiteral(" at line ");
     mErrorString.AppendInt(XML_GetCurrentLineNumber(mExpatParser));
-    mErrorString.Append(NS_LITERAL_STRING(" in "));
+    mErrorString.AppendLiteral(" in ");
     mErrorString.Append((const PRUnichar*)XML_GetBase(mExpatParser));
 }
 
diff --git a/extensions/transformiix/source/xslt/txXSLTNumber.cpp b/extensions/transformiix/source/xslt/txXSLTNumber.cpp
index efc128e2eaeb..751b8f069968 100644
--- a/extensions/transformiix/source/xslt/txXSLTNumber.cpp
+++ b/extensions/transformiix/source/xslt/txXSLTNumber.cpp
@@ -361,7 +361,7 @@ txXSLTNumber::getCounters(Expr* aGroupSize, Expr* aGroupSeparator,
                                                groupSeparator, defaultCounter);
         NS_ENSURE_SUCCESS(rv, rv);
 
-        defaultCounter->mSeparator = NS_LITERAL_STRING(".");
+        defaultCounter->mSeparator.AssignLiteral(".");
         rv = aCounters.add(defaultCounter);
         if (NS_FAILED(rv)) {
             // XXX ErrorReport: out of memory
@@ -380,7 +380,7 @@ txXSLTNumber::getCounters(Expr* aGroupSize, Expr* aGroupSeparator,
             // there is only one formatting token and we're formatting a
             // value-list longer then one we use the default separator. This
             // won't be used when formatting the first value anyway.
-            sepToken = NS_LITERAL_STRING(".");
+            sepToken.AssignLiteral(".");
         }
         else {
             while (formatPos < formatLen &&
diff --git a/extensions/transformiix/source/xslt/txXSLTPatterns.cpp b/extensions/transformiix/source/xslt/txXSLTPatterns.cpp
index f5f64c65b22b..fd014db4ee74 100644
--- a/extensions/transformiix/source/xslt/txXSLTPatterns.cpp
+++ b/extensions/transformiix/source/xslt/txXSLTPatterns.cpp
@@ -134,13 +134,13 @@ void
 txUnionPattern::toString(nsAString& aDest)
 {
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txUnionPattern{"));
+    aDest.AppendLiteral("txUnionPattern{");
 #endif
     txListIterator iter(&mLocPathPatterns);
     if (iter.hasNext())
         ((txPattern*)iter.next())->toString(aDest);
     while (iter.hasNext()) {
-        aDest.Append(NS_LITERAL_STRING(" | "));
+        aDest.AppendLiteral(" | ");
         ((txPattern*)iter.next())->toString(aDest);
     }
 #ifdef DEBUG
@@ -260,7 +260,7 @@ txLocPathPattern::toString(nsAString& aDest)
 {
     txListIterator iter(&mSteps);
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txLocPathPattern{"));
+    aDest.AppendLiteral("txLocPathPattern{");
 #endif
     Step* step;
     step = (Step*)iter.next();
@@ -271,7 +271,7 @@ txLocPathPattern::toString(nsAString& aDest)
         if (step->isChild)
             aDest.Append(PRUnichar('/'));
         else
-            aDest.Append(NS_LITERAL_STRING("//"));
+            aDest.AppendLiteral("//");
         step->pattern->toString(aDest);
     }
 #ifdef DEBUG
@@ -305,7 +305,7 @@ void
 txRootPattern::toString(nsAString& aDest)
 {
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txRootPattern{"));
+    aDest.AppendLiteral("txRootPattern{");
 #endif
     if (mSerialize)
         aDest.Append(PRUnichar('/'));
@@ -388,9 +388,9 @@ void
 txIdPattern::toString(nsAString& aDest)
 {
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txIdPattern{"));
+    aDest.AppendLiteral("txIdPattern{");
 #endif
-    aDest.Append(NS_LITERAL_STRING("id('"));
+    aDest.AppendLiteral("id('");
     PRUint32 k, count = mIds.Count() - 1;
     for (k = 0; k < count; ++k) {
         aDest.Append(*mIds[k]);
@@ -441,9 +441,9 @@ void
 txKeyPattern::toString(nsAString& aDest)
 {
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txKeyPattern{"));
+    aDest.AppendLiteral("txKeyPattern{");
 #endif
-    aDest.Append(NS_LITERAL_STRING("key('"));
+    aDest.AppendLiteral("key('");
     nsAutoString tmp;
     if (mPrefix) {
         mPrefix->ToString(tmp);
@@ -452,7 +452,7 @@ txKeyPattern::toString(nsAString& aDest)
     }
     mName.mLocalName->ToString(tmp);
     aDest.Append(tmp);
-    aDest.Append(NS_LITERAL_STRING(", "));
+    aDest.AppendLiteral(", ");
     aDest.Append(mValue);
     aDest.Append(NS_LITERAL_STRING("')"));
 #ifdef DEBUG
@@ -590,7 +590,7 @@ void
 txStepPattern::toString(nsAString& aDest)
 {
 #ifdef DEBUG
-    aDest.Append(NS_LITERAL_STRING("txStepPattern{"));
+    aDest.AppendLiteral("txStepPattern{");
 #endif
     if (mIsAttr)
         aDest.Append(PRUnichar('@'));
diff --git a/extensions/typeaheadfind/src/nsTypeAheadFind.cpp b/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
index 97b3b5b8d651..1deb96a7f613 100644
--- a/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
+++ b/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
@@ -2756,25 +2756,25 @@ nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
       nsAutoString key;
 
       if (mLinksOnly) {
-        key.Assign(NS_LITERAL_STRING("startlinkfind"));
+        key.AssignLiteral("startlinkfind");
       } else {
-        key.Assign(NS_LITERAL_STRING("starttextfind"));
+        key.AssignLiteral("starttextfind");
       }
       GetTranslatedString(key, statusString);
     } else {
       nsAutoString key;
 
       if (mLinksOnly) {
-        key.Assign(NS_LITERAL_STRING("link"));
+        key.AssignLiteral("link");
       } else {
-        key.Assign(NS_LITERAL_STRING("text"));
+        key.AssignLiteral("text");
       }
 
       if (!aSuccess) {
-        key.Append(NS_LITERAL_STRING("not"));
+        key.AppendLiteral("not");
       }
 
-      key.Append(NS_LITERAL_STRING("found"));
+      key.AppendLiteral("found");
 
       if (NS_SUCCEEDED(GetTranslatedString(key, statusString))) {
         if (mRepeatingMode == eRepeatingChar || 
@@ -2791,13 +2791,13 @@ nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
 
         if (mRepeatingMode != eRepeatingNone) {
           if (mRepeatingMode == eRepeatingChar) {
-            key = NS_LITERAL_STRING("repeated");
+            key.AssignLiteral("repeated");
           }
           else if (mRepeatingMode == eRepeatingForward) {
-            key = NS_LITERAL_STRING("nextmatch");
+            key.AssignLiteral("nextmatch");
           }
           else {
-            key = NS_LITERAL_STRING("prevmatch");
+            key.AssignLiteral("prevmatch");
           }
           nsAutoString repeatedModeString;
           GetTranslatedString(key, repeatedModeString);
diff --git a/extensions/wallet/src/nsWalletService.cpp b/extensions/wallet/src/nsWalletService.cpp
index 130247a8b0aa..aa66df13687c 100644
--- a/extensions/wallet/src/nsWalletService.cpp
+++ b/extensions/wallet/src/nsWalletService.cpp
@@ -418,7 +418,7 @@ nsWalletlibService::OnStateChange(nsIWebProgress* aWebProgress,
                         nsAutoString type;
                         rv = inputElement->GetType(type);
                         if (NS_SUCCEEDED(rv)) {
-                          if (type.Equals(NS_LITERAL_STRING("password"), nsCaseInsensitiveStringComparator())) {
+                          if (type.LowerCaseEqualsLiteral("password")) {
                             passwordCount++;
                           }
                         }
@@ -439,10 +439,8 @@ nsWalletlibService::OnStateChange(nsIWebProgress* aWebProgress,
                         rv = inputElement->GetType(type);
                         if (NS_SUCCEEDED(rv)) {
                           if (type.IsEmpty() ||
-                              type.Equals(NS_LITERAL_STRING("text"),
-                                          nsCaseInsensitiveStringComparator()) ||
-                              type.Equals(NS_LITERAL_STRING("password"),
-                                          nsCaseInsensitiveStringComparator())) {
+                              type.LowerCaseEqualsLiteral("text") ||
+                              type.LowerCaseEqualsLiteral("password")) {
                             nsAutoString field;
                             rv = inputElement->GetName(field);
                             if (NS_SUCCEEDED(rv)) {
diff --git a/extensions/wallet/src/singsign.cpp b/extensions/wallet/src/singsign.cpp
index 8689c09bb22b..0e8206300cc6 100644
--- a/extensions/wallet/src/singsign.cpp
+++ b/extensions/wallet/src/singsign.cpp
@@ -1374,7 +1374,7 @@ si_GetURLAndUserForChangeForm(nsIPrompt* dialog, const nsString& password)
           nsAutoString userName;
           if (NS_SUCCEEDED(si_Decrypt (data->value, userName))) {
             nsAutoString temp; temp.AssignWithConversion(url->passwordRealm);
-            temp.Append(NS_LITERAL_STRING(":"));
+            temp.AppendLiteral(":");
             temp.Append(userName);
 
             *list2 = ToNewUnicode(temp);
diff --git a/extensions/wallet/src/wallet.cpp b/extensions/wallet/src/wallet.cpp
index 4f072f69d0ff..c16c1ed76732 100644
--- a/extensions/wallet/src/wallet.cpp
+++ b/extensions/wallet/src/wallet.cpp
@@ -1799,7 +1799,7 @@ FieldToValue(
 
     nsAutoString localSchemaUCS2;
     wallet_GetHostFile(wallet_lastUrl, localSchemaUCS2);
-    localSchemaUCS2.Append(NS_LITERAL_STRING(":"));
+    localSchemaUCS2.AppendLiteral(":");
     localSchemaUCS2.Append(field);
     nsCAutoString localSchemaUTF8 = NS_ConvertUCS2toUTF8(localSchemaUCS2);
     nsCAutoString valueUTF8;
@@ -1909,16 +1909,14 @@ wallet_StepForwardOrBack
       if (goForward) {
         if (NS_SUCCEEDED(result) &&
             (type.IsEmpty() ||
-             type.Equals(NS_LITERAL_STRING("text"), 
-                         nsCaseInsensitiveStringComparator()))) {
+             type.LowerCaseEqualsLiteral("text"))) {
           /* at  element and it's type is either "text" or is missing ("text" by default) */
           atInputOrSelect = PR_TRUE;
           return;
         }
       } else {
         if (NS_SUCCEEDED(result) &&
-            !type.Equals(NS_LITERAL_STRING("hidden"),
-                         nsCaseInsensitiveStringComparator())) {
+            !type.LowerCaseEqualsLiteral("hidden")) {
           /* at  element and it's type is not "hidden" */
           atInputOrSelect = PR_TRUE;
           return;
@@ -1937,14 +1935,14 @@ wallet_StepForwardOrBack
     nsAutoString siblingNameUCS2;
     result = elementNode->GetNodeName(siblingNameUCS2);
     nsCAutoString siblingNameUTF8; siblingNameUTF8.AssignWithConversion(siblingNameUCS2);
-    if (siblingNameUTF8.EqualsIgnoreCase("#text")) {
+    if (siblingNameUTF8.LowerCaseEqualsLiteral("#text")) {
       nsAutoString siblingValue;
       result = elementNode->GetNodeValue(siblingValue);
       text.Append(siblingValue);
     }
 
     /* if we've reached a SCRIPT node, don't fetch its siblings */
-    if (siblingNameUTF8.EqualsIgnoreCase("SCRIPT")) {
+    if (siblingNameUTF8.LowerCaseEqualsLiteral("script")) {
       return;
     }
 
@@ -2355,8 +2353,7 @@ wallet_GetPrefills(
     result = inputElement->GetType(type);
     if (NS_SUCCEEDED(result) &&
         (type.IsEmpty() ||
-         type.Equals(NS_LITERAL_STRING("text"),
-                     nsCaseInsensitiveStringComparator()))) {
+         type.LowerCaseEqualsLiteral("text"))) {
       nsAutoString field;
       result = inputElement->GetName(field);
       if (NS_SUCCEEDED(result)) {
@@ -2366,7 +2363,7 @@ wallet_GetPrefills(
         if (localSchema.IsEmpty()) {
           nsCOMPtr element = do_QueryInterface(elementNode);
           if (element) {
-            nsAutoString vcard; vcard.Assign(NS_LITERAL_STRING("VCARD_NAME"));
+            nsAutoString vcard; vcard.AssignLiteral("VCARD_NAME");
             nsAutoString vcardValueUCS2;
             result = element->GetAttribute(vcard, vcardValueUCS2);
             if (NS_OK == result) {
@@ -2891,7 +2888,7 @@ wallet_Capture(nsIDocument* doc, const nsString& field, const nsString& value, n
 
     nsAutoString concatParamUCS2;
     wallet_GetHostFile(wallet_lastUrl, concatParamUCS2);
-    concatParamUCS2.Append(NS_LITERAL_STRING(":"));
+    concatParamUCS2.AppendLiteral(":");
     concatParamUCS2.Append(field);
     nsCAutoString concatParamUTF8 = NS_ConvertUCS2toUTF8(concatParamUCS2);
     while(wallet_ReadFromList
@@ -2920,7 +2917,7 @@ wallet_Capture(nsIDocument* doc, const nsString& field, const nsString& value, n
 
       //??? aren't these next four lines redundant?
       wallet_GetHostFile(wallet_lastUrl, concatParamUCS2);
-      concatParamUCS2.Append(NS_LITERAL_STRING(":"));
+      concatParamUCS2.AppendLiteral(":");
       concatParamUCS2.Append(field);
       concatParamUTF8 = NS_ConvertUCS2toUTF8(concatParamUCS2);
     }
@@ -2929,7 +2926,7 @@ wallet_Capture(nsIDocument* doc, const nsString& field, const nsString& value, n
     dummy = nsnull;
     nsAutoString hostFileFieldUCS2;
     wallet_GetHostFile(wallet_lastUrl, hostFileFieldUCS2);
-    hostFileFieldUCS2.Append(NS_LITERAL_STRING(":"));
+    hostFileFieldUCS2.AppendLiteral(":");
     hostFileFieldUCS2.Append(field);
 
     if (wallet_WriteToList
@@ -3575,8 +3572,7 @@ wallet_CaptureInputElement(nsIDOMNode* elementNode, nsIDocument* doc) {
     result = inputElement->GetType(type);
     if (NS_SUCCEEDED(result) &&
         (type.IsEmpty() ||
-         type.Equals(NS_LITERAL_STRING("text"),
-                     nsCaseInsensitiveStringComparator()))) {
+         type.LowerCaseEqualsLiteral("text"))) {
       nsAutoString field;
       result = inputElement->GetName(field);
       if (NS_SUCCEEDED(result)) {
@@ -3587,7 +3583,7 @@ wallet_CaptureInputElement(nsIDOMNode* elementNode, nsIDocument* doc) {
           nsCAutoString schema;
           nsCOMPtr element = do_QueryInterface(elementNode);
           if (element) {
-            nsAutoString vcardName; vcardName.Assign(NS_LITERAL_STRING("VCARD_NAME"));
+            nsAutoString vcardName; vcardName.AssignLiteral("VCARD_NAME");
             nsAutoString vcardValueUCS2;
             result = element->GetAttribute(vcardName, vcardValueUCS2);
             if (NS_OK == result) {
@@ -3652,7 +3648,7 @@ wallet_CaptureSelectElement(nsIDOMNode* elementNode, nsIDocument* doc) {
                 nsCAutoString schema;
                 nsCOMPtr element = do_QueryInterface(elementNode);
                 if (element) {
-                  nsAutoString vcardName; vcardName.Assign(NS_LITERAL_STRING("VCARD_NAME"));
+                  nsAutoString vcardName; vcardName.AssignLiteral("VCARD_NAME");
                   nsAutoString vcardValueUCS2;
                   result = element->GetAttribute(vcardName, vcardValueUCS2);
                   if (NS_OK == result) {
@@ -3891,8 +3887,8 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindowInternal* window) {
                 rv = inputElement->GetType(type);
                 if (NS_SUCCEEDED(rv)) {
 
-                  PRBool isText = (type.IsEmpty() || type.Equals(NS_LITERAL_STRING("text"), nsCaseInsensitiveStringComparator()));
-                  PRBool isPassword = type.Equals(NS_LITERAL_STRING("password"), nsCaseInsensitiveStringComparator());
+                  PRBool isText = (type.IsEmpty() || type.LowerCaseEqualsLiteral("text"));
+                  PRBool isPassword = type.LowerCaseEqualsLiteral("password");
 
                   // don't save password if field was left blank
                   if (isPassword) {
@@ -3910,11 +3906,11 @@ WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindowInternal* window) {
                   if (isPassword && !SI_GetBoolPref(pref_AutoCompleteOverride, PR_FALSE)) {
                     nsAutoString val;
                     (void) inputElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), val);
-                    if (val.EqualsIgnoreCase("off")) {
+                    if (val.LowerCaseEqualsLiteral("off")) {
                       isPassword = PR_FALSE;
                     } else {
                       (void) formElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), val);
-                      if (val.EqualsIgnoreCase("off")) {
+                      if (val.LowerCaseEqualsLiteral("off")) {
                         isPassword = PR_FALSE;
                       }
                     }
diff --git a/extensions/webservices/proxy/tests/wspproxytest.cpp b/extensions/webservices/proxy/tests/wspproxytest.cpp
index d02d58fc601f..c5cee6a6bc2d 100644
--- a/extensions/webservices/proxy/tests/wspproxytest.cpp
+++ b/extensions/webservices/proxy/tests/wspproxytest.cpp
@@ -121,13 +121,13 @@ WSPProxyTest::TestComplexTypeWrapper(nsAString& aResult)
   nsresult rv = CreateComplexTypeWrapper(getter_AddRefs(wrapper),
                                          getter_AddRefs(info));
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed creating complex type wrapper"));
+    aResult.AssignLiteral("WSPProxyTest: Failed creating complex type wrapper");
     return NS_OK;
   }
 
   nsCOMPtr propBag = do_QueryInterface(wrapper);
   if (!propBag) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Wrapper is not property bag"));
+    aResult.AssignLiteral("WSPProxyTest: Wrapper is not property bag");
     return NS_ERROR_FAILURE;
   }
 
@@ -144,7 +144,7 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   nsCOMPtr enumerator;
   nsresult rv = propBag->GetEnumerator(getter_AddRefs(enumerator));
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting property bag enumerator"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting property bag enumerator");
     return rv;
   }
 
@@ -206,12 +206,12 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   nsAutoString str;
   rv = val->GetAsAString(str);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting value for property s"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting value for property s");
     return rv;
   }
 
   if (!str.EqualsLiteral(STRING_VAL)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for property s"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for property s");
     return NS_ERROR_FAILURE;
   }
 
@@ -219,12 +219,12 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   nsCOMPtr supVal;  
   rv = val->GetAsISupports(getter_AddRefs(supVal));  
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting value for property p"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting value for property p");
     return rv;
   }
   nsCOMPtr propBagVal = do_QueryInterface(supVal, &rv);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for property p"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for property p");
     return rv;
   }
 
@@ -232,7 +232,7 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   PRUint16 dataType;
   val->GetDataType(&dataType);
   if (dataType != nsIDataType::VTYPE_EMPTY) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for property p"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for property p");
     return NS_ERROR_FAILURE;
   }
 
@@ -244,12 +244,12 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   nsIID iid;
   rv = val->GetAsArray(&type, &iid, &count, (void**)&arrayVal1);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting value for property array1"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting value for property array1");
     return rv;
   }
   for (index = 0; index < count; index++) {
     if (arrayVal1[index] != sArray1[index]) {
-      aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of property array1"));
+      aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of property array1");
       return rv;      
     }
   }
@@ -259,12 +259,12 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   GET_AND_TEST_NAME(array2)
   rv = val->GetAsArray(&type, &iid, &count, (void**)&arrayVal2);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting value for property array2"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting value for property array2");
     return rv;
   }
   for (index = 0; index < count; index++) {
     if (arrayVal2[index] != sArray2[index]) {
-      aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of property array2"));
+      aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of property array2");
       return rv;      
     }
   }
@@ -274,16 +274,16 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
   GET_AND_TEST_NAME(array3)
   rv = val->GetAsArray(&type, &iid, &count, (void**)&arrayVal3);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed getting value for property array3"));
+    aResult.AssignLiteral("WSPProxyTest: Failed getting value for property array3");
     return rv;
   }
   propBagVal = do_QueryInterface(arrayVal3[0], &rv);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of property array3"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of property array3");
     return rv;
   }
   if (arrayVal3[1] != nsnull) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of  property array3"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of  property array3");
     return NS_ERROR_FAILURE;
   }
   NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(count, arrayVal3);
@@ -291,7 +291,7 @@ WSPProxyTest::TestComplexTypeWrapperInstance(nsIPropertyBag* propBag,
 #undef GET_AND_TEST
 #undef GET_AND_TEST_NAME
 
-  aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Test Succeeded!"));
+  aResult.AssignLiteral("WSPProxyTest: Test Succeeded!");
   return NS_OK;
 }
 
@@ -304,30 +304,30 @@ WSPProxyTest::TestPropertyBagWrapper(nsAString& aResult)
   nsresult rv = CreateComplexTypeWrapper(getter_AddRefs(ctwrapper),
                                          getter_AddRefs(info));
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed creating complex type wrapper"));
+    aResult.AssignLiteral("WSPProxyTest: Failed creating complex type wrapper");
     return NS_OK;
   }
 
   nsCOMPtr propBag = do_QueryInterface(ctwrapper);
   if (!propBag) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Wrapper is not property bag"));
+    aResult.AssignLiteral("WSPProxyTest: Wrapper is not property bag");
     return NS_OK;
   }
 
   nsCOMPtr wrapper = do_CreateInstance(NS_WEBSERVICEPROPERTYBAGWRAPPER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed creating property bag wrapper"));
+    aResult.AssignLiteral("WSPProxyTest: Failed creating property bag wrapper");
     return NS_OK;
   }
   rv = wrapper->Init(propBag, info);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed initializing property bag wrapper"));
+    aResult.AssignLiteral("WSPProxyTest: Failed initializing property bag wrapper");
     return NS_OK;
   }
 
   nsCOMPtr ct = do_QueryInterface(wrapper, &rv);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Property bag wrapper doesn't QI correctly"));
+    aResult.AssignLiteral("WSPProxyTest: Property bag wrapper doesn't QI correctly");
     return NS_OK;
   }
   
@@ -360,28 +360,28 @@ WSPProxyTest::TestPropertyBagWrapper(nsAString& aResult)
   nsAutoString str;
   rv = ct->GetS(str);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute s"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute s");
     return NS_OK;
   }
   if (!str.EqualsLiteral(STRING_VAL)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for attribute s"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for attribute s");
     return NS_OK;
   }
 
   nsCOMPtr p;
   rv = ct->GetP(getter_AddRefs(p));
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute p"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute p");
     return NS_OK;
   }
 
   rv = ct->GetP2(getter_AddRefs(p));
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute p2"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute p2");
     return NS_OK;
   }
   if (p) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for attribute p2"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for attribute p2");
     return NS_OK;
   }
 
@@ -390,12 +390,12 @@ WSPProxyTest::TestPropertyBagWrapper(nsAString& aResult)
   PRUint32* array1;
   rv = ct->Array1(&count, &array1);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute array1"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute array1");
     return NS_OK;
   }
   for (index = 0; index < count; index++) {
     if (array1[index] != sArray1[index]) {
-      aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of attribute array1"));
+      aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of attribute array1");
       return NS_OK;
     }
   }
@@ -404,12 +404,12 @@ WSPProxyTest::TestPropertyBagWrapper(nsAString& aResult)
   double* array2;
   rv = ct->Array2(&count, &array2);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute array2"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute array2");
     return NS_OK;
   }
   for (index = 0; index < count; index++) {
     if (array2[index] != sArray2[index]) {
-      aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of attribute array2"));
+      aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of attribute array2");
       return NS_OK;
     }
   }
@@ -418,18 +418,18 @@ WSPProxyTest::TestPropertyBagWrapper(nsAString& aResult)
   nsIWSPTestComplexType** array3;
   rv = ct->Array3(&count, &array3);
   if (NS_FAILED(rv)) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Failed to get value for attribute array3"));
+    aResult.AssignLiteral("WSPProxyTest: Failed to get value for attribute array3");
     return NS_OK;
   }
   if (!array3[0] || array3[1]) {
-    aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Value doesn't match for element of attribute array3"));
+    aResult.AssignLiteral("WSPProxyTest: Value doesn't match for element of attribute array3");
     return NS_OK;
   }
   NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(count, array3);
 
 #undef GET_AND_TEST
 
-  aResult.Assign(NS_LITERAL_STRING("WSPProxyTest: Test Succeeded!"));
+  aResult.AssignLiteral("WSPProxyTest: Test Succeeded!");
   return NS_OK;
 }
 
@@ -709,7 +709,7 @@ WSPTestComplexType::GetP2(nsIWSPTestComplexType * *aP2)
 NS_IMETHODIMP 
 WSPTestComplexType::GetS(nsAString & aS)
 {
-  aS.Assign(NS_LITERAL_STRING(STRING_VAL));
+  aS.AssignLiteral(STRING_VAL);
   return NS_OK;
 }
 
diff --git a/extensions/webservices/schema/src/nsSOAPTypes.cpp b/extensions/webservices/schema/src/nsSOAPTypes.cpp
index 6a9d1b44c986..66f437c66ae9 100644
--- a/extensions/webservices/schema/src/nsSOAPTypes.cpp
+++ b/extensions/webservices/schema/src/nsSOAPTypes.cpp
@@ -56,7 +56,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPArray,
 NS_IMETHODIMP 
 nsSOAPArray::GetTargetNamespace(nsAString& aTargetNamespace)
 {
-  aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
+  aTargetNamespace.AssignLiteral(NS_SOAP_1_2_ENCODING_NAMESPACE);
   return NS_OK;
 }
 
@@ -78,7 +78,7 @@ nsSOAPArray::Clear()
 NS_IMETHODIMP 
 nsSOAPArray::GetName(nsAString& aName)
 {
-  aName.Assign(NS_LITERAL_STRING("Array")); 
+  aName.AssignLiteral("Array"); 
   return NS_OK;
 }
 
@@ -220,7 +220,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSOAPArrayType,
 NS_IMETHODIMP 
 nsSOAPArrayType::GetTargetNamespace(nsAString& aTargetNamespace)
 {
-  aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
+  aTargetNamespace.AssignLiteral(NS_SOAP_1_2_ENCODING_NAMESPACE);
   return NS_OK;
 }
 
@@ -242,7 +242,7 @@ nsSOAPArrayType::Clear()
 NS_IMETHODIMP 
 nsSOAPArrayType::GetName(nsAString& aName)
 {
-  aName.Assign(NS_LITERAL_STRING("arrayType"));
+  aName.AssignLiteral("arrayType");
   return NS_OK;
 }
 
diff --git a/extensions/webservices/schema/src/nsSchemaAttributes.cpp b/extensions/webservices/schema/src/nsSchemaAttributes.cpp
index be7ffcaceea3..1bd6ce79d32c 100644
--- a/extensions/webservices/schema/src/nsSchemaAttributes.cpp
+++ b/extensions/webservices/schema/src/nsSchemaAttributes.cpp
@@ -637,7 +637,7 @@ nsSchemaAnyAttribute::GetComponentType(PRUint16 *aComponentType)
 NS_IMETHODIMP
 nsSchemaAnyAttribute::GetName(nsAString & aName)
 {
-  aName.Assign(NS_LITERAL_STRING("anyAttribute"));
+  aName.AssignLiteral("anyAttribute");
 
   return NS_OK;
 }
diff --git a/extensions/webservices/schema/src/nsSchemaParticles.cpp b/extensions/webservices/schema/src/nsSchemaParticles.cpp
index f37962209270..0e47bc21a14e 100644
--- a/extensions/webservices/schema/src/nsSchemaParticles.cpp
+++ b/extensions/webservices/schema/src/nsSchemaParticles.cpp
@@ -447,7 +447,7 @@ nsSchemaAnyParticle::GetParticleType(PRUint16 *aParticleType)
 NS_IMETHODIMP
 nsSchemaAnyParticle::GetName(nsAString& aName)
 {
-  aName.Assign(NS_LITERAL_STRING("any"));
+  aName.AssignLiteral("any");
 
   return NS_OK;
 }
diff --git a/extensions/webservices/schema/src/nsSchemaSimpleTypes.cpp b/extensions/webservices/schema/src/nsSchemaSimpleTypes.cpp
index 4217b0714072..03214e79df5e 100644
--- a/extensions/webservices/schema/src/nsSchemaSimpleTypes.cpp
+++ b/extensions/webservices/schema/src/nsSchemaSimpleTypes.cpp
@@ -62,7 +62,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSchemaBuiltinType,
 NS_IMETHODIMP
 nsSchemaBuiltinType::GetTargetNamespace(nsAString& aTargetNamespace)
 {
-  aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SCHEMA_2001_NAMESPACE));
+  aTargetNamespace.AssignLiteral(NS_SCHEMA_2001_NAMESPACE);
   
   return NS_OK;
 }
@@ -87,139 +87,139 @@ nsSchemaBuiltinType::GetName(nsAString& aName)
 {
   switch(mBuiltinType) {
     case BUILTIN_TYPE_ANYTYPE:
-      aName.Assign(NS_LITERAL_STRING("anyType"));
+      aName.AssignLiteral("anyType");
       break;
     case BUILTIN_TYPE_STRING:
-      aName.Assign(NS_LITERAL_STRING("string"));
+      aName.AssignLiteral("string");
       break;
     case BUILTIN_TYPE_NORMALIZED_STRING:
-      aName.Assign(NS_LITERAL_STRING("normalizedString"));
+      aName.AssignLiteral("normalizedString");
       break;
     case BUILTIN_TYPE_TOKEN:
-      aName.Assign(NS_LITERAL_STRING("token"));
+      aName.AssignLiteral("token");
       break;
     case BUILTIN_TYPE_BYTE:
-      aName.Assign(NS_LITERAL_STRING("byte"));
+      aName.AssignLiteral("byte");
       break;
     case BUILTIN_TYPE_UNSIGNEDBYTE:
-      aName.Assign(NS_LITERAL_STRING("unsignedByte"));
+      aName.AssignLiteral("unsignedByte");
       break;
     case BUILTIN_TYPE_BASE64BINARY:
-      aName.Assign(NS_LITERAL_STRING("base64Binary"));
+      aName.AssignLiteral("base64Binary");
       break;
     case BUILTIN_TYPE_HEXBINARY:
-      aName.Assign(NS_LITERAL_STRING("hexBinary"));
+      aName.AssignLiteral("hexBinary");
       break;
     case BUILTIN_TYPE_INTEGER:
-      aName.Assign(NS_LITERAL_STRING("integer"));
+      aName.AssignLiteral("integer");
       break;
     case BUILTIN_TYPE_POSITIVEINTEGER:
-      aName.Assign(NS_LITERAL_STRING("positiveInteger"));
+      aName.AssignLiteral("positiveInteger");
       break;
     case BUILTIN_TYPE_NEGATIVEINTEGER:
-      aName.Assign(NS_LITERAL_STRING("negativeInteger"));
+      aName.AssignLiteral("negativeInteger");
       break;
     case BUILTIN_TYPE_NONNEGATIVEINTEGER:
-      aName.Assign(NS_LITERAL_STRING("nonNegativeInteger"));
+      aName.AssignLiteral("nonNegativeInteger");
       break;
     case BUILTIN_TYPE_NONPOSITIVEINTEGER:
-      aName.Assign(NS_LITERAL_STRING("nonPositiveInteger"));
+      aName.AssignLiteral("nonPositiveInteger");
       break;
     case BUILTIN_TYPE_INT:
-      aName.Assign(NS_LITERAL_STRING("int"));
+      aName.AssignLiteral("int");
       break;
     case BUILTIN_TYPE_UNSIGNEDINT:
-      aName.Assign(NS_LITERAL_STRING("unsignedInt"));
+      aName.AssignLiteral("unsignedInt");
       break;
     case BUILTIN_TYPE_LONG:
-      aName.Assign(NS_LITERAL_STRING("long"));
+      aName.AssignLiteral("long");
       break;
     case BUILTIN_TYPE_UNSIGNEDLONG:
-      aName.Assign(NS_LITERAL_STRING("unsignedLong"));
+      aName.AssignLiteral("unsignedLong");
       break;
     case BUILTIN_TYPE_SHORT:
-      aName.Assign(NS_LITERAL_STRING("short"));
+      aName.AssignLiteral("short");
       break;
     case BUILTIN_TYPE_UNSIGNEDSHORT:
-      aName.Assign(NS_LITERAL_STRING("unsignedShort"));
+      aName.AssignLiteral("unsignedShort");
       break;
     case BUILTIN_TYPE_DECIMAL:
-      aName.Assign(NS_LITERAL_STRING("decimal"));
+      aName.AssignLiteral("decimal");
       break;
     case BUILTIN_TYPE_FLOAT:
-      aName.Assign(NS_LITERAL_STRING("float"));
+      aName.AssignLiteral("float");
       break;
     case BUILTIN_TYPE_DOUBLE:
-      aName.Assign(NS_LITERAL_STRING("double"));
+      aName.AssignLiteral("double");
       break;
     case BUILTIN_TYPE_BOOLEAN:
-      aName.Assign(NS_LITERAL_STRING("boolean"));
+      aName.AssignLiteral("boolean");
       break;
     case BUILTIN_TYPE_TIME:
-      aName.Assign(NS_LITERAL_STRING("time"));
+      aName.AssignLiteral("time");
       break;
     case BUILTIN_TYPE_DATETIME:
-      aName.Assign(NS_LITERAL_STRING("dateTime"));
+      aName.AssignLiteral("dateTime");
       break;
     case BUILTIN_TYPE_DURATION:
-      aName.Assign(NS_LITERAL_STRING("duration"));
+      aName.AssignLiteral("duration");
       break;
     case BUILTIN_TYPE_DATE:
-      aName.Assign(NS_LITERAL_STRING("date"));
+      aName.AssignLiteral("date");
       break;
     case BUILTIN_TYPE_GMONTH:
-      aName.Assign(NS_LITERAL_STRING("gMonth"));
+      aName.AssignLiteral("gMonth");
       break;
     case BUILTIN_TYPE_GYEAR:
-      aName.Assign(NS_LITERAL_STRING("gYear"));
+      aName.AssignLiteral("gYear");
       break;
     case BUILTIN_TYPE_GYEARMONTH:
-      aName.Assign(NS_LITERAL_STRING("gYearMonth"));
+      aName.AssignLiteral("gYearMonth");
       break;
     case BUILTIN_TYPE_GDAY:
-      aName.Assign(NS_LITERAL_STRING("gDay"));
+      aName.AssignLiteral("gDay");
       break;
     case BUILTIN_TYPE_GMONTHDAY:
-      aName.Assign(NS_LITERAL_STRING("gMonthDay"));
+      aName.AssignLiteral("gMonthDay");
       break;
     case BUILTIN_TYPE_NAME:
-      aName.Assign(NS_LITERAL_STRING("name"));
+      aName.AssignLiteral("name");
       break;
     case BUILTIN_TYPE_QNAME:
-      aName.Assign(NS_LITERAL_STRING("QName"));
+      aName.AssignLiteral("QName");
       break;
     case BUILTIN_TYPE_NCNAME:
-      aName.Assign(NS_LITERAL_STRING("NCName"));
+      aName.AssignLiteral("NCName");
       break;
     case BUILTIN_TYPE_ANYURI:
-      aName.Assign(NS_LITERAL_STRING("anyURI"));
+      aName.AssignLiteral("anyURI");
       break;
     case BUILTIN_TYPE_LANGUAGE:
-      aName.Assign(NS_LITERAL_STRING("language"));
+      aName.AssignLiteral("language");
       break;
     case BUILTIN_TYPE_ID:
-      aName.Assign(NS_LITERAL_STRING("ID"));
+      aName.AssignLiteral("ID");
       break;
     case BUILTIN_TYPE_IDREF:
-      aName.Assign(NS_LITERAL_STRING("IDREF"));
+      aName.AssignLiteral("IDREF");
       break;
     case BUILTIN_TYPE_IDREFS:
-      aName.Assign(NS_LITERAL_STRING("IDREFS"));
+      aName.AssignLiteral("IDREFS");
       break;
     case BUILTIN_TYPE_ENTITY:
-      aName.Assign(NS_LITERAL_STRING("ENTITY"));
+      aName.AssignLiteral("ENTITY");
       break;
     case BUILTIN_TYPE_ENTITIES:
-      aName.Assign(NS_LITERAL_STRING("ENTITIES"));
+      aName.AssignLiteral("ENTITIES");
       break;
     case BUILTIN_TYPE_NOTATION:
-      aName.Assign(NS_LITERAL_STRING("NOTATION"));
+      aName.AssignLiteral("NOTATION");
       break;
     case BUILTIN_TYPE_NMTOKEN:
-      aName.Assign(NS_LITERAL_STRING("NMTOKEN"));
+      aName.AssignLiteral("NMTOKEN");
       break;
     case BUILTIN_TYPE_NMTOKENS:
-      aName.Assign(NS_LITERAL_STRING("NMTOKENS"));
+      aName.AssignLiteral("NMTOKENS");
       break;
     default:
       NS_ERROR("Unknown builtin type!");
diff --git a/extensions/webservices/soap/src/nsHTTPSOAPTransport.cpp b/extensions/webservices/soap/src/nsHTTPSOAPTransport.cpp
index d00b9401a3d5..1f3b468bff22 100644
--- a/extensions/webservices/soap/src/nsHTTPSOAPTransport.cpp
+++ b/extensions/webservices/soap/src/nsHTTPSOAPTransport.cpp
@@ -281,7 +281,7 @@ static nsresult GetTransportURI(nsISOAPCall * aCall, nsAString & aURI)
       if (NS_FAILED(rc)) 
         return rc;
       stringType.Append(gSOAPStrings->kQualifiedSeparator);
-      stringType.Append(NS_LITERAL_STRING("anyURI"));
+      stringType.AppendLiteral("anyURI");
     }
 
     //  If it is available, add the sourceURI 
@@ -358,7 +358,7 @@ nsHTTPSOAPTransport::SetupRequest(nsISOAPCall* aCall, PRBool async,
 
     //XXXdoron necko doesn't allow empty header values, so set it to " "
     if (action.IsEmpty())
-      action = NS_LITERAL_STRING(" ");
+      action.AssignLiteral(" ");
 
     rv = request->SetRequestHeader(NS_LITERAL_CSTRING("SOAPAction"),
                                    NS_ConvertUTF16toUTF8(action));
diff --git a/extensions/webservices/soap/src/nsSOAPException.cpp b/extensions/webservices/soap/src/nsSOAPException.cpp
index 740eea7e582e..156c79767bbe 100644
--- a/extensions/webservices/soap/src/nsSOAPException.cpp
+++ b/extensions/webservices/soap/src/nsSOAPException.cpp
@@ -165,13 +165,13 @@ nsSOAPException::ToString(char **_retval)
   NS_ENSURE_ARG_POINTER(_retval);
   nsAutoString s;
   s.Append(mName);
-  s.Append(NS_LITERAL_STRING(": "));
+  s.AppendLiteral(": ");
   s.Append(mMessage);
   if (mFrame) {
     char* str = nsnull;
     mFrame->ToString(&str);
     if (str) {
-      s.Append(NS_LITERAL_STRING(", called by "));
+      s.AppendLiteral(", called by ");
       nsAutoString i;
       CopyASCIItoUCS2(nsDependentCString(str),i);
       nsMemory::Free(str);
@@ -185,7 +185,7 @@ nsSOAPException::ToString(char **_retval)
       nsAutoString i;
       CopyASCIItoUCS2(nsDependentCString(str),i);
       nsMemory::Free(str);
-      s.Append(NS_LITERAL_STRING(", caused by "));
+      s.AppendLiteral(", caused by ");
       s.Append(i);
     }
   }
diff --git a/extensions/webservices/wsdl/src/nsWSDLDefinitions.cpp b/extensions/webservices/wsdl/src/nsWSDLDefinitions.cpp
index 05e3cd634fc4..b9ddfa8326f5 100644
--- a/extensions/webservices/wsdl/src/nsWSDLDefinitions.cpp
+++ b/extensions/webservices/wsdl/src/nsWSDLDefinitions.cpp
@@ -190,7 +190,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPPortBinding, nsIWSDLBinding, nsIWSDLSOAPBinding,
 NS_IMETHODIMP
 nsSOAPPortBinding::GetProtocol(nsAString& aProtocol)
 {
-  aProtocol.Assign(NS_LITERAL_STRING("soap"));
+  aProtocol.AssignLiteral("soap");
 
   return NS_OK;
 }
@@ -501,7 +501,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPOperationBinding, nsIWSDLBinding,
 NS_IMETHODIMP
 nsSOAPOperationBinding::GetProtocol(nsAString& aProtocol)
 {
-  aProtocol.Assign(NS_LITERAL_STRING("soap"));
+  aProtocol.AssignLiteral("soap");
 
   return NS_OK;
 }
@@ -710,7 +710,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPMessageBinding, nsIWSDLBinding, nsIWSDLSOAPBinding,
 NS_IMETHODIMP
 nsSOAPMessageBinding::GetProtocol(nsAString& aProtocol)
 {
-  aProtocol.Assign(NS_LITERAL_STRING("soap"));
+  aProtocol.AssignLiteral("soap");
 
   return NS_OK;
 }
@@ -844,7 +844,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPPartBinding, nsIWSDLBinding, nsIWSDLSOAPBinding,
 NS_IMETHODIMP
 nsSOAPPartBinding::GetProtocol(nsAString& aProtocol)
 {
-  aProtocol.Assign(NS_LITERAL_STRING("soap"));
+  aProtocol.AssignLiteral("soap");
 
   return NS_OK;
 }
diff --git a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
index 42dbd911fb7e..cada54d9625f 100644
--- a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
+++ b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp
@@ -500,7 +500,7 @@ nsXMLHttpRequest::ConvertBodyToText(nsAString& aOutBuffer)
   } else {
     if (NS_FAILED(DetectCharset(dataCharset)) || dataCharset.IsEmpty()) {
       // MS documentation states UTF-8 is default for responseText
-      dataCharset.Assign(NS_LITERAL_CSTRING("UTF-8"));
+      dataCharset.AssignLiteral("UTF-8");
     }
   }
 
diff --git a/extensions/xmlextras/ls/src/nsLSEvent.cpp b/extensions/xmlextras/ls/src/nsLSEvent.cpp
index aa41b0eba795..b7298cd06810 100755
--- a/extensions/xmlextras/ls/src/nsLSEvent.cpp
+++ b/extensions/xmlextras/ls/src/nsLSEvent.cpp
@@ -155,7 +155,7 @@ nsLSParserLoadEvent::GetTargetInternal(nsIDOMEventTarget **aTarget)
 nsresult
 nsLSParserLoadEvent::GetTypeInternal(nsAString& aType)
 {
-  aType = NS_LITERAL_STRING("ls-load");
+  aType.AssignLiteral("ls-load");
 
   return NS_OK;
 }
diff --git a/extensions/xmlterm/base/mozXMLTermListeners.cpp b/extensions/xmlterm/base/mozXMLTermListeners.cpp
index d2dbd52455c4..56e626398d51 100644
--- a/extensions/xmlterm/base/mozXMLTermListeners.cpp
+++ b/extensions/xmlterm/base/mozXMLTermListeners.cpp
@@ -346,43 +346,43 @@ mozXMLTermKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
         keyChar = U_ESCAPE;
         break;
       case nsIDOMKeyEvent::DOM_VK_HOME:
-        JSCommand.Assign(NS_LITERAL_STRING("ScrollHomeKey"));
+        JSCommand.AssignLiteral("ScrollHomeKey");
         break;
       case nsIDOMKeyEvent::DOM_VK_END:
-        JSCommand.Assign(NS_LITERAL_STRING("ScrollEndKey"));
+        JSCommand.AssignLiteral("ScrollEndKey");
         break;
       case nsIDOMKeyEvent::DOM_VK_PAGE_UP:
-        JSCommand.Assign(NS_LITERAL_STRING("ScrollPageUpKey"));
+        JSCommand.AssignLiteral("ScrollPageUpKey");
         break;
       case nsIDOMKeyEvent::DOM_VK_PAGE_DOWN:
-        JSCommand.Assign(NS_LITERAL_STRING("ScrollPageDownKey"));
+        JSCommand.AssignLiteral("ScrollPageDownKey");
         break;
       case nsIDOMKeyEvent::DOM_VK_F1:
-        JSCommand.Assign(NS_LITERAL_STRING("F1Key"));
+        JSCommand.AssignLiteral("F1Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F2:
-        JSCommand.Assign(NS_LITERAL_STRING("F2Key"));
+        JSCommand.AssignLiteral("F2Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F3:
-        JSCommand.Assign(NS_LITERAL_STRING("F3Key"));
+        JSCommand.AssignLiteral("F3Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F4:
-        JSCommand.Assign(NS_LITERAL_STRING("F4Key"));
+        JSCommand.AssignLiteral("F4Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F5:
-        JSCommand.Assign(NS_LITERAL_STRING("F5Key"));
+        JSCommand.AssignLiteral("F5Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F6:
-        JSCommand.Assign(NS_LITERAL_STRING("F6Key"));
+        JSCommand.AssignLiteral("F6Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F7:
-        JSCommand.Assign(NS_LITERAL_STRING("F7Key"));
+        JSCommand.AssignLiteral("F7Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F8:
-        JSCommand.Assign(NS_LITERAL_STRING("F8Key"));
+        JSCommand.AssignLiteral("F8Key");
         break;
       case nsIDOMKeyEvent::DOM_VK_F9:
-        JSCommand.Assign(NS_LITERAL_STRING("F9Key"));
+        JSCommand.AssignLiteral("F9Key");
         break;
       default: 
         if ( (ctrlKey && (keyCode ==nsIDOMKeyEvent::DOM_VK_SPACE)) ||
@@ -414,9 +414,9 @@ mozXMLTermKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
       if (NS_SUCCEEDED(result) && domDocument) {
         nsAutoString JSInput = JSCommand;
         nsAutoString JSOutput; JSOutput.SetLength(0);
-        JSInput.Append(NS_LITERAL_STRING("("));
+        JSInput.AppendLiteral("(");
         JSInput.AppendInt(shiftKey,10);
-        JSInput.Append(NS_LITERAL_STRING(","));
+        JSInput.AppendLiteral(",");
         JSInput.AppendInt(ctrlKey,10);
         JSInput.Append(NS_LITERAL_STRING(");"));
         result = mozXMLTermUtils::ExecuteScript(domDocument,
diff --git a/extensions/xmlterm/base/mozXMLTermSession.cpp b/extensions/xmlterm/base/mozXMLTermSession.cpp
index 23efa2d93b6a..f85ed55cd28b 100644
--- a/extensions/xmlterm/base/mozXMLTermSession.cpp
+++ b/extensions/xmlterm/base/mozXMLTermSession.cpp
@@ -236,7 +236,7 @@ NS_IMETHODIMP mozXMLTermSession::Init(mozIXMLTerminal* aXMLTerminal,
   // Locate document body node
   nsCOMPtr nodeList;
   nsAutoString bodyTag;
-  bodyTag.Assign(NS_LITERAL_STRING("body"));
+  bodyTag.AssignLiteral("body");
   result = vDOMHTMLDocument->GetElementsByTagName(bodyTag,
                                                   getter_AddRefs(nodeList));
   if (NS_FAILED(result) || !nodeList)
@@ -487,7 +487,7 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
     result = lineTermAux->ReadAux(&opcodes, &opvals, &buf_row, &buf_col,
                                   &buf_str, &buf_style);
     if (NS_FAILED(result)) {
-      abortCode.Assign(NS_LITERAL_STRING("lineTermReadAux"));
+      abortCode.AssignLiteral("lineTermReadAux");
       break;
     }
 
@@ -594,7 +594,7 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
 
         if (streamIsSecure) {
           // Secure stream, i.e., prefixed with cookie; fragments allowed
-          streamURL.Assign(NS_LITERAL_STRING("chrome://xmlterm/content/xmltblank.html"));
+          streamURL.AssignLiteral("chrome://xmlterm/content/xmltblank.html");
 
           if (opcodes & LTERM_JSSTREAM_CODE) {
             // Javascript stream 
@@ -607,7 +607,7 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
 
         } else {
           // Insecure stream; do not display
-          streamURL.Assign(NS_LITERAL_STRING("http://in.sec.ure"));
+          streamURL.AssignLiteral("http://in.sec.ure");
           streamMarkupType = INSECURE_FRAGMENT;
         }
 
@@ -937,7 +937,7 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
             {
               // Construct Javascript command to handle default meta command
               nsAutoString JSCommand;
-	      JSCommand.Assign(NS_LITERAL_STRING("MetaDefault(\""));
+	      JSCommand.AssignLiteral("MetaDefault(\"");
               JSCommand.Append(commandArgs);
               JSCommand.Append(NS_LITERAL_STRING("\");"));
 
@@ -960,16 +960,16 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
             {
               // Display URL using IFRAME
               nsAutoString url;
-	      url.Assign(NS_LITERAL_STRING("http:"));
+	      url.AssignLiteral("http:");
               url.Append(commandArgs);
               nsAutoString width;
-	      width.Assign(NS_LITERAL_STRING("100%"));
+	      width.AssignLiteral("100%");
               nsAutoString height;
-	      height.Assign(NS_LITERAL_STRING("100"));
+	      height.AssignLiteral("100");
               result = NewIFrame(mOutputBlockNode, mCurrentEntryNumber,
                                  2, url, width, height);
               if (NS_FAILED(result))
-                metaCommandOutput.Assign(NS_LITERAL_STRING("Error in displaying URL\n"));
+                metaCommandOutput.AssignLiteral("Error in displaying URL\n");
 
             }
             break;
@@ -1003,12 +1003,12 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux,
               lsCommand.SetLength(0);
 
               if (!commandArgs.IsEmpty()) {
-                lsCommand.Append(NS_LITERAL_STRING("cd "));
+                lsCommand.AppendLiteral("cd ");
                 lsCommand.Append(commandArgs);
-                lsCommand.Append(NS_LITERAL_STRING(";"));
+                lsCommand.AppendLiteral(";");
               }
 
-              lsCommand.Append(NS_LITERAL_STRING("ls -dF `pwd`/*\n"));
+              lsCommand.AppendLiteral("ls -dF `pwd`/*\n");
 
               //mXMLTerminal->SendText(lsCommand);
 
@@ -1439,7 +1439,7 @@ NS_IMETHODIMP mozXMLTermSession::AutoDetectMarkup(const nsString& aString,
   if (str.First() == U_LESSTHAN) {
     // Markup tag detected
     str.CompressWhitespace();
-    str.Append(NS_LITERAL_STRING(" "));
+    str.AppendLiteral(" ");
 
     if ( (str.Find("Write(str.get());
         if (NS_FAILED(result)) {
@@ -1858,9 +1858,9 @@ NS_IMETHODIMP mozXMLTermSession::LimitOutputLines(PRBool deleteAllOld)
     firstChild = divNode;
 
     nsAutoString warningMsg;
-    warningMsg.Assign(NS_LITERAL_STRING("XMLTerm: *WARNING* Command output truncated to "));
+    warningMsg.AssignLiteral("XMLTerm: *WARNING* Command output truncated to ");
     warningMsg.AppendInt(300,10);
-    warningMsg.Append(NS_LITERAL_STRING(" lines"));
+    warningMsg.AppendLiteral(" lines");
     result = SetDOMText(textNode, warningMsg);
   }
 
@@ -2157,7 +2157,7 @@ NS_IMETHODIMP mozXMLTermSession::AppendOutput(const nsString& aString,
       currentStyle = strStyle[0];
 
     mOutputTextOffset = 0;
-    tagName.Assign(NS_LITERAL_STRING("pre"));
+    tagName.AssignLiteral("pre");
 
     PR_ASSERT(strLength > 0);
 
@@ -2348,26 +2348,26 @@ NS_IMETHODIMP mozXMLTermSession::AppendLineLS(const nsString& aString,
     aString.Mid(pathname, wordBegin, wordEnd-wordBegin+1-dropSuffix);
 
     // Append to markup string
-    markupString.Assign(NS_LITERAL_STRING(""));
+    markupString.AssignLiteral(">");
     markupString.Assign(filename);
-    markupString.Assign(NS_LITERAL_STRING(""));
+    markupString.AssignLiteral("");
 
     // Search for new word
     wordBegin = wordEnd+1;
@@ -2685,7 +2685,7 @@ NS_IMETHODIMP mozXMLTermSession::DeepSanitizeFragment(
     tagName.SetLength(0);
     result = domElement->GetTagName(tagName);
 
-    if (NS_SUCCEEDED(result) && tagName.EqualsIgnoreCase("script")) {
+    if (NS_SUCCEEDED(result) && tagName.LowerCaseEqualsLiteral("script")) {
       // Remove script element and return
 
       XMLT_WARNING("mozXMLTermSession::DeepSanitizeFragment: Warning - rejected SCRIPT element in inserted HTML fragment\n");
@@ -2710,7 +2710,7 @@ NS_IMETHODIMP mozXMLTermSession::DeepSanitizeFragment(
     nsAutoString attName, attValue;
 
     for (j=0; j= 0) {
       // Process ID attribute
-      attName.Assign(NS_LITERAL_STRING("id"));
+      attName.AssignLiteral("id");
 
       attValue.SetLength(0);
       result = domElement->GetAttribute(attName, attValue);
@@ -2787,7 +2787,7 @@ NS_IMETHODIMP mozXMLTermSession::DeepSanitizeFragment(
 
     for (j=0; j entryNode;
-  tagName.Assign(NS_LITERAL_STRING("div"));
+  tagName.AssignLiteral("div");
   name.AssignWithConversion(sessionElementNames[ENTRY_ELEMENT]);
   result = NewElement(tagName, name, mCurrentEntryNumber,
                       mSessionNode, entryNode);
@@ -3322,7 +3322,7 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
 
   // Create "input" element containing "prompt" and "command" elements
   nsCOMPtr inputNode;
-  tagName.Assign(NS_LITERAL_STRING("div"));
+  tagName.AssignLiteral("div");
   name.AssignWithConversion(sessionElementNames[INPUT_ELEMENT]);
   result = NewElement(tagName, name, mCurrentEntryNumber,
                       mCurrentEntryNode, inputNode);
@@ -3334,7 +3334,7 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
 
   // Create prompt element
   nsCOMPtr promptSpanNode;
-  tagName.Assign(NS_LITERAL_STRING("span"));
+  tagName.AssignLiteral("span");
   name.AssignWithConversion(sessionElementNames[PROMPT_ELEMENT]);
   result = NewElement(tagName, name, mCurrentEntryNumber,
                       inputNode, promptSpanNode);
@@ -3360,8 +3360,8 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
     // Create text node + image node as child of prompt element
     nsCOMPtr spanNode, textNode;
 
-    tagName.Assign(NS_LITERAL_STRING("span"));
-    name.Assign(NS_LITERAL_STRING("noicons"));
+    tagName.AssignLiteral("span");
+    name.AssignLiteral("noicons");
     result = NewElementWithText(tagName, name, -1,
                                 promptSpanNode, spanNode, textNode);
     if (NS_FAILED(result) || !spanNode || !textNode) {
@@ -3383,7 +3383,7 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
       return NS_ERROR_FAILURE;
 
     // Create IMG element
-    tagName.Assign(NS_LITERAL_STRING("img"));
+    tagName.AssignLiteral("img");
     nsCOMPtr imgElement;
     result = domDoc->CreateElement(tagName, getter_AddRefs(imgElement));
     if (NS_FAILED(result) || !imgElement)
@@ -3394,12 +3394,12 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
     nsAutoString attValue(NS_LITERAL_STRING("icons"));
     imgElement->SetAttribute(attName, attValue);
 
-    attName.Assign(NS_LITERAL_STRING("src"));
-    attValue.Assign(NS_LITERAL_STRING("chrome://xmlterm/skin/wheel.gif"));
+    attName.AssignLiteral("src");
+    attValue.AssignLiteral("chrome://xmlterm/skin/wheel.gif");
     imgElement->SetAttribute(attName, attValue);
 
-    attName.Assign(NS_LITERAL_STRING("align"));
-    attValue.Assign(NS_LITERAL_STRING("middle"));
+    attName.AssignLiteral("align");
+    attValue.AssignLiteral("middle");
     imgElement->SetAttribute(attName, attValue);
 
     // Append IMG element
@@ -3445,7 +3445,7 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
 
   // Create command element
   nsCOMPtr newCommandSpanNode;
-  tagName.Assign(NS_LITERAL_STRING("span"));
+  tagName.AssignLiteral("span");
   name.AssignWithConversion(sessionElementNames[COMMAND_ELEMENT]);
   result = NewElement(tagName, name, mCurrentEntryNumber,
                       inputNode, newCommandSpanNode);
@@ -3466,7 +3466,7 @@ NS_IMETHODIMP mozXMLTermSession::NewEntry(const nsString& aPrompt)
 
   // Create output element and append as child of current entry element
   nsCOMPtr divNode;
-  tagName.Assign(NS_LITERAL_STRING("div"));
+  tagName.AssignLiteral("div");
   name.AssignWithConversion(sessionElementNames[OUTPUT_ELEMENT]);
   result = NewElement(tagName, name, mCurrentEntryNumber,
                       mCurrentEntryNode, divNode);
@@ -3719,8 +3719,8 @@ NS_IMETHODIMP mozXMLTermSession::NewRow(nsIDOMNode* beforeRowNode,
   val.AppendInt(mScreenCols,10);
   preElement->SetAttribute(att, val);
 
-  att.Assign(NS_LITERAL_STRING("rows"));
-  val.Assign(NS_LITERAL_STRING("1"));
+  att.AssignLiteral("rows");
+  val.AssignLiteral("1");
   preElement->SetAttribute(att, val);
 
   if (beforeRowNode) {
@@ -3849,19 +3849,19 @@ NS_IMETHODIMP mozXMLTermSession::DisplayRow(const nsString& aString,
 
         switch (currentStyle) {
         case LTERM_STDOUT_STYLE | LTERM_BOLD_STYLE:
-          elementName.Assign(NS_LITERAL_STRING("boldstyle"));
+          elementName.AssignLiteral("boldstyle");
           break;
         case LTERM_STDOUT_STYLE | LTERM_ULINE_STYLE:
-          elementName.Assign(NS_LITERAL_STRING("underlinestyle"));
+          elementName.AssignLiteral("underlinestyle");
           break;
         case LTERM_STDOUT_STYLE | LTERM_BLINK_STYLE:
-          elementName.Assign(NS_LITERAL_STRING("blinkstyle"));
+          elementName.AssignLiteral("blinkstyle");
           break;
         case LTERM_STDOUT_STYLE | LTERM_INVERSE_STYLE:
-          elementName.Assign(NS_LITERAL_STRING("inversestyle"));
+          elementName.AssignLiteral("inversestyle");
           break;
         default:
-          elementName.Assign(NS_LITERAL_STRING("boldstyle"));
+          elementName.AssignLiteral("boldstyle");
           break;
         }
 
@@ -4172,32 +4172,32 @@ NS_IMETHODIMP mozXMLTermSession::NewIFrame(nsIDOMNode* parentNode,
 
   // Set attributes
   if (number >= 0) {
-    attName.Assign(NS_LITERAL_STRING("name"));
-    attValue.Assign(NS_LITERAL_STRING("iframe"));
+    attName.AssignLiteral("name");
+    attValue.AssignLiteral("iframe");
     attValue.AppendInt(number,10);
     newElement->SetAttribute(attName, attValue);
   }
 
-  attName.Assign(NS_LITERAL_STRING("frameborder"));
+  attName.AssignLiteral("frameborder");
   attValue.SetLength(0);
   attValue.AppendInt(frameBorder,10);
   newElement->SetAttribute(attName, attValue);
 
   if (!src.IsEmpty()) {
     // Set SRC attribute
-    attName.Assign(NS_LITERAL_STRING("src"));
+    attName.AssignLiteral("src");
     newElement->SetAttribute(attName, src);
   }
 
   if (!width.IsEmpty()) {
     // Set WIDTH attribute
-    attName.Assign(NS_LITERAL_STRING("width"));
+    attName.AssignLiteral("width");
     newElement->SetAttribute(attName, width);
   }
 
   if (!height.IsEmpty()) {
     // Set HEIGHT attribute
-    attName.Assign(NS_LITERAL_STRING("height"));
+    attName.AssignLiteral("height");
     newElement->SetAttribute(attName, height);
   }
 
@@ -4235,9 +4235,9 @@ NS_IMETHODIMP mozXMLTermSession::SetEventAttributes(const nsString& name,
 
     nsAutoString attValue(NS_LITERAL_STRING("return HandleEvent(event, '"));
     attValue.AppendWithConversion(sessionEventNames[j]);
-    attValue.Append(NS_LITERAL_STRING("','"));
+    attValue.AppendLiteral("','");
     attValue.Append(name);
-    attValue.Append(NS_LITERAL_STRING("','"));
+    attValue.AppendLiteral("','");
     attValue.AppendInt(number,10);
     attValue.Append(NS_LITERAL_STRING("','');"));
 
@@ -4313,8 +4313,8 @@ PRBool mozXMLTermSession::IsPREInlineNode(nsIDOMNode* aNode)
       nsAutoString tagName; tagName.SetLength(0);
       result = domElement->GetTagName(tagName);
       if (NS_SUCCEEDED(result)) {
-        isPREInlineNode = tagName.EqualsIgnoreCase("span") ||
-                          tagName.EqualsIgnoreCase("a");
+        isPREInlineNode = tagName.LowerCaseEqualsLiteral("span") ||
+                          tagName.LowerCaseEqualsLiteral("a");
       }
     }
   }
@@ -4344,7 +4344,7 @@ NS_IMETHODIMP mozXMLTermSession::ToHTMLString(nsIDOMNode* aNode,
   XMLT_LOG(mozXMLTermSession::ToHTMLString,80,("\n"));
 
   nsAutoString newIndentString (indentString);
-  newIndentString.Append(NS_LITERAL_STRING("  "));
+  newIndentString.AppendLiteral("  ");
 
   htmlString.SetLength(0);
 
@@ -4365,10 +4365,10 @@ NS_IMETHODIMP mozXMLTermSession::ToHTMLString(nsIDOMNode* aNode,
       if (!insidePRENode) {
         htmlString += indentString;
       }
-      htmlString.Append(NS_LITERAL_STRING("<"));
+      htmlString.AppendLiteral("<");
       htmlString += tagName;
 
-      PRBool isPRENode = tagName.EqualsIgnoreCase("pre");
+      PRBool isPRENode = tagName.LowerCaseEqualsLiteral("pre");
 
       nsCOMPtr namedNodeMap(nsnull);
       result = aNode->GetAttributes(getter_AddRefs(namedNodeMap));
@@ -4393,15 +4393,15 @@ NS_IMETHODIMP mozXMLTermSession::ToHTMLString(nsIDOMNode* aNode,
 
                 result = attr->GetName(attrName);
                 if (NS_SUCCEEDED(result)) {
-                  htmlString.Append(NS_LITERAL_STRING(" "));
+                  htmlString.AppendLiteral(" ");
                   htmlString.Append(attrName);
                 }
 
                 result = attr->GetValue(attrValue);
                 if (NS_SUCCEEDED(result) && !attrName.IsEmpty()) {
-                  htmlString.Append(NS_LITERAL_STRING("=\""));
+                  htmlString.AppendLiteral("=\"");
                   htmlString.Append(attrValue);
-                  htmlString.Append(NS_LITERAL_STRING("\""));
+                  htmlString.AppendLiteral("\"");
                 }
               }
             }
@@ -4410,7 +4410,7 @@ NS_IMETHODIMP mozXMLTermSession::ToHTMLString(nsIDOMNode* aNode,
       }
 
       if (!deepContent) {
-        htmlString.Append(NS_LITERAL_STRING(">"));
+        htmlString.AppendLiteral(">");
 
       } else {
         // Iterate over all child nodes to generate deep content
@@ -4433,27 +4433,27 @@ NS_IMETHODIMP mozXMLTermSession::ToHTMLString(nsIDOMNode* aNode,
 
         if (!htmlInner.IsEmpty()) {
           if (insidePRENode)
-            htmlString.Append(NS_LITERAL_STRING("\n>"));
+            htmlString.AppendLiteral("\n>");
           else
-            htmlString.Append(NS_LITERAL_STRING(">\n"));
+            htmlString.AppendLiteral(">\n");
 
           htmlString += htmlInner;
 
           if (!insidePRENode)
             htmlString += indentString;
         } else {
-          htmlString.Append(NS_LITERAL_STRING(">"));
+          htmlString.AppendLiteral(">");
         }
 
-        htmlString.Append(NS_LITERAL_STRING(""));
+          htmlString.AppendLiteral("\n");
+        htmlString.AppendLiteral(">");
 
         if (!insidePRENode)
-          htmlString.Append(NS_LITERAL_STRING("\n"));
+          htmlString.AppendLiteral("\n");
       }
     }
   }
diff --git a/extensions/xmlterm/base/mozXMLTermStream.cpp b/extensions/xmlterm/base/mozXMLTermStream.cpp
index 31879819335d..649b2dad4e5b 100644
--- a/extensions/xmlterm/base/mozXMLTermStream.cpp
+++ b/extensions/xmlterm/base/mozXMLTermStream.cpp
@@ -165,7 +165,7 @@ NS_IMETHODIMP mozXMLTermStream::Open(nsIDOMWindowInternal* aDOMWindow,
     if (NS_FAILED(result))
       return NS_ERROR_FAILURE;
 
-    if (!tagName.EqualsIgnoreCase("iframe"))
+    if (!tagName.LowerCaseEqualsLiteral("iframe"))
       return NS_ERROR_FAILURE;
 
     if (mMaxResizeHeight > 0) {
diff --git a/extensions/xmlterm/base/mozXMLTerminal.cpp b/extensions/xmlterm/base/mozXMLTerminal.cpp
index b0608dc1cb1b..a0c97b8e2523 100644
--- a/extensions/xmlterm/base/mozXMLTerminal.cpp
+++ b/extensions/xmlterm/base/mozXMLTerminal.cpp
@@ -686,7 +686,7 @@ NS_IMETHODIMP mozXMLTerminal::SendText(const PRUnichar* aString,
     if (NS_FAILED(result)) {
       // Abort XMLterm session
       nsAutoString abortCode;
-      abortCode.Assign(NS_LITERAL_STRING("SendText"));
+      abortCode.AssignLiteral("SendText");
       mXMLTermSession->Abort(mLineTermAux, abortCode);
       return NS_ERROR_FAILURE;
     }
diff --git a/gfx/src/gtk/nsFontMetricsXft.cpp b/gfx/src/gtk/nsFontMetricsXft.cpp
index 4f22328ea601..adc2a52de4d6 100644
--- a/gfx/src/gtk/nsFontMetricsXft.cpp
+++ b/gfx/src/gtk/nsFontMetricsXft.cpp
@@ -2680,9 +2680,9 @@ GetEncoding(const char *aFontName, char **aEncoding, nsXftFontType &aType,
           
             if (NS_FAILED(rv)) 
                 aFTEncoding = ft_encoding_none;
-            else if (ftCharMap.EqualsIgnoreCase("mac_roman"))
+            else if (ftCharMap.LowerCaseEqualsLiteral("mac_roman"))
                 aFTEncoding = ft_encoding_apple_roman;
-            else if (ftCharMap.EqualsIgnoreCase("unicode"))
+            else if (ftCharMap.LowerCaseEqualsLiteral("unicode"))
                 aFTEncoding = ft_encoding_unicode;
         }
 
diff --git a/gfx/src/gtk/nsNativeThemeGTK.cpp b/gfx/src/gtk/nsNativeThemeGTK.cpp
index 730cd8dc8356..f3003a735383 100644
--- a/gfx/src/gtk/nsNativeThemeGTK.cpp
+++ b/gfx/src/gtk/nsNativeThemeGTK.cpp
@@ -171,7 +171,7 @@ static PRBool CheckBooleanAttr(nsIFrame* aFrame, nsIAtom* aAtom)
   if (res == NS_CONTENT_ATTR_NO_VALUE ||
       (res != NS_CONTENT_ATTR_NOT_THERE && attr.IsEmpty()))
     return PR_TRUE; // This handles the HTML case (an attr with no value is like a true val)
-  return attr.EqualsIgnoreCase("true"); // This handles the XUL case.
+  return attr.LowerCaseEqualsLiteral("true"); // This handles the XUL case.
 }
 
 static PRInt32 CheckIntegerAttr(nsIFrame *aFrame, nsIAtom *aAtom)
diff --git a/gfx/src/mac/nsDeviceContextMac.cpp b/gfx/src/mac/nsDeviceContextMac.cpp
index 5cad0da0ba60..41981d93d963 100644
--- a/gfx/src/mac/nsDeviceContextMac.cpp
+++ b/gfx/src/mac/nsDeviceContextMac.cpp
@@ -283,7 +283,7 @@ NS_IMETHODIMP nsDeviceContextMac :: GetSystemFont(nsSystemFontID aID, nsFont *aF
       if (aID == eSystemFont_Window ||
           aID == eSystemFont_Document ||
           aID == eSystemFont_PullDownMenu) {
-            aFont->name.Assign(NS_LITERAL_STRING("sans-serif"));
+            aFont->name.AssignLiteral("sans-serif");
             aFont->size = NSToCoordRound(aFont->size * 0.875f); // quick hack
       }
       else if (HasAppearanceManager())
@@ -388,7 +388,7 @@ NS_IMETHODIMP nsDeviceContextMac :: GetSystemFont(nsSystemFontID aID, nsFont *aF
       }
       else
       {
-        aFont->name.Assign(NS_LITERAL_STRING("geneva"));
+        aFont->name.AssignLiteral("geneva");
       }
       break;
 
@@ -967,15 +967,15 @@ nsresult nsDeviceContextMac::CreateFontAliasTable()
     mFontAliasTable = new nsHashtable();
     if (nsnull != mFontAliasTable)
     {
-			nsAutoString  fontTimes;              fontTimes.Assign(NS_LITERAL_STRING("Times"));
-			nsAutoString  fontTimesNewRoman;      fontTimesNewRoman.Assign(NS_LITERAL_STRING("Times New Roman"));
-			nsAutoString  fontTimesRoman;         fontTimesRoman.Assign(NS_LITERAL_STRING("Times Roman"));
-			nsAutoString  fontArial;              fontArial.Assign(NS_LITERAL_STRING("Arial"));
-			nsAutoString  fontHelvetica;          fontHelvetica.Assign(NS_LITERAL_STRING("Helvetica"));
-			nsAutoString  fontCourier;            fontCourier.Assign(NS_LITERAL_STRING("Courier"));
-			nsAutoString  fontCourierNew;         fontCourierNew.Assign(NS_LITERAL_STRING("Courier New"));
-			nsAutoString  fontUnicode;            fontUnicode.Assign(NS_LITERAL_STRING("Unicode"));
-			nsAutoString  fontBitstreamCyberbit;  fontBitstreamCyberbit.Assign(NS_LITERAL_STRING("Bitstream Cyberbit"));
+			nsAutoString  fontTimes;              fontTimes.AssignLiteral("Times");
+			nsAutoString  fontTimesNewRoman;      fontTimesNewRoman.AssignLiteral("Times New Roman");
+			nsAutoString  fontTimesRoman;         fontTimesRoman.AssignLiteral("Times Roman");
+			nsAutoString  fontArial;              fontArial.AssignLiteral("Arial");
+			nsAutoString  fontHelvetica;          fontHelvetica.AssignLiteral("Helvetica");
+			nsAutoString  fontCourier;            fontCourier.AssignLiteral("Courier");
+			nsAutoString  fontCourierNew;         fontCourierNew.AssignLiteral("Courier New");
+			nsAutoString  fontUnicode;            fontUnicode.AssignLiteral("Unicode");
+			nsAutoString  fontBitstreamCyberbit;  fontBitstreamCyberbit.AssignLiteral("Bitstream Cyberbit");
 			nsAutoString  fontNullStr;
 
       AliasFont(fontTimes, fontTimesNewRoman, fontTimesRoman, PR_FALSE);
diff --git a/gfx/src/mac/nsFontMetricsMac.cpp b/gfx/src/mac/nsFontMetricsMac.cpp
index cb260f8eb0b8..89adf410a727 100644
--- a/gfx/src/mac/nsFontMetricsMac.cpp
+++ b/gfx/src/mac/nsFontMetricsMac.cpp
@@ -132,7 +132,7 @@ nsUnicodeFontMappingMac* nsFontMetricsMac::GetUnicodeFontMapping()
   	if (mLangGroup)
   		mLangGroup->ToString(langGroup);
     else
-      langGroup.Assign(NS_LITERAL_STRING("ja"));
+      langGroup.AssignLiteral("ja");
       
   	nsString lang;
     mFontMapping = new nsUnicodeFontMappingMac(mFont, mContext, langGroup, lang);
@@ -159,33 +159,33 @@ static void MapGenericFamilyToFont(const nsString& aGenericFamily, nsString& aFo
   }
   
   NS_ASSERTION(0, "Failed to find a font");
-  aFontFace.Assign(NS_LITERAL_STRING("Times"));
+  aFontFace.AssignLiteral("Times");
 	
   /*
   // fall back onto hard-coded font names
-  if (aGenericFamily.EqualsIgnoreCase("serif"))
+  if (aGenericFamily.LowerCaseEqualsLiteral("serif"))
   {
-    aFontFace.Assign(NS_LITERAL_STRING("Times"));
+    aFontFace.AssignLiteral("Times");
   }
-  else if (aGenericFamily.EqualsIgnoreCase("sans-serif"))
+  else if (aGenericFamily.LowerCaseEqualsLiteral("sans-serif"))
   {
-    aFontFace.Assign(NS_LITERAL_STRING("Helvetica"));
+    aFontFace.AssignLiteral("Helvetica");
   }
-  else if (aGenericFamily.EqualsIgnoreCase("cursive"))
+  else if (aGenericFamily.LowerCaseEqualsLiteral("cursive"))
   {
-     aFontFace.Assign(NS_LITERAL_STRING("Apple Chancery"));
+     aFontFace.AssignLiteral("Apple Chancery");
   }
-  else if (aGenericFamily.EqualsIgnoreCase("fantasy"))
+  else if (aGenericFamily.LowerCaseEqualsLiteral("fantasy"))
   {
-    aFontFace.Assign(NS_LITERAL_STRING("Gadget"));
+    aFontFace.AssignLiteral("Gadget");
   }
-  else if (aGenericFamily.EqualsIgnoreCase("monospace"))
+  else if (aGenericFamily.LowerCaseEqualsLiteral("monospace"))
   {
-    aFontFace.Assign(NS_LITERAL_STRING("Courier"));
+    aFontFace.AssignLiteral("Courier");
   }
-  else if (aGenericFamily.EqualsIgnoreCase("-moz-fixed"))
+  else if (aGenericFamily.LowerCaseEqualsLiteral("-moz-fixed"))
   {
-    aFontFace.Assign(NS_LITERAL_STRING("Courier"));
+    aFontFace.AssignLiteral("Courier");
   }
   */
 }
@@ -237,7 +237,7 @@ void nsFontMetricsMac::RealizeFont()
 		if (mLangGroup)
 			mLangGroup->ToString(theLangGroupString);
 		else
-			theLangGroupString.Assign(NS_LITERAL_STRING("ja"));
+			theLangGroupString.AssignLiteral("ja");
 
 		theScriptCode = unicodeMappingUtil->MapLangGroupToScriptCode(
 		    NS_ConvertUCS2toUTF8(theLangGroupString).get());
diff --git a/gfx/src/mac/nsUnicodeFontMappingMac.cpp b/gfx/src/mac/nsUnicodeFontMappingMac.cpp
index 5f069bd83d4b..80e0ebe41772 100644
--- a/gfx/src/mac/nsUnicodeFontMappingMac.cpp
+++ b/gfx/src/mac/nsUnicodeFontMappingMac.cpp
@@ -410,19 +410,19 @@ void nsUnicodeFontMappingMac::InitByLangGroup(const nsString& aLangGroup)
 	// do not countinue if there are no difference to look at the document Charset
 	if( ScriptMapInitComplete() )
 		return;
-	if(gUtil->ScriptEnabled(smRoman) && aLangGroup.EqualsIgnoreCase("x-western"))
+	if(gUtil->ScriptEnabled(smRoman) && aLangGroup.LowerCaseEqualsLiteral("x-western"))
   	{
 		FillVarBlockToScript(smRoman, mPrivBlockToScript);		
-  	} else if(gUtil->ScriptEnabled(smSimpChinese) && aLangGroup.EqualsIgnoreCase("zh-CN"))
+  	} else if(gUtil->ScriptEnabled(smSimpChinese) && aLangGroup.LowerCaseEqualsLiteral("zh-cn"))
   	{
 		FillVarBlockToScript(smSimpChinese, mPrivBlockToScript);
-  	} else if(gUtil->ScriptEnabled(smKorean) && aLangGroup.EqualsIgnoreCase("ko"))
+  	} else if(gUtil->ScriptEnabled(smKorean) && aLangGroup.LowerCaseEqualsLiteral("ko"))
   	{
 		FillVarBlockToScript(smKorean, mPrivBlockToScript);
-  	} else if((gUtil->ScriptEnabled(smTradChinese)) && ((aLangGroup.EqualsIgnoreCase("zh-TW")) || (aLangGroup.EqualsIgnoreCase("zh-HK"))))
+  	} else if((gUtil->ScriptEnabled(smTradChinese)) && ((aLangGroup.LowerCaseEqualsLiteral("zh-tw")) || (aLangGroup.LowerCaseEqualsLiteral("zh-hk"))))
   	{
 		FillVarBlockToScript(smTradChinese, mPrivBlockToScript);
-  	} else if(gUtil->ScriptEnabled(smJapanese) && aLangGroup.EqualsIgnoreCase("ja"))
+  	} else if(gUtil->ScriptEnabled(smJapanese) && aLangGroup.LowerCaseEqualsLiteral("ja"))
   	{
 		FillVarBlockToScript(smJapanese, mPrivBlockToScript);
   	}
diff --git a/gfx/src/mac/nsUnicodeMappingUtil.cpp b/gfx/src/mac/nsUnicodeMappingUtil.cpp
index 89f5a92c23a6..f38dc2975aca 100644
--- a/gfx/src/mac/nsUnicodeMappingUtil.cpp
+++ b/gfx/src/mac/nsUnicodeMappingUtil.cpp
@@ -479,17 +479,17 @@ void nsUnicodeMappingUtil::InitBlockToScriptMapping()
 //--------------------------------------------------------------------------
 nsGenericFontNameType nsUnicodeMappingUtil::MapGenericFontNameType(const nsString& aGenericName)
 {
-	if (aGenericName.EqualsIgnoreCase("serif"))
+	if (aGenericName.LowerCaseEqualsLiteral("serif"))
 	  return kSerif;
-	if (aGenericName.EqualsIgnoreCase("sans-serif"))
+	if (aGenericName.LowerCaseEqualsLiteral("sans-serif"))
 	  return kSansSerif;
-	if (aGenericName.EqualsIgnoreCase("monospace"))
+	if (aGenericName.LowerCaseEqualsLiteral("monospace"))
 	  return kMonospace;
-	if (aGenericName.EqualsIgnoreCase("-moz-fixed"))
+	if (aGenericName.LowerCaseEqualsLiteral("-moz-fixed"))
 	  return kMonospace;
-	if (aGenericName.EqualsIgnoreCase("cursive"))
+	if (aGenericName.LowerCaseEqualsLiteral("cursive"))
 	  return kCursive;
-	if (aGenericName.EqualsIgnoreCase("fantasy"))
+	if (aGenericName.LowerCaseEqualsLiteral("fantasy"))
 	  return kFantasy;
 	  
 	return kUknownGenericFontName;			
diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp
index a585bf07966f..448aef9ac590 100644
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -462,13 +462,13 @@ nsresult DeviceContextImpl::CreateFontAliasTable()
     mFontAliasTable = new nsHashtable();
     if (nsnull != mFontAliasTable) {
 
-      nsAutoString  times;              times.Assign(NS_LITERAL_STRING("Times"));
-      nsAutoString  timesNewRoman;      timesNewRoman.Assign(NS_LITERAL_STRING("Times New Roman"));
-      nsAutoString  timesRoman;         timesRoman.Assign(NS_LITERAL_STRING("Times Roman"));
-      nsAutoString  arial;              arial.Assign(NS_LITERAL_STRING("Arial"));
-      nsAutoString  helvetica;          helvetica.Assign(NS_LITERAL_STRING("Helvetica"));
-      nsAutoString  courier;            courier.Assign(NS_LITERAL_STRING("Courier"));
-      nsAutoString  courierNew;         courierNew.Assign(NS_LITERAL_STRING("Courier New"));
+      nsAutoString  times;              times.AssignLiteral("Times");
+      nsAutoString  timesNewRoman;      timesNewRoman.AssignLiteral("Times New Roman");
+      nsAutoString  timesRoman;         timesRoman.AssignLiteral("Times Roman");
+      nsAutoString  arial;              arial.AssignLiteral("Arial");
+      nsAutoString  helvetica;          helvetica.AssignLiteral("Helvetica");
+      nsAutoString  courier;            courier.AssignLiteral("Courier");
+      nsAutoString  courierNew;         courierNew.AssignLiteral("Courier New");
       nsAutoString  nullStr;
 
       AliasFont(times, timesNewRoman, timesRoman, PR_FALSE);
diff --git a/gfx/src/nsFont.cpp b/gfx/src/nsFont.cpp
index c47a64993e29..31292d5e6b35 100644
--- a/gfx/src/nsFont.cpp
+++ b/gfx/src/nsFont.cpp
@@ -212,10 +212,10 @@ void nsFont::GetFirstFamily(nsString& aFamily) const
 void nsFont::GetGenericID(const nsString& aGeneric, PRUint8* aID)
 {
   *aID = kGenericFont_NONE;
-  if (aGeneric.EqualsIgnoreCase("-moz-fixed"))      *aID = kGenericFont_moz_fixed;
-  else if (aGeneric.EqualsIgnoreCase("serif"))      *aID = kGenericFont_serif;
-  else if (aGeneric.EqualsIgnoreCase("sans-serif")) *aID = kGenericFont_sans_serif;
-  else if (aGeneric.EqualsIgnoreCase("cursive"))    *aID = kGenericFont_cursive;
-  else if (aGeneric.EqualsIgnoreCase("fantasy"))    *aID = kGenericFont_fantasy;
-  else if (aGeneric.EqualsIgnoreCase("monospace"))  *aID = kGenericFont_monospace;
+  if (aGeneric.LowerCaseEqualsLiteral("-moz-fixed"))      *aID = kGenericFont_moz_fixed;
+  else if (aGeneric.LowerCaseEqualsLiteral("serif"))      *aID = kGenericFont_serif;
+  else if (aGeneric.LowerCaseEqualsLiteral("sans-serif")) *aID = kGenericFont_sans_serif;
+  else if (aGeneric.LowerCaseEqualsLiteral("cursive"))    *aID = kGenericFont_cursive;
+  else if (aGeneric.LowerCaseEqualsLiteral("fantasy"))    *aID = kGenericFont_fantasy;
+  else if (aGeneric.LowerCaseEqualsLiteral("monospace"))  *aID = kGenericFont_monospace;
 }
diff --git a/gfx/src/nsPrintOptionsImpl.cpp b/gfx/src/nsPrintOptionsImpl.cpp
index 3fb0856fb193..11a61f032352 100644
--- a/gfx/src/nsPrintOptionsImpl.cpp
+++ b/gfx/src/nsPrintOptionsImpl.cpp
@@ -1312,7 +1312,7 @@ Tester::Tester()
       {"All", nsIPrintSettings::kInitSaveAll},
       {nsnull, 0}};
 
-    nsString prefix; prefix.AssignWithConversion("Printer Name");
+    nsString prefix; prefix.AssignLiteral("Printer Name");
     PRInt32 i = 0;
     while (gSettings[i].mName != nsnull) {
       printf("------------------------------------------------\n");
diff --git a/gfx/src/nsPrintSettingsImpl.cpp b/gfx/src/nsPrintSettingsImpl.cpp
index aeaa2a016c11..78b7b1828f49 100644
--- a/gfx/src/nsPrintSettingsImpl.cpp
+++ b/gfx/src/nsPrintSettingsImpl.cpp
@@ -84,11 +84,11 @@ nsPrintSettings::nsPrintSettings() :
 
   mPrintOptions = kPrintOddPages | kPrintEvenPages;
 
-  mHeaderStrs[0].AssignWithConversion("&T");
-  mHeaderStrs[2].AssignWithConversion("&U");
+  mHeaderStrs[0].AssignLiteral("&T");
+  mHeaderStrs[2].AssignLiteral("&U");
 
-  mFooterStrs[0].AssignWithConversion("&PT"); // Use &P (Page Num Only) or &PT (Page Num of Page Total)
-  mFooterStrs[2].AssignWithConversion("&D");
+  mFooterStrs[0].AssignLiteral("&PT"); // Use &P (Page Num Only) or &PT (Page Num of Page Total)
+  mFooterStrs[2].AssignLiteral("&D");
 
 }
 
diff --git a/gfx/src/nsRect.cpp b/gfx/src/nsRect.cpp
index 688cd9032933..6a997d231d70 100644
--- a/gfx/src/nsRect.cpp
+++ b/gfx/src/nsRect.cpp
@@ -211,15 +211,15 @@ FILE* operator<<(FILE* out, const nsRect& rect)
   nsAutoString tmp;
 
   // Output the coordinates in fractional points so they're easier to read
-  tmp.Append(NS_LITERAL_STRING("{"));
+  tmp.AppendLiteral("{");
   tmp.AppendFloat(NSTwipsToFloatPoints(rect.x));
-  tmp.Append(NS_LITERAL_STRING(", "));
+  tmp.AppendLiteral(", ");
   tmp.AppendFloat(NSTwipsToFloatPoints(rect.y));
-  tmp.Append(NS_LITERAL_STRING(", "));
+  tmp.AppendLiteral(", ");
   tmp.AppendFloat(NSTwipsToFloatPoints(rect.width));
-  tmp.Append(NS_LITERAL_STRING(", "));
+  tmp.AppendLiteral(", ");
   tmp.AppendFloat(NSTwipsToFloatPoints(rect.height));
-  tmp.Append(NS_LITERAL_STRING("}"));
+  tmp.AppendLiteral("}");
   fputs(NS_LossyConvertUCS2toASCII(tmp).get(), out);
   return out;
 }
diff --git a/gfx/src/os2/nsDeviceContextOS2.cpp b/gfx/src/os2/nsDeviceContextOS2.cpp
index f661aaa17f46..305674a40b4c 100644
--- a/gfx/src/os2/nsDeviceContextOS2.cpp
+++ b/gfx/src/os2/nsDeviceContextOS2.cpp
@@ -711,17 +711,17 @@ nsresult nsDeviceContextOS2::CreateFontAliasTable()
    {
       mFontAliasTable = new nsHashtable;
 
-      nsAutoString  times;              times.Assign(NS_LITERAL_STRING("Times"));
-      nsAutoString  timesNewRoman;      timesNewRoman.Assign(NS_LITERAL_STRING("Times New Roman"));
-      nsAutoString  timesRoman;         timesRoman.Assign(NS_LITERAL_STRING("Tms Rmn"));
-      nsAutoString  arial;              arial.Assign(NS_LITERAL_STRING("Arial"));
-      nsAutoString  helv;               helv.Assign(NS_LITERAL_STRING("Helv"));
-      nsAutoString  helvetica;          helvetica.Assign(NS_LITERAL_STRING("Helvetica"));
-      nsAutoString  courier;            courier.Assign(NS_LITERAL_STRING("Courier"));
-      nsAutoString  courierNew;         courierNew.Assign(NS_LITERAL_STRING("Courier New"));
-      nsAutoString  sans;               sans.Assign(NS_LITERAL_STRING("Sans"));
-      nsAutoString  unicode;            unicode.Assign(NS_LITERAL_STRING("Unicode"));
-      nsAutoString  timesNewRomanMT30;  timesNewRomanMT30.Assign(NS_LITERAL_STRING("Times New Roman MT 30"));
+      nsAutoString  times;              times.AssignLiteral("Times");
+      nsAutoString  timesNewRoman;      timesNewRoman.AssignLiteral("Times New Roman");
+      nsAutoString  timesRoman;         timesRoman.AssignLiteral("Tms Rmn");
+      nsAutoString  arial;              arial.AssignLiteral("Arial");
+      nsAutoString  helv;               helv.AssignLiteral("Helv");
+      nsAutoString  helvetica;          helvetica.AssignLiteral("Helvetica");
+      nsAutoString  courier;            courier.AssignLiteral("Courier");
+      nsAutoString  courierNew;         courierNew.AssignLiteral("Courier New");
+      nsAutoString  sans;               sans.AssignLiteral("Sans");
+      nsAutoString  unicode;            unicode.AssignLiteral("Unicode");
+      nsAutoString  timesNewRomanMT30;  timesNewRomanMT30.AssignLiteral("Times New Roman MT 30");
       nsAutoString  nullStr;
 
       AliasFont(times, timesNewRoman, timesRoman, PR_FALSE);
diff --git a/gfx/src/os2/nsFontMetricsOS2.cpp b/gfx/src/os2/nsFontMetricsOS2.cpp
index 7045c726c749..721b80187a43 100644
--- a/gfx/src/os2/nsFontMetricsOS2.cpp
+++ b/gfx/src/os2/nsFontMetricsOS2.cpp
@@ -887,9 +887,9 @@ nsFontMetricsOS2::FindGlobalFont(HPS aPS, PRUint32 aChar)
   nsFontOS2* fh = nsnull;
   nsAutoString fontname;
   if (!IsDBCS())
-    fontname = NS_LITERAL_STRING("Helv");
+    fontname.AssignLiteral("Helv");
   else
-    fontname = NS_LITERAL_STRING("Helv Combined");
+    fontname.AssignLiteral("Helv Combined");
   fh = LoadFont(aPS, fontname);
   NS_ASSERTION(fh, "Couldn't load default font - BAD things are happening");
   return fh;
@@ -1293,9 +1293,9 @@ nsFontMetricsOS2::GetVectorSubstitute(HPS aPS, const nsAString& aFamilyname,
                                       nsAString& aAlias)
 {
   if (aFamilyname.EqualsLiteral("Tms Rmn")) {
-    aAlias = NS_LITERAL_STRING("Times New Roman");
+    aAlias.AssignLiteral("Times New Roman");
   } else if (aFamilyname.EqualsLiteral("Helv")) {
-    aAlias = NS_LITERAL_STRING("Helvetica");
+    aAlias.AssignLiteral("Helvetica");
   }
 
   // When printing, substitute vector fonts for these common bitmap fonts
@@ -1303,11 +1303,11 @@ nsFontMetricsOS2::GetVectorSubstitute(HPS aPS, const nsAString& aFamilyname,
     if (aFamilyname.EqualsLiteral("System Proportional") ||
         aFamilyname.EqualsLiteral("WarpSans"))
     {
-      aAlias = NS_LITERAL_STRING("Helvetica");
+      aAlias.AssignLiteral("Helvetica");
     } else if (aFamilyname.EqualsLiteral("System Monospaced") ||
                aFamilyname.EqualsLiteral("System VIO"))
     {
-      aAlias = NS_LITERAL_STRING("Courier");
+      aAlias.AssignLiteral("Courier");
     }
   }
 
@@ -1345,7 +1345,7 @@ nsFontMetricsOS2::RealizeFont()
       mGeneric.Assign(value);
     }
     else {
-      mGeneric.Assign(NS_LITERAL_STRING("serif"));
+      mGeneric.AssignLiteral("serif");
     }
   }
 
diff --git a/gfx/src/windows/nsDeviceContextWin.cpp b/gfx/src/windows/nsDeviceContextWin.cpp
index db3b453cc9c7..41a4433e4195 100644
--- a/gfx/src/windows/nsDeviceContextWin.cpp
+++ b/gfx/src/windows/nsDeviceContextWin.cpp
@@ -776,7 +776,7 @@ NS_IMETHODIMP nsDeviceContextWin :: BeginDocument(PRUnichar * aTitle, PRUnichar*
     titleStr = aTitle;
     if (titleStr.Length() > DOC_TITLE_LENGTH) {
       titleStr.SetLength(DOC_TITLE_LENGTH-3);
-      titleStr.AppendWithConversion("...");
+      titleStr.AppendLiteral("...");
     }
     char *title = GetACPString(titleStr);
 
diff --git a/gfx/src/windows/nsFontMetricsWin.cpp b/gfx/src/windows/nsFontMetricsWin.cpp
index f7cb00a8251b..796cd6bd4fdf 100644
--- a/gfx/src/windows/nsFontMetricsWin.cpp
+++ b/gfx/src/windows/nsFontMetricsWin.cpp
@@ -3583,7 +3583,7 @@ nsFontMetricsWin::RealizeFont()
       mGeneric.Assign(value);
     }
     else {
-      mGeneric.Assign(NS_LITERAL_STRING("serif"));
+      mGeneric.AssignLiteral("serif");
     }
   }
 
diff --git a/gfx/src/xprint/nsXPrintContext.cpp b/gfx/src/xprint/nsXPrintContext.cpp
index 6e0d8f65e0b1..67725aeb87a4 100644
--- a/gfx/src/xprint/nsXPrintContext.cpp
+++ b/gfx/src/xprint/nsXPrintContext.cpp
@@ -768,7 +768,7 @@ nsXPrintContext::BeginDocument( PRUnichar * aTitle, PRUnichar* aPrintToFileName,
   }
   else
   {
-    job_title.Assign(NS_LITERAL_CSTRING("Mozilla document without title"));
+    job_title.AssignLiteral("Mozilla document without title");
   }
  
   /* Set the Job Attributes */
diff --git a/intl/chardet/src/nsMetaCharsetObserver.cpp b/intl/chardet/src/nsMetaCharsetObserver.cpp
index 14dc30eed1b1..c275dd16196c 100644
--- a/intl/chardet/src/nsMetaCharsetObserver.cpp
+++ b/intl/chardet/src/nsMetaCharsetObserver.cpp
@@ -100,8 +100,7 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
                      const PRUnichar* valueArray[])
 {
   
-    if(!nsDependentString(aTag).Equals(NS_LITERAL_STRING("META"),
-                                       nsCaseInsensitiveStringComparator())) 
+    if(!nsDependentString(aTag).LowerCaseEqualsLiteral("meta")) 
         return NS_ERROR_ILLEGAL_VALUE;
     else
         return Notify(aDocumentID, numOfAttributes, nameArray, valueArray);
@@ -147,8 +146,7 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
   nsresult result = NS_OK;
   // bug 125317 - document.write content is already an unicode content.
   if (!(aFlags & nsIElementObserver::IS_DOCUMENT_WRITE)) {
-    if(!nsDependentString(aTag).Equals(NS_LITERAL_STRING("META"),
-                                       nsCaseInsensitiveStringComparator())) {
+    if(!nsDependentString(aTag).LowerCaseEqualsLiteral("meta")) {
         result = NS_ERROR_ILLEGAL_VALUE;
     }
     else {
@@ -219,14 +217,11 @@ NS_IMETHODIMP nsMetaCharsetObserver::Notify(
         while(IS_SPACE_CHARS(*keyStr)) 
           keyStr++;
 
-        if(Substring(keyStr, keyStr+10).Equals(NS_LITERAL_STRING("HTTP-EQUIV"),
-                                               nsCaseInsensitiveStringComparator()))
+        if(Substring(keyStr, keyStr+10).LowerCaseEqualsLiteral("http-equiv"))
               httpEquivValue = values->StringAt(i)->get();
-        else if(Substring(keyStr, keyStr+7).Equals(NS_LITERAL_STRING("content"),
-                                                   nsCaseInsensitiveStringComparator()))
+        else if(Substring(keyStr, keyStr+7).LowerCaseEqualsLiteral("content"))
               contentValue = values->StringAt(i)->get();
-        else if (Substring(keyStr, keyStr+7).Equals(NS_LITERAL_STRING("charset"),
-                                                    nsCaseInsensitiveStringComparator()))
+        else if (Substring(keyStr, keyStr+7).LowerCaseEqualsLiteral("charset"))
               charsetValue = values->StringAt(i)->get();
       }
       NS_NAMED_LITERAL_STRING(contenttype, "Content-Type");
@@ -351,8 +346,7 @@ NS_IMETHODIMP nsMetaCharsetObserver::GetCharsetFromCompatibilityTag(
     // e.g. 
     PRInt32 numOfAttributes = keys->Count();
     if ((numOfAttributes >= 3) &&
-        (keys->StringAt(0)->Equals(NS_LITERAL_STRING("charset"),
-                                   nsCaseInsensitiveStringComparator())))
+        (keys->StringAt(0)->LowerCaseEqualsLiteral("charset")))
     {
       nsAutoString srcStr((values->StringAt(numOfAttributes-2))->get());
       PRInt32 err;
diff --git a/intl/chardet/src/nsXMLEncodingObserver.cpp b/intl/chardet/src/nsXMLEncodingObserver.cpp
index 6d7cfd3fa220..fc2bcda47bc7 100644
--- a/intl/chardet/src/nsXMLEncodingObserver.cpp
+++ b/intl/chardet/src/nsXMLEncodingObserver.cpp
@@ -92,8 +92,7 @@ NS_IMETHODIMP nsXMLEncodingObserver::Notify(
                      const PRUnichar* nameArray[], 
                      const PRUnichar* valueArray[])
 {
-    if(!nsDependentString(aTag).Equals(NS_LITERAL_STRING("?XML"),
-                                       nsCaseInsensitiveStringComparator())) 
+    if(!nsDependentString(aTag).LowerCaseEqualsLiteral("?xml")) 
         return NS_ERROR_ILLEGAL_VALUE;
     else
         return Notify(aDocumentID, numOfAttributes, nameArray, valueArray);
@@ -141,8 +140,7 @@ NS_IMETHODIMP nsXMLEncodingObserver::Notify(
          } else if(0==nsCRT::strcmp(nameArray[i], NS_LITERAL_STRING("charsetSource").get())) {
            bGotCurrentCharsetSource = PR_TRUE;
            charsetSourceStr = valueArray[i];
-         } else if(nsDependentString(nameArray[i]).Equals(NS_LITERAL_STRING("encoding"),
-                                                          nsCaseInsensitiveStringComparator())) { 
+         } else if(nsDependentString(nameArray[i]).LowerCaseEqualsLiteral("encoding")) { 
            bGotEncoding = PR_TRUE;
            CopyUCS2toASCII(nsDependentString(valueArray[i]), encoding);
          }
diff --git a/intl/locale/src/mac/nsDateTimeFormatMac.cpp b/intl/locale/src/mac/nsDateTimeFormatMac.cpp
index 72482e9f24e5..3856774e3cb8 100644
--- a/intl/locale/src/mac/nsDateTimeFormatMac.cpp
+++ b/intl/locale/src/mac/nsDateTimeFormatMac.cpp
@@ -259,7 +259,7 @@ nsresult nsDateTimeFormatMac::Initialize(nsILocale* locale)
   mScriptcode = smSystemScript;
   mLangcode = langEnglish;
   mRegioncode = verUS;
-  mCharset.Assign(NS_LITERAL_CSTRING("x-mac-roman"));
+  mCharset.AssignLiteral("x-mac-roman");
   
 
   // get application locale
diff --git a/intl/locale/src/nsLanguageAtomService.cpp b/intl/locale/src/nsLanguageAtomService.cpp
index 24db3ce2e717..3e9c3b90dade 100644
--- a/intl/locale/src/nsLanguageAtomService.cpp
+++ b/intl/locale/src/nsLanguageAtomService.cpp
@@ -81,11 +81,11 @@ nsLanguageAtomService::LookupLanguage(const nsAString &aLanguage,
     nsXPIDLString langGroupStr;
 
     if (lowered.EqualsLiteral("en-us")) {
-      langGroupStr.Assign(NS_LITERAL_STRING("x-western"));
+      langGroupStr.AssignLiteral("x-western");
     } else if (lowered.EqualsLiteral("de-de")) {
-      langGroupStr.Assign(NS_LITERAL_STRING("x-western"));
+      langGroupStr.AssignLiteral("x-western");
     } else if (lowered.EqualsLiteral("ja-jp")) {
-      langGroupStr.Assign(NS_LITERAL_STRING("ja"));
+      langGroupStr.AssignLiteral("ja");
     } else {
       if (!mLangGroups) {
         if (NS_FAILED(InitLangGroupTable())) {
@@ -103,10 +103,10 @@ nsLanguageAtomService::LookupLanguage(const nsAString &aLanguage,
           truncated.Truncate(hyphen);
           res = mLangGroups->GetStringFromName(truncated.get(), getter_Copies(langGroupStr));
           if (NS_FAILED(res)) {
-            langGroupStr.Assign(NS_LITERAL_STRING("x-western"));
+            langGroupStr.AssignLiteral("x-western");
           }
         } else {
-          langGroupStr.Assign(NS_LITERAL_STRING("x-western"));
+          langGroupStr.AssignLiteral("x-western");
         }
       }
     }
diff --git a/intl/locale/src/os2/nsOS2Locale.cpp b/intl/locale/src/os2/nsOS2Locale.cpp
index dc5796a841ea..dc424c082074 100644
--- a/intl/locale/src/os2/nsOS2Locale.cpp
+++ b/intl/locale/src/os2/nsOS2Locale.cpp
@@ -106,7 +106,7 @@ nsOS2Locale::GetXPLocale(const char* os2Locale, nsAString& locale)
 
   if (os2Locale!=nsnull) {
     if (strcmp(os2Locale,"C")==0 || strcmp(os2Locale,"OS2")==0) {
-      locale.Assign(NS_LITERAL_STRING("en-US"));
+      locale.AssignLiteral("en-US");
       return NS_OK;
     }
     if (!ParseLocaleString(os2Locale,lang_code,country_code,extra,'_')) {
diff --git a/intl/locale/src/unix/nsCollationUnix.cpp b/intl/locale/src/unix/nsCollationUnix.cpp
index d9061bb3b21d..8608a315174f 100644
--- a/intl/locale/src/unix/nsCollationUnix.cpp
+++ b/intl/locale/src/unix/nsCollationUnix.cpp
@@ -100,8 +100,7 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale)
       nsXPIDLString prefValue;
       prefLocalString->GetData(getter_Copies(prefValue));
       mUseCodePointOrder =
-        prefValue.Equals(NS_LITERAL_STRING("useCodePointOrder"),
-                         nsCaseInsensitiveStringComparator());
+        prefValue.LowerCaseEqualsLiteral("usecodepointorder");
     }
   }
 
@@ -138,8 +137,8 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale)
   // Get platform locale and charset name from locale, if available
   if (NS_SUCCEEDED(res)) {
     // keep the same behavior as 4.x as well as avoiding Linux collation key problem
-    if (localeStr.EqualsIgnoreCase("en_US")) { // note: locale is in platform format
-      localeStr.Assign(NS_LITERAL_STRING("C"));
+    if (localeStr.LowerCaseEqualsLiteral("en_us")) { // note: locale is in platform format
+      localeStr.AssignLiteral("C");
     }
 
     nsCOMPtr  posixLocale = do_GetService(NS_POSIXLOCALE_CONTRACTID, &res);
diff --git a/intl/locale/src/unix/nsDateTimeFormatUnix.cpp b/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
index 37281785055b..6a778e1f2dfd 100644
--- a/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
+++ b/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
@@ -76,7 +76,7 @@ nsresult nsDateTimeFormatUnix::Initialize(nsILocale* locale)
     }
   }
 
-  mCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+  mCharset.AssignLiteral("ISO-8859-1");
   mPlatformLocale.Assign("en_US");
 
   // get locale name string, use app default if no locale specified
diff --git a/intl/locale/src/unix/nsPosixLocale.cpp b/intl/locale/src/unix/nsPosixLocale.cpp
index bedea44aef89..799ad7436471 100644
--- a/intl/locale/src/unix/nsPosixLocale.cpp
+++ b/intl/locale/src/unix/nsPosixLocale.cpp
@@ -107,7 +107,7 @@ nsPosixLocale::GetXPLocale(const char* posixLocale, nsAString& locale)
 
   if (posixLocale!=nsnull) {
     if (strcmp(posixLocale,"C")==0 || strcmp(posixLocale,"POSIX")==0) {
-      locale.Assign(NS_LITERAL_STRING("en-US"));
+      locale.AssignLiteral("en-US");
       return NS_OK;
     }
     if (!ParseLocaleString(posixLocale,lang_code,country_code,extra,'_')) {
diff --git a/intl/locale/src/windows/nsIWin32LocaleImpl.cpp b/intl/locale/src/windows/nsIWin32LocaleImpl.cpp
index 7adea94f6798..581aaa2f56f8 100644
--- a/intl/locale/src/windows/nsIWin32LocaleImpl.cpp
+++ b/intl/locale/src/windows/nsIWin32LocaleImpl.cpp
@@ -674,7 +674,7 @@ nsIWin32LocaleImpl::GetXPLocale(LCID winLCID, nsAString& locale)
   // didn't find any match. fall back to en-US, which is better 
   // than unusable buttons without 'OK', 'Cancel', etc (bug 224546)       
   //
-  locale.Assign(NS_LITERAL_STRING("en-US")); 
+  locale.AssignLiteral("en-US"); 
   return NS_OK;
 
 }
diff --git a/intl/locale/tests/LocaleSelfTest.cpp b/intl/locale/tests/LocaleSelfTest.cpp
index 5e3c8c255f0a..b6cbbf4647c8 100644
--- a/intl/locale/tests/LocaleSelfTest.cpp
+++ b/intl/locale/tests/LocaleSelfTest.cpp
@@ -863,27 +863,27 @@ static void Test_nsLocale()
 
   nsCOMPtr win32Locale = do_CreateInstance(kMacLocaleFactoryCID);
   if (macLocale) {
-    localeName = NS_LITERAL_STRING("en-US");
+    localeName.AssignLiteral("en-US");
     res = macLocale->GetPlatformLocale(localeName, &script, &lang);
     printf("script for en-US is 0\n");
     printf("result: script = %d lang = %d\n", script, lang);
 
-    localeName = NS_LITERAL_STRING("en-GB");
+    localeName.AssignLiteral("en-GB");
     res = macLocale->GetPlatformLocale(localeName, &script, &lang);
     printf("script for en-GB is 0\n");
     printf("result: script = %d lang = %d\n", script, lang);
 
-    localeName = NS_LITERAL_STRING("fr-FR");
+    localeName.AssignLiteral("fr-FR");
     res = macLocale->GetPlatformLocale(localeName, &script, &lang);
     printf("script for fr-FR is 0\n");
     printf("result: script = %d lang = %d\n", script, lang);
 
-    localeName = NS_LITERAL_STRING("de-DE");
+    localeName.AssignLiteral("de-DE");
     res = macLocale->GetPlatformLocale(localeName, &script, &lang);
     printf("script for de-DE is 0\n");
     printf("result: script = %d lang = %d\n", script, lang);
 
-    localeName = NS_LITERAL_STRING("ja-JP");
+    localeName.AssignLiteral("ja-JP");
     res = macLocale->GetPlatformLocale(localeName, &script, &lang);
     printf("script for ja-JP is 1\n");
     printf("result: script = %d lang = %d\n", script, lang);
@@ -895,27 +895,27 @@ static void Test_nsLocale()
 
   nsCOMPtr win32Locale = do_CreateInstance(kWin32LocaleFactoryCID);
   if (win32Locale) {
-    localeName = NS_LITERAL_STRING("en-US");
+    localeName.AssignLiteral("en-US");
     res = win32Locale->GetPlatformLocale(localeName, &lcid);
     printf("LCID for en-US is 1033\n");
     printf("result: locale = %s LCID = 0x%0.4x %d\n", NS_LossyConvertUCS2toASCII(localeName).get(), lcid, lcid);
 
-    localeName = NS_LITERAL_STRING("en-GB");
+    localeName.AssignLiteral("en-GB");
     res = win32Locale->GetPlatformLocale(localeName, &lcid);
     printf("LCID for en-GB is 2057\n");
     printf("result: locale = %s LCID = 0x%0.4x %d\n", NS_LossyConvertUCS2toASCII(localeName).get(), lcid, lcid);
 
-    localeName = NS_LITERAL_STRING("fr-FR");
+    localeName.AssignLiteral("fr-FR");
     res = win32Locale->GetPlatformLocale(localeName, &lcid);
     printf("LCID for fr-FR is 1036\n");
     printf("result: locale = %s LCID = 0x%0.4x %d\n", NS_LossyConvertUCS2toASCII(localeName).get(), lcid, lcid);
 
-    localeName = NS_LITERAL_STRING("de-DE");
+    localeName.AssignLiteral("de-DE");
     res = win32Locale->GetPlatformLocale(localeName, &lcid);
     printf("LCID for de-DE is 1031\n");
     printf("result: locale = %s LCID = 0x%0.4x %d\n", NS_LossyConvertUCS2toASCII(localeName).get(), lcid, lcid);
 
-    localeName = NS_LITERAL_STRING("ja-JP");
+    localeName.AssignLiteral("ja-JP");
     res = win32Locale->GetPlatformLocale(localeName, &lcid);
     printf("LCID for ja-JP is 1041\n");
     printf("result: locale = %s LCID = 0x%0.4x %d\n", NS_LossyConvertUCS2toASCII(localeName).get(), lcid, lcid);
@@ -929,23 +929,23 @@ static void Test_nsLocale()
 
   nsCOMPtr posixLocale = do_CreateInstance(kPosixLocaleFactoryCID);
   if (posixLocale) {
-    localeName = NS_LITERAL_STRING("en-US");
+    localeName.AssignLiteral("en-US");
     res = posixLocale->GetPlatformLocale(localeName, locale, length);
     printf("result: locale = %s POSIX = %s\n", NS_LossyConvertUCS2toASCII(localeName).get(), locale);
 
-    localeName = NS_LITERAL_STRING("en-GB");
+    localeName.AssignLiteral("en-GB");
     res = posixLocale->GetPlatformLocale(localeName, locale, length);
     printf("result: locale = %s POSIX = %s\n", NS_LossyConvertUCS2toASCII(localeName).get(), locale);
 
-    localeName = NS_LITERAL_STRING("fr-FR");
+    localeName.AssignLiteral("fr-FR");
     res = posixLocale->GetPlatformLocale(localeName, locale, length);
     printf("result: locale = %s POSIX = %s\n", NS_LossyConvertUCS2toASCII(localeName).get(), locale);
 
-    localeName = NS_LITERAL_STRING("de-DE");
+    localeName.AssignLiteral("de-DE");
     res = posixLocale->GetPlatformLocale(localeName, locale, length);
     printf("result: locale = %s POSIX = %s\n", NS_LossyConvertUCS2toASCII(localeName).get(), locale);
 
-    localeName = NS_LITERAL_STRING("ja-JP");
+    localeName.AssignLiteral("ja-JP");
     res = posixLocale->GetPlatformLocale(localeName, locale, length);
     printf("result: locale = %s POSIX = %s\n", NS_LossyConvertUCS2toASCII(localeName).get(), locale);
 
diff --git a/intl/locale/tests/nsLocaleTest.cpp b/intl/locale/tests/nsLocaleTest.cpp
index e19e8f28076a..96e8642e3158 100644
--- a/intl/locale/tests/nsLocaleTest.cpp
+++ b/intl/locale/tests/nsLocaleTest.cpp
@@ -352,7 +352,7 @@ win32locale_test(void)
 	//
 	// test with a simple locale
 	//
-    locale = NS_LITERAL_STRING("en-US");
+    locale.AssignLiteral("en-US");
 	loc_id = 0;
 
 	result = nsComponentManager::CreateInstance(kWin32LocaleFactoryCID,
@@ -371,7 +371,7 @@ win32locale_test(void)
 	//
 	// test with a not so simple locale
 	//
-	locale = NS_LITERAL_STRING("x-netscape");
+	locale.AssignLiteral("x-netscape");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -380,7 +380,7 @@ win32locale_test(void)
 		"nsLocaleTest: GetPlatformLocale failed.");
 
 
-	locale = NS_LITERAL_STRING("en");
+	locale.AssignLiteral("en");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -409,7 +409,7 @@ win32locale_conversion_test(void)
 	//
 	// check english variants
 	//
-	locale = NS_LITERAL_STRING("en");	// generic english
+	locale.AssignLiteral("en");	// generic english
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -417,7 +417,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("en-US");	// US english
+	locale.AssignLiteral("en-US");	// US english
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -425,7 +425,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("en-GB");	// UK english
+	locale.AssignLiteral("en-GB");	// UK english
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -433,7 +433,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_UK),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("en-CA");	// Canadian english
+	locale.AssignLiteral("en-CA");	// Canadian english
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -444,7 +444,7 @@ win32locale_conversion_test(void)
 	//
 	// japanese
 	//
-	locale = NS_LITERAL_STRING("ja");
+	locale.AssignLiteral("ja");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -452,7 +452,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_JAPANESE,SUBLANG_DEFAULT),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("ja-JP");
+	locale.AssignLiteral("ja-JP");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -463,7 +463,7 @@ win32locale_conversion_test(void)
 	//
 	// chinese Locales
 	//
-	locale = NS_LITERAL_STRING("zh");
+	locale.AssignLiteral("zh");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -471,7 +471,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_DEFAULT),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("zh-CN");
+	locale.AssignLiteral("zh-CN");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -479,7 +479,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_CHINESE_SIMPLIFIED),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("zh-TW");
+	locale.AssignLiteral("zh-TW");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -490,7 +490,7 @@ win32locale_conversion_test(void)
 	//
 	// german and variants
 	//
-	locale = NS_LITERAL_STRING("de");
+	locale.AssignLiteral("de");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -498,7 +498,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_DEFAULT),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("de-DE");
+	locale.AssignLiteral("de-DE");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -506,7 +506,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_GERMAN),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("de-AT");
+	locale.AssignLiteral("de-AT");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -517,7 +517,7 @@ win32locale_conversion_test(void)
 	//
 	// french and it's variants
 	//
-	locale = NS_LITERAL_STRING("fr");
+	locale.AssignLiteral("fr");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -525,7 +525,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_DEFAULT),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("fr-FR");
+	locale.AssignLiteral("fr-FR");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -533,7 +533,7 @@ win32locale_conversion_test(void)
 	NS_ASSERTION(loc_id==MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH),SORT_DEFAULT),
 		"nsLocaleTest: GetPlatformLocale failed.");
 
-	locale = NS_LITERAL_STRING("fr-CA");
+	locale.AssignLiteral("fr-CA");
 	loc_id = 0;
 
 	result = win32Locale->GetPlatformLocale(locale,&loc_id);
@@ -679,7 +679,7 @@ posixlocale_test(void)
 	//
 	// test with a simple locale
 	//
-	locale = NS_LITERAL_STRING("en-US");
+	locale.AssignLiteral("en-US");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_string,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.\n");
   NS_ASSERTION(strcmp("en_US",posix_locale_string)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -687,7 +687,7 @@ posixlocale_test(void)
 	//
 	// test with a not so simple locale
 	//
-	locale = NS_LITERAL_STRING("x-netscape");
+	locale.AssignLiteral("x-netscape");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_string,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.\n");
   NS_ASSERTION(strcmp("C",posix_locale_string)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -695,7 +695,7 @@ posixlocale_test(void)
   //
   // test with a generic locale
   //
-	locale = NS_LITERAL_STRING("en");
+	locale.AssignLiteral("en");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_string,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.\n");
   NS_ASSERTION(strcmp("en",posix_locale_string)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -725,22 +725,22 @@ posixlocale_conversion_test()
 	//
 	// check english variants
 	//
-	locale = NS_LITERAL_STRING("en");	// generic english
+	locale.AssignLiteral("en");	// generic english
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("en",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("en-US");	// US english
+	locale.AssignLiteral("en-US");	// US english
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("en_US",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("en-GB");	// UK english
+	locale.AssignLiteral("en-GB");	// UK english
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("en_GB",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("en-CA");	// Canadian english
+	locale.AssignLiteral("en-CA");	// Canadian english
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("en_CA",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -748,12 +748,12 @@ posixlocale_conversion_test()
 	//
 	// japanese
 	//
-	locale = NS_LITERAL_STRING("ja");
+	locale.AssignLiteral("ja");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("ja",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("ja-JP");
+	locale.AssignLiteral("ja-JP");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("ja_JP",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -761,17 +761,17 @@ posixlocale_conversion_test()
 	//
 	// chinese Locales
 	//
-	locale = NS_LITERAL_STRING("zh");
+	locale.AssignLiteral("zh");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("zh",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("zh-CN");
+	locale.AssignLiteral("zh-CN");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("zh_CN",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("zh-TW");
+	locale.AssignLiteral("zh-TW");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("zh_TW",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -779,17 +779,17 @@ posixlocale_conversion_test()
 	//
 	// german and variants
 	//
-	locale = NS_LITERAL_STRING("de");
+	locale.AssignLiteral("de");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("de",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("de-DE");
+	locale.AssignLiteral("de-DE");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("de_DE",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("de-AT");
+	locale.AssignLiteral("de-AT");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("de_AT",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -797,17 +797,17 @@ posixlocale_conversion_test()
 	//
 	// french and it's variants
 	//
-	locale = NS_LITERAL_STRING("fr");
+	locale.AssignLiteral("fr");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("fr",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("fr-FR");
+	locale.AssignLiteral("fr-FR");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("fr_FR",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
 
-	locale = NS_LITERAL_STRING("fr-CA");
+	locale.AssignLiteral("fr-CA");
 	result = posix_locale->GetPlatformLocale(locale,posix_locale_result,9);
 	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: GetPlatformLocale failed.");
 	NS_ASSERTION(strcmp("fr_CA",posix_locale_result)==0,"nsLocaleTest: GetPlatformLocale failed.\n");
@@ -875,7 +875,7 @@ posixlocale_test_special(void)
   //
   // settup strings
   //
-  locale = NS_LITERAL_STRING("en");
+  locale.AssignLiteral("en");
   result_locale = new nsString();
   lc_message = new nsString("NSILOCALE_MESSAGES");
 
diff --git a/intl/lwbrk/tests/TestLineBreak.cpp b/intl/lwbrk/tests/TestLineBreak.cpp
index c7bd465a29d6..438e1e73e9c1 100644
--- a/intl/lwbrk/tests/TestLineBreak.cpp
+++ b/intl/lwbrk/tests/TestLineBreak.cpp
@@ -438,7 +438,7 @@ void SamplePrintWordWithBreak()
             tmp.Truncate();
             fragText.Mid(tmp, start, cur - start);
             result.Append(tmp);
-            result.Append(NS_LITERAL_STRING("^"));
+            result.AppendLiteral("^");
             start = cur;
             wbk->NextWord(fragText.get(), fragText.Length(), cur, &cur, &done);
       }
@@ -460,7 +460,7 @@ void SamplePrintWordWithBreak()
                                   &canBreak
                                 );
         if(canBreak)
-            result.Append(NS_LITERAL_STRING("^"));
+            result.AppendLiteral("^");
 
         fragText = nextFragText;
       }
diff --git a/intl/strres/tests/StringBundleTest.cpp b/intl/strres/tests/StringBundleTest.cpp
index 0e0109402223..3d8de5479fe4 100644
--- a/intl/strres/tests/StringBundleTest.cpp
+++ b/intl/strres/tests/StringBundleTest.cpp
@@ -147,7 +147,7 @@ main(int argc, char *argv[])
 
   // file
   nsString strfile;
-  strfile.Assign(NS_LITERAL_STRING("file"));
+  strfile.AssignLiteral("file");
   const PRUnichar *ptrFile = strfile.get();
   ret = bundle->GetStringFromName(ptrFile, &ptrv);
   if (NS_FAILED(ret)) {
diff --git a/intl/uconv/src/nsBeOSCharset.cpp b/intl/uconv/src/nsBeOSCharset.cpp
index 0c2f0f64a38f..a80fc631afad 100644
--- a/intl/uconv/src/nsBeOSCharset.cpp
+++ b/intl/uconv/src/nsBeOSCharset.cpp
@@ -44,7 +44,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsPlatformCharset, nsIPlatformCharset)
 
 nsPlatformCharset::nsPlatformCharset()
 {
-  mCharset = NS_LITERAL_CSTRING("UTF-8");
+  mCharset.AssignLiteral("UTF-8");
 }
 
 nsPlatformCharset::~nsPlatformCharset()
diff --git a/intl/uconv/src/nsCharsetAliasImp.cpp b/intl/uconv/src/nsCharsetAliasImp.cpp
index 5eb2cda11c77..1dd8a4232579 100644
--- a/intl/uconv/src/nsCharsetAliasImp.cpp
+++ b/intl/uconv/src/nsCharsetAliasImp.cpp
@@ -80,18 +80,18 @@ NS_IMETHODIMP nsCharsetAlias2::GetPreferred(const nsACString& aAlias,
    // so we might have an |mDelegate| already that isn't valid yet, but
    // the load is guaranteed to be "UTF-8" so things will be OK.
    if(aKey.EqualsLiteral("utf-8")) {
-     oResult = NS_LITERAL_CSTRING("UTF-8");
+     oResult.AssignLiteral("UTF-8");
      NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
      return NS_OK;
    } 
    if(aKey.EqualsLiteral("iso-8859-1")) {
-     oResult = NS_LITERAL_CSTRING("ISO-8859-1");
+     oResult.AssignLiteral("ISO-8859-1");
      NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
      return NS_OK;
    } 
    if(aKey.EqualsLiteral("x-sjis") ||
       aKey.EqualsLiteral("shift_jis")) {
-     oResult = NS_LITERAL_CSTRING("Shift_JIS");
+     oResult.AssignLiteral("Shift_JIS");
      NS_TIMELINE_STOP_TIMER("nsCharsetAlias2:GetPreferred");
      return NS_OK;
    } 
diff --git a/intl/uconv/src/nsMacCharset.cpp b/intl/uconv/src/nsMacCharset.cpp
index d15fb391eb29..49b44f5801de 100644
--- a/intl/uconv/src/nsMacCharset.cpp
+++ b/intl/uconv/src/nsMacCharset.cpp
@@ -86,10 +86,10 @@ nsresult nsPlatformCharset::MapToCharset(short script, short region, nsACString&
     case verUS:
     case verFrance:
     case verGermany:
-      outCharset.Assign(NS_LITERAL_CSTRING("x-mac-roman"));
+      outCharset.AssignLiteral("x-mac-roman");
       return NS_OK;
     case verJapan:
-      outCharset.Assign(NS_LITERAL_CSTRING("Shift_JIS"));
+      outCharset.AssignLiteral("Shift_JIS");
       return NS_OK;
   }
 
@@ -106,14 +106,14 @@ nsresult nsPlatformCharset::MapToCharset(short script, short region, nsACString&
   if (NS_SUCCEEDED(rv))
     CopyUCS2toASCII(uCharset, outCharset);
   else {
-    key.Assign(NS_LITERAL_STRING("script."));
+    key.AssignLiteral("script.");
     key.AppendInt(script, 10);
     rv = gInfo->Get(key, uCharset);
     // not found in the .property file, assign x-mac-roman
     if (NS_SUCCEEDED(rv))
       CopyUCS2toASCII(uCharset, outCharset);
     else {
-      outCharset.Assign(NS_LITERAL_CSTRING("x-mac-roman"));
+      outCharset.AssignLiteral("x-mac-roman");
     }
   }
   
@@ -135,7 +135,7 @@ nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector, nsACString& oResult
   switch (selector) {
 #ifdef XP_MACOSX  
     case kPlatformCharsetSel_FileName:
-      oResult.Assign(NS_LITERAL_CSTRING("UTF-8"));
+      oResult.AssignLiteral("UTF-8");
       break;
 #endif
     case  kPlatformCharsetSel_KeyboardInput:
@@ -169,7 +169,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
   }
 
   // fallback 
-  oResult.Assign(NS_LITERAL_CSTRING("x-mac-roman"));
+  oResult.AssignLiteral("x-mac-roman");
   return NS_SUCCESS_USING_FALLBACK_LOCALE;
 }
 
diff --git a/intl/uconv/src/nsOS2Charset.cpp b/intl/uconv/src/nsOS2Charset.cpp
index dc4127ca99a7..48fe00126328 100644
--- a/intl/uconv/src/nsOS2Charset.cpp
+++ b/intl/uconv/src/nsOS2Charset.cpp
@@ -99,26 +99,26 @@ nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsACString& outCharse
 {
   //delay loading os2charset.properties bundle if possible
   if (inANSICodePage.EqualsLiteral("os2.850")) {
-    outCharset = NS_LITERAL_CSTRING("IBM850");
+    outCharset.AssignLiteral("IBM850");
     return NS_OK;
   } 
 
   if (inANSICodePage.EqualsLiteral("os2.932")) {
-    outCharset = NS_LITERAL_CSTRING("Shift_JIS");
+    outCharset.AssignLiteral("Shift_JIS");
     return NS_OK;
   } 
 
   // ensure the .property file is loaded
   nsresult rv = InitInfo();
   if (NS_FAILED(rv)) {
-    outCharset.Assign(NS_LITERAL_CSTRING("IBM850"));
+    outCharset.AssignLiteral("IBM850");
     return rv;
   }
 
   nsAutoString charset;
   rv = gInfo->Get(inANSICodePage, charset);
   if (NS_FAILED(rv)) {
-    outCharset.Assign(NS_LITERAL_CSTRING("IBM850"));
+    outCharset.AssignLiteral("IBM850");
     return rv;
   }
 
@@ -132,15 +132,15 @@ nsPlatformCharset::GetCharset(nsPlatformCharsetSel selector,
 {
   if ((selector == kPlatformCharsetSel_4xBookmarkFile) || (selector == kPlatformCharsetSel_4xPrefsJS)) {
     if ((mCharset.Find("IBM850", IGNORE_CASE) != -1) || (mCharset.Find("IBM437", IGNORE_CASE) != -1)) 
-      oResult.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+      oResult.AssignLiteral("ISO-8859-1");
     else if (mCharset.Find("IBM852", IGNORE_CASE) != -1)
-      oResult.Assign(NS_LITERAL_CSTRING("windows-1250"));
+      oResult.AssignLiteral("windows-1250");
     else if ((mCharset.Find("IBM855", IGNORE_CASE) != -1) || (mCharset.Find("IBM866", IGNORE_CASE) != -1))
-      oResult.Assign(NS_LITERAL_CSTRING("windows-1251"));
+      oResult.AssignLiteral("windows-1251");
     else if ((mCharset.Find("IBM869", IGNORE_CASE) != -1) || (mCharset.Find("IBM813", IGNORE_CASE) != -1))
-      oResult.Assign(NS_LITERAL_CSTRING("windows-1253"));
+      oResult.AssignLiteral("windows-1253");
     else if (mCharset.Find("IBM857", IGNORE_CASE) != -1)
-      oResult.Assign(NS_LITERAL_CSTRING("windows-1254"));
+      oResult.AssignLiteral("windows-1254");
     else
       oResult = mCharset;
   } else {
diff --git a/intl/uconv/src/nsUNIXCharset.cpp b/intl/uconv/src/nsUNIXCharset.cpp
index 898038b32f24..7d8739f98495 100644
--- a/intl/uconv/src/nsUNIXCharset.cpp
+++ b/intl/uconv/src/nsUNIXCharset.cpp
@@ -106,9 +106,9 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale
   if (gInfo_deprecated && !(locale.IsEmpty())) {
     nsAutoString platformLocaleKey;
     // note: NS_LITERAL_STRING("locale." OSTYPE ".") does not compile on AIX
-    platformLocaleKey.Assign(NS_LITERAL_STRING("locale."));
+    platformLocaleKey.AssignLiteral("locale.");
     platformLocaleKey.AppendWithConversion(OSTYPE);
-    platformLocaleKey.Append(NS_LITERAL_STRING("."));
+    platformLocaleKey.AppendLiteral(".");
     platformLocaleKey.Append(locale);
 
     nsAutoString charset;
@@ -118,7 +118,7 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale
       return NS_OK;
     }
     nsAutoString localeKey;
-    localeKey.Assign(NS_LITERAL_STRING("locale.all."));
+    localeKey.AssignLiteral("locale.all.");
     localeKey.Append(locale);
     res = gInfo_deprecated->Get(localeKey, charset);
     if (NS_SUCCEEDED(res))  {
@@ -127,8 +127,8 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale
     }
    }
    NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
-   mCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
-   oResult.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+   mCharset.AssignLiteral("ISO-8859-1");
+   oResult.AssignLiteral("ISO-8859-1");
    return NS_SUCCESS_USING_FALLBACK_LOCALE;
 }
 
@@ -165,8 +165,8 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
   // 
   if (mLocale.Equals(localeName) ||
     // support the 4.x behavior
-    (mLocale.EqualsIgnoreCase("en_US") && 
-     localeName.Equals(NS_LITERAL_STRING("C"),nsCaseInsensitiveStringComparator()))) {
+    (mLocale.LowerCaseEqualsLiteral("en_us") && 
+     localeName.LowerCaseEqualsLiteral("c"))) {
     oResult = mCharset;
     return NS_OK;
   }
@@ -206,7 +206,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
     return res;
 
   NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
-  oResult.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+  oResult.AssignLiteral("ISO-8859-1");
   return NS_SUCCESS_USING_FALLBACK_LOCALE;
 }
 
@@ -240,9 +240,9 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
     if (!gNLInfo) {
       nsCAutoString propertyURL;
       // note: NS_LITERAL_STRING("resource:/res/unixcharset." OSARCH ".properties") does not compile on AIX
-      propertyURL.Assign(NS_LITERAL_CSTRING("resource://gre/res/unixcharset."));
+      propertyURL.AssignLiteral("resource://gre/res/unixcharset.");
       propertyURL.Append(OSARCH);
-      propertyURL.Append(NS_LITERAL_CSTRING(".properties"));
+      propertyURL.AppendLiteral(".properties");
       nsURLProperties *info;
       info = new nsURLProperties( propertyURL );
       NS_ASSERTION( info, "cannot create nsURLProperties");
@@ -270,9 +270,9 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
     //
     const char *glibc_version = gnu_get_libc_version();
     if ((glibc_version != nsnull) && (strlen(glibc_version))) {
-      localeKey.Assign(NS_LITERAL_STRING("nllic."));
+      localeKey.AssignLiteral("nllic.");
       localeKey.AppendWithConversion(glibc_version);
-      localeKey.Append(NS_LITERAL_STRING("."));
+      localeKey.AppendLiteral(".");
       localeKey.AppendWithConversion(nl_langinfo_codeset);
       nsAutoString uCharset;
       res = gNLInfo->Get(localeKey, uCharset);
@@ -290,7 +290,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
     //
     // look for a charset specific charset remap
     //
-    localeKey.Assign(NS_LITERAL_STRING("nllic."));
+    localeKey.AssignLiteral("nllic.");
     localeKey.AppendWithConversion(nl_langinfo_codeset);
     nsAutoString uCharset;
     res = gNLInfo->Get(localeKey, uCharset);
@@ -342,7 +342,7 @@ nsPlatformCharset::Init()
     if (NS_FAILED(res))
       return res;
   } else {
-    mLocale.Assign(NS_LITERAL_STRING("en-US"));
+    mLocale.AssignLiteral("en_US");
   }
 
   res = InitGetCharset(charset);
@@ -353,7 +353,7 @@ nsPlatformCharset::Init()
 
   // last resort fallback
   NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
-  mCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+  mCharset.AssignLiteral("ISO-8859-1");
   return NS_SUCCESS_USING_FALLBACK_LOCALE;
 }
 
diff --git a/intl/uconv/src/nsWinCharset.cpp b/intl/uconv/src/nsWinCharset.cpp
index a18c8aa2e442..aba1b5ba08af 100644
--- a/intl/uconv/src/nsWinCharset.cpp
+++ b/intl/uconv/src/nsWinCharset.cpp
@@ -94,26 +94,26 @@ nsPlatformCharset::MapToCharset(nsAString& inANSICodePage, nsACString& outCharse
 {
   //delay loading wincharset.properties bundle if possible
   if (inANSICodePage.EqualsLiteral("acp.1252")) {
-    outCharset = NS_LITERAL_CSTRING("windows-1252");
+    outCharset.AssignLiteral("windows-1252");
     return NS_OK;
   } 
 
   if (inANSICodePage.EqualsLiteral("acp.932")) {
-    outCharset = NS_LITERAL_CSTRING("Shift_JIS");
+    outCharset.AssignLiteral("Shift_JIS");
     return NS_OK;
   } 
 
   // ensure the .property file is loaded
   nsresult rv = InitInfo();
   if (NS_FAILED(rv)) {
-    outCharset.Assign(NS_LITERAL_CSTRING("windows-1252"));
+    outCharset.AssignLiteral("windows-1252");
     return rv;
   }
 
   nsAutoString charset;
   rv = gInfo->Get(inANSICodePage, charset);
   if (NS_FAILED(rv)) {
-    outCharset.Assign(NS_LITERAL_CSTRING("windows-1252"));
+    outCharset.AssignLiteral("windows-1252");
     return rv;
   }
 
diff --git a/intl/uconv/tests/TestUConv.cpp b/intl/uconv/tests/TestUConv.cpp
index a722e5f4d4f9..2d013014c9bb 100644
--- a/intl/uconv/tests/TestUConv.cpp
+++ b/intl/uconv/tests/TestUConv.cpp
@@ -410,22 +410,22 @@ nsresult nsTestUConv::DisplayCharsets()
     
     printf(" ");
 
-    prop.Assign(NS_LITERAL_STRING(".notForBrowser"));
+    prop.AssignLiteral(".notForBrowser");
     res = ccMan->GetCharsetData(charset->get(), prop.get(), str);
     if ((dec != NULL) && (NS_FAILED(res))) printf ("B"); 
     else printf("X");
 
-    prop.Assign(NS_LITERAL_STRING(".notForComposer"));
+    prop.AssignLiteral(".notForComposer");
     res = ccMan->GetCharsetData(charset->get(), prop.get(), str);
     if ((enc != NULL) && (NS_FAILED(res))) printf ("C"); 
     else printf("X");
 
-    prop.Assign(NS_LITERAL_STRING(".notForMailView"));
+    prop.AssignLiteral(".notForMailView");
     res = ccMan->GetCharsetData(charset->get(), prop.get(), str);
     if ((dec != NULL) && (NS_FAILED(res))) printf ("V"); 
     else printf("X");
 
-    prop.Assign(NS_LITERAL_STRING(".notForMailEdit"));
+    prop.AssignLiteral(".notForMailEdit");
     res = ccMan->GetCharsetData(charset->get(), prop.get(), str);
     if ((enc != NULL) && (NS_FAILED(res))) printf ("E"); 
     else printf("X");
diff --git a/intl/uconv/tests/plattest.cpp b/intl/uconv/tests/plattest.cpp
index 53d8345d0218..d549485c9af2 100644
--- a/intl/uconv/tests/plattest.cpp
+++ b/intl/uconv/tests/plattest.cpp
@@ -73,7 +73,7 @@ main(int argc, const char** argv)
 
     printf("DefaultCharset for %s is %s\n", NS_LossyConvertUTF16toASCII(category).get(), charset.get());
 
-    category.Assign(NS_LITERAL_STRING("en-US"));
+    category.AssignLiteral("en-US");
     rv = platform_charset->GetDefaultCharsetForLocale(category, charset);
     if (NS_FAILED(rv)) return -1;
 
diff --git a/js/src/xpconnect/src/xpcconvert.cpp b/js/src/xpconnect/src/xpcconvert.cpp
index 01fec4e99cdb..50ec27242e12 100644
--- a/js/src/xpconnect/src/xpcconvert.cpp
+++ b/js/src/xpconnect/src/xpcconvert.cpp
@@ -1385,7 +1385,7 @@ XPCConvert::JSErrorToXPCException(XPCCallContext& ccx,
         }
         else
         {
-            bestMessage = NS_LITERAL_STRING("JavaScript Error");
+            bestMessage.AssignLiteral("JavaScript Error");
         }
 
         data = new nsScriptError();
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index 812993d84e5b..4853a6c7befc 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -5594,7 +5594,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell*            aPresShell,
         if (aTag == nsXULAtoms::tooltip) {
           nsAutoString defaultTooltip;
           aContent->GetAttr(kNameSpaceID_None, nsXULAtoms::defaultz, defaultTooltip);
-          if (defaultTooltip.EqualsIgnoreCase("true")) {
+          if (defaultTooltip.LowerCaseEqualsLiteral("true")) {
             // Locate the root frame and tell it about the tooltip.
             nsIFrame* rootFrame = aState.mFrameManager->GetRootFrame();
             if (rootFrame)
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index c77c4b34d736..22be08450d94 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2378,7 +2378,7 @@ DocumentViewerImpl::GetDefaultCharacterSet(nsACString& aDefaultCharacterSet)
     if (!defCharset.IsEmpty())
       LossyCopyUTF16toASCII(defCharset, mDefaultCharacterSet);
     else
-      mDefaultCharacterSet.Assign(NS_LITERAL_CSTRING("ISO-8859-1"));
+      mDefaultCharacterSet.AssignLiteral("ISO-8859-1");
   }
   aDefaultCharacterSet = mDefaultCharacterSet;
   return NS_OK;
diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp
index 26a611377d8a..2b40df4bc209 100644
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -111,9 +111,9 @@ nsPresContext::PrefChangedCallback(const char* aPrefName, void* instance_data)
 static PRBool
 IsVisualCharset(const nsCAutoString& aCharset)
 {
-  if (aCharset.EqualsIgnoreCase("ibm864")             // Arabic//ahmed
-      || aCharset.EqualsIgnoreCase("ibm862")          // Hebrew
-      || aCharset.EqualsIgnoreCase("iso-8859-8") ) {  // Hebrew
+  if (aCharset.LowerCaseEqualsLiteral("ibm864")             // Arabic//ahmed
+      || aCharset.LowerCaseEqualsLiteral("ibm862")          // Hebrew
+      || aCharset.LowerCaseEqualsLiteral("iso-8859-8") ) {  // Hebrew
     return PR_TRUE; // visual text type
   }
   else {
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index c87e97b54e18..c01a766c7e85 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -2558,12 +2558,12 @@ nsresult PresShell::SetPrefFocusRules(void)
         ///////////////////////////////////////////////////////////////
         // - focus: '*:focus
         ColorToString(focusText,strColor);
-        strRule.Append(NS_LITERAL_STRING("*:focus,*:focus>font {color: "));
+        strRule.AppendLiteral("*:focus,*:focus>font {color: ");
         strRule.Append(strColor);
-        strRule.Append(NS_LITERAL_STRING(" !important; background-color: "));
+        strRule.AppendLiteral(" !important; background-color: ");
         ColorToString(focusBackground,strColor);
         strRule.Append(strColor);
-        strRule.Append(NS_LITERAL_STRING(" !important; } "));
+        strRule.AppendLiteral(" !important; } ");
         // insert the rules
         result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
       }
@@ -2574,26 +2574,26 @@ nsresult PresShell::SetPrefFocusRules(void)
         PRUint32 index = 0;
         nsAutoString strRule;
         if (!focusRingOnAnything)
-          strRule.Append(NS_LITERAL_STRING("*|*:link:focus, *|*:visited"));    // If we only want focus rings on the normal things like links
-        strRule.Append(NS_LITERAL_STRING(":focus {-moz-outline: "));     // For example 3px dotted WindowText (maximum 4)
+          strRule.AppendLiteral("*|*:link:focus, *|*:visited");    // If we only want focus rings on the normal things like links
+        strRule.AppendLiteral(":focus {-moz-outline: ");     // For example 3px dotted WindowText (maximum 4)
         strRule.AppendInt(focusRingWidth);
-        strRule.Append(NS_LITERAL_STRING("px dotted WindowText !important; } "));     // For example 3px dotted WindowText
+        strRule.AppendLiteral("px dotted WindowText !important; } ");     // For example 3px dotted WindowText
         // insert the rules
         result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
         NS_ENSURE_SUCCESS(result, result);
         if (focusRingWidth != 1) {
           // If the focus ring width is different from the default, fix buttons with rings
-          strRule.Assign(NS_LITERAL_STRING("button::-moz-focus-inner, input[type=\"reset\"]::-moz-focus-inner,"));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"button\"]::-moz-focus-inner, "));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"submit\"]::-moz-focus-inner { padding: 1px 2px 1px 2px; border: "));
+          strRule.AssignLiteral("button::-moz-focus-inner, input[type=\"reset\"]::-moz-focus-inner,");
+          strRule.AppendLiteral("input[type=\"button\"]::-moz-focus-inner, ");
+          strRule.AppendLiteral("input[type=\"submit\"]::-moz-focus-inner { padding: 1px 2px 1px 2px; border: ");
           strRule.AppendInt(focusRingWidth);
-          strRule.Append(NS_LITERAL_STRING("px dotted transparent !important; } "));
+          strRule.AppendLiteral("px dotted transparent !important; } ");
           result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
           NS_ENSURE_SUCCESS(result, result);
           
-          strRule.Assign(NS_LITERAL_STRING("button:focus::-moz-focus-inner, input[type=\"reset\"]:focus::-moz-focus-inner,"));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"button\"]:focus::-moz-focus-inner, input[type=\"submit\"]:focus::-moz-focus-inner {"));
-          strRule.Append(NS_LITERAL_STRING("border-color: ButtonText !important; }"));
+          strRule.AssignLiteral("button:focus::-moz-focus-inner, input[type=\"reset\"]:focus::-moz-focus-inner,");
+          strRule.AppendLiteral("input[type=\"button\"]:focus::-moz-focus-inner, input[type=\"submit\"]:focus::-moz-focus-inner {");
+          strRule.AppendLiteral("border-color: ButtonText !important; }");
           result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
         }
       }
@@ -4155,7 +4155,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll)
     
     // Scroll to the top/left if the anchor can not be
     // found and it is labelled top (quirks mode only). @see bug 80784
-    if ((NS_LossyConvertUCS2toASCII(aAnchorName).EqualsIgnoreCase("top")) &&
+    if ((NS_LossyConvertUCS2toASCII(aAnchorName).LowerCaseEqualsLiteral("top")) &&
         (mPresContext->CompatibilityMode() == eCompatibility_NavQuirks)) {
       rv = NS_OK;
       // Check |aScroll| after setting |rv| so we set |rv| to the same
diff --git a/layout/base/src/nsFrameUtil.cpp b/layout/base/src/nsFrameUtil.cpp
index 918edbc9c47e..0c3a41077ed9 100644
--- a/layout/base/src/nsFrameUtil.cpp
+++ b/layout/base/src/nsFrameUtil.cpp
@@ -477,7 +477,7 @@ nsFrameUtil::Tag::ToString(nsString& aResult)
       aResult.Append(PRUnichar(' '));
       aResult.AppendWithConversion(attributes[i]);
       if (values[i]) {
-        aResult.Append(NS_LITERAL_STRING("=\""));
+        aResult.AppendLiteral("=\"");
         aResult.AppendWithConversion(values[i]);
         aResult.Append(PRUnichar('\"'));
       }
diff --git a/layout/base/src/nsPresContext.cpp b/layout/base/src/nsPresContext.cpp
index 26a611377d8a..2b40df4bc209 100644
--- a/layout/base/src/nsPresContext.cpp
+++ b/layout/base/src/nsPresContext.cpp
@@ -111,9 +111,9 @@ nsPresContext::PrefChangedCallback(const char* aPrefName, void* instance_data)
 static PRBool
 IsVisualCharset(const nsCAutoString& aCharset)
 {
-  if (aCharset.EqualsIgnoreCase("ibm864")             // Arabic//ahmed
-      || aCharset.EqualsIgnoreCase("ibm862")          // Hebrew
-      || aCharset.EqualsIgnoreCase("iso-8859-8") ) {  // Hebrew
+  if (aCharset.LowerCaseEqualsLiteral("ibm864")             // Arabic//ahmed
+      || aCharset.LowerCaseEqualsLiteral("ibm862")          // Hebrew
+      || aCharset.LowerCaseEqualsLiteral("iso-8859-8") ) {  // Hebrew
     return PR_TRUE; // visual text type
   }
   else {
diff --git a/layout/forms/nsIsIndexFrame.cpp b/layout/forms/nsIsIndexFrame.cpp
index 776db713ee1a..0559a9bd48ff 100644
--- a/layout/forms/nsIsIndexFrame.cpp
+++ b/layout/forms/nsIsIndexFrame.cpp
@@ -496,7 +496,7 @@ nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext)
 
 void nsIsIndexFrame::GetSubmitCharset(nsCString& oCharset)
 {
-  oCharset.Assign(NS_LITERAL_CSTRING("UTF-8")); // default to utf-8
+  oCharset.AssignLiteral("UTF-8"); // default to utf-8
   // XXX
   // We may want to get it from the HTML 4 Accept-Charset attribute first
   // see 17.3 The FORM element in HTML 4 for details
diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h
index dc1ad59ab2ad..240c62d05790 100644
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -114,7 +114,7 @@ public:
 #ifdef NS_DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const
   {
-    aResult = NS_LITERAL_STRING("nsTextControlFrame");
+    aResult.AssignLiteral("nsTextControlFrame");
     return NS_OK;
   }
 #endif
diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp
index 08fc15d095ee..bfaac62bfe4f 100644
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -922,7 +922,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsFloatCache* aFloatCache,
             if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::align, value)) {
               // we're interested only if previous frame is align=left
               // IE messes things up when "right" (overlapping frames) 
-              if (value.EqualsIgnoreCase("left")) {
+              if (value.LowerCaseEqualsLiteral("left")) {
                 keepFloatOnSameLine = PR_TRUE;
                 // don't advance to next line (IE quirkie behaviour)
                 // it breaks rule CSS2/9.5.1/1, but what the hell
diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp
index 4895b8f000c6..9db8c2117119 100644
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -277,7 +277,7 @@ nsBulletFrame::Paint(nsIPresContext*      aPresContext,
 
         if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
           text.Cut(0, 1);
-          text.Append(NS_LITERAL_STRING("."));
+          text.AppendLiteral(".");
         }
         break;
       }
@@ -1124,7 +1124,7 @@ nsBulletFrame::GetListItemText(nsIPresContext* aCX,
   // XXX For some of these systems, "." is wrong!  This should really be
   // pushed down into the individual cases!
   if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
-    result.Append(NS_LITERAL_STRING("."));
+    result.AppendLiteral(".");
   }
 #endif // IBMBIDI
 
@@ -1346,7 +1346,7 @@ nsBulletFrame::GetListItemText(nsIPresContext* aCX,
 #ifdef IBMBIDI
   if (NS_STYLE_DIRECTION_RTL != vis->mDirection)
 #endif // IBMBIDI
-  result.Append(NS_LITERAL_STRING("."));
+  result.AppendLiteral(".");
   return success;
 }
 
diff --git a/layout/generic/nsDummyLayoutRequest.h b/layout/generic/nsDummyLayoutRequest.h
index f39fb65122ad..b9b5e34ba79b 100644
--- a/layout/generic/nsDummyLayoutRequest.h
+++ b/layout/generic/nsDummyLayoutRequest.h
@@ -72,7 +72,7 @@ public:
 
 	// nsIRequest
   NS_IMETHOD GetName(nsACString &result) { 
-    result = NS_LITERAL_CSTRING("about:layout-dummy-request");
+    result.AssignLiteral("about:layout-dummy-request");
     return NS_OK;
   }
   NS_IMETHOD IsPending(PRBool *_retval) { *_retval = PR_TRUE; return NS_OK; }
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index f0d293775571..486446ca466a 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1310,7 +1310,7 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
               nsAutoString type;
               rv = inputElement->GetType(type);
               if (NS_SUCCEEDED(rv) &&
-                  type.Equals(NS_LITERAL_STRING("image"), nsCaseInsensitiveStringComparator()))
+                  type.LowerCaseEqualsLiteral("image"))
                 inputElement->GetSrc(href);
             } else {
               // XLink ?
diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp
index e3f2882dfea1..e1f2cc95347c 100644
--- a/layout/generic/nsFrameFrame.cpp
+++ b/layout/generic/nsFrameFrame.cpp
@@ -502,7 +502,7 @@ nsSubDocumentFrame::AttributeChanged(nsIPresContext* aPresContext,
         parentAsItem->GetItemType(&parentType);
         PRBool is_primary_content =
           parentType == nsIDocShellTreeItem::typeChrome &&
-          value.EqualsIgnoreCase("content-primary");
+          value.LowerCaseEqualsLiteral("content-primary");
 
         parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,
                                            value.get());
diff --git a/layout/generic/nsFrameUtil.cpp b/layout/generic/nsFrameUtil.cpp
index 918edbc9c47e..0c3a41077ed9 100644
--- a/layout/generic/nsFrameUtil.cpp
+++ b/layout/generic/nsFrameUtil.cpp
@@ -477,7 +477,7 @@ nsFrameUtil::Tag::ToString(nsString& aResult)
       aResult.Append(PRUnichar(' '));
       aResult.AppendWithConversion(attributes[i]);
       if (values[i]) {
-        aResult.Append(NS_LITERAL_STRING("=\""));
+        aResult.AppendLiteral("=\"");
         aResult.AppendWithConversion(values[i]);
         aResult.Append(PRUnichar('\"'));
       }
diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp
index 857cafeda024..a4a592b46a5d 100644
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -705,7 +705,7 @@ void nsGfxScrollFrameInner::ReloadChildFrames()
           if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None,
                                                             nsXULAtoms::orient, value)) {
             // probably a scrollbar then
-            if (value.EqualsIgnoreCase("horizontal")) {
+            if (value.LowerCaseEqualsLiteral("horizontal")) {
               NS_ASSERTION(!mHScrollbarBox, "Found multiple horizontal scrollbars?");
               mHScrollbarBox = box;
             } else {
diff --git a/layout/generic/nsImageMap.cpp b/layout/generic/nsImageMap.cpp
index af0a660d75d6..8a7d80949191 100644
--- a/layout/generic/nsImageMap.cpp
+++ b/layout/generic/nsImageMap.cpp
@@ -862,19 +862,19 @@ nsImageMap::AddArea(nsIContent* aArea)
 
   Area* area;
   if (shape.IsEmpty() ||
-      shape.EqualsIgnoreCase("rect") ||
-      shape.EqualsIgnoreCase("rectangle")) {
+      shape.LowerCaseEqualsLiteral("rect") ||
+      shape.LowerCaseEqualsLiteral("rectangle")) {
     area = new RectArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("poly") ||
-           shape.EqualsIgnoreCase("polygon")) {
+  else if (shape.LowerCaseEqualsLiteral("poly") ||
+           shape.LowerCaseEqualsLiteral("polygon")) {
     area = new PolyArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("circle") ||
-           shape.EqualsIgnoreCase("circ")) {
+  else if (shape.LowerCaseEqualsLiteral("circle") ||
+           shape.LowerCaseEqualsLiteral("circ")) {
     area = new CircleArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("default")) {
+  else if (shape.LowerCaseEqualsLiteral("default")) {
     area = new DefaultArea(aArea);
   }
   else {
diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp
index 06ab5b59a69f..fece08bd3b6e 100644
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -1390,12 +1390,9 @@ nsObjectFrame::IsHidden(PRBool aCheckVisibilityStyle) const
     // widget in layout. See bug 188959.
     if (NS_CONTENT_ATTR_NOT_THERE != result &&
        (hidden.IsEmpty() ||
-        !hidden.Equals(NS_LITERAL_STRING("false"),
-                       nsCaseInsensitiveStringComparator()) &&
-        !hidden.Equals(NS_LITERAL_STRING("no"),
-                       nsCaseInsensitiveStringComparator()) &&
-        !hidden.Equals(NS_LITERAL_STRING("off"),
-                       nsCaseInsensitiveStringComparator()))) {
+        !hidden.LowerCaseEqualsLiteral("false") &&
+        !hidden.LowerCaseEqualsLiteral("no") &&
+        !hidden.LowerCaseEqualsLiteral("off"))) {
       return PR_TRUE;
     }
   }
@@ -2813,8 +2810,8 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetMayScript(PRBool *result)
 // |value| for certain inputs of |name|
 void nsObjectFrame::FixUpURLS(const nsString &name, nsAString &value)
 {
-  if (name.EqualsIgnoreCase("PLUGINURL") ||
-      name.EqualsIgnoreCase("PLUGINSPAGE")) {        
+  if (name.LowerCaseEqualsLiteral("pluginurl") ||
+      name.LowerCaseEqualsLiteral("pluginspage")) {        
     
     nsCOMPtr baseURI = mContent->GetBaseURI();
     nsAutoString newURL;
diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp
index e49de94109e4..58ab506df1b5 100644
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -512,7 +512,7 @@ nsPageFrame::DrawHeaderFooter(nsIPresContext*      aPresContext,
                                 PRInt32(contentWidth), indx, textWidth)) {
       if (indx < len-1 && len > 3) {
         str.SetLength(indx-3);
-        str.Append(NS_LITERAL_STRING("..."));
+        str.AppendLiteral("...");
       }
     } else { 
       return; // bail if couldn't find the correct length
diff --git a/layout/generic/nsSimplePageSequence.cpp b/layout/generic/nsSimplePageSequence.cpp
index 3fab24094fab..dba058e267e0 100644
--- a/layout/generic/nsSimplePageSequence.cpp
+++ b/layout/generic/nsSimplePageSequence.cpp
@@ -730,7 +730,7 @@ nsSimplePageSequenceFrame::StartPrint(nsIPresContext*   aPresContext,
   nsAutoString fontName;
   rv = nsFormControlHelper::GetLocalizedString(PRINTING_PROPERTIES, NS_LITERAL_STRING("fontname").get(), fontName);
   if (NS_FAILED(rv)) {
-    fontName.Assign(NS_LITERAL_STRING("serif"));
+    fontName.AssignLiteral("serif");
   }
 
   nsAutoString fontSizeStr;
diff --git a/layout/generic/nsSpacerFrame.cpp b/layout/generic/nsSpacerFrame.cpp
index 5c4b5316c9e6..c13e99238359 100644
--- a/layout/generic/nsSpacerFrame.cpp
+++ b/layout/generic/nsSpacerFrame.cpp
@@ -173,12 +173,12 @@ SpacerFrame::GetType()
   nsAutoString value;
   if (NS_CONTENT_ATTR_HAS_VALUE ==
       mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, value)) {
-    if (value.EqualsIgnoreCase("line") ||
-        value.EqualsIgnoreCase("vert") ||
-        value.EqualsIgnoreCase("vertical")) {
+    if (value.LowerCaseEqualsLiteral("line") ||
+        value.LowerCaseEqualsLiteral("vert") ||
+        value.LowerCaseEqualsLiteral("vertical")) {
       return TYPE_LINE;
     }
-    if (value.EqualsIgnoreCase("block")) {
+    if (value.LowerCaseEqualsLiteral("block")) {
       return TYPE_IMAGE;
     }
   }
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 77638042f7bb..b91025e89cfd 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5792,13 +5792,13 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const
   while (fragOffset < n) {
     PRUnichar ch = frag->CharAt(fragOffset++);
     if (ch == '\r') {
-      aBuf.Append(NS_LITERAL_STRING("\\r"));
+      aBuf.AppendLiteral("\\r");
     } else if (ch == '\n') {
-      aBuf.Append(NS_LITERAL_STRING("\\n"));
+      aBuf.AppendLiteral("\\n");
     } else if (ch == '\t') {
-      aBuf.Append(NS_LITERAL_STRING("\\t"));
+      aBuf.AppendLiteral("\\t");
     } else if ((ch < ' ') || (ch >= 127)) {
-      aBuf.Append(NS_LITERAL_STRING("\\0"));
+      aBuf.AppendLiteral("\\0");
       aBuf.AppendInt((PRInt32)ch, 8);
     } else {
       aBuf.Append(ch);
diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp
index 08fc15d095ee..bfaac62bfe4f 100644
--- a/layout/html/base/src/nsBlockReflowState.cpp
+++ b/layout/html/base/src/nsBlockReflowState.cpp
@@ -922,7 +922,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsFloatCache* aFloatCache,
             if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::align, value)) {
               // we're interested only if previous frame is align=left
               // IE messes things up when "right" (overlapping frames) 
-              if (value.EqualsIgnoreCase("left")) {
+              if (value.LowerCaseEqualsLiteral("left")) {
                 keepFloatOnSameLine = PR_TRUE;
                 // don't advance to next line (IE quirkie behaviour)
                 // it breaks rule CSS2/9.5.1/1, but what the hell
diff --git a/layout/html/base/src/nsBulletFrame.cpp b/layout/html/base/src/nsBulletFrame.cpp
index 4895b8f000c6..9db8c2117119 100644
--- a/layout/html/base/src/nsBulletFrame.cpp
+++ b/layout/html/base/src/nsBulletFrame.cpp
@@ -277,7 +277,7 @@ nsBulletFrame::Paint(nsIPresContext*      aPresContext,
 
         if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
           text.Cut(0, 1);
-          text.Append(NS_LITERAL_STRING("."));
+          text.AppendLiteral(".");
         }
         break;
       }
@@ -1124,7 +1124,7 @@ nsBulletFrame::GetListItemText(nsIPresContext* aCX,
   // XXX For some of these systems, "." is wrong!  This should really be
   // pushed down into the individual cases!
   if (NS_STYLE_DIRECTION_RTL == vis->mDirection) {
-    result.Append(NS_LITERAL_STRING("."));
+    result.AppendLiteral(".");
   }
 #endif // IBMBIDI
 
@@ -1346,7 +1346,7 @@ nsBulletFrame::GetListItemText(nsIPresContext* aCX,
 #ifdef IBMBIDI
   if (NS_STYLE_DIRECTION_RTL != vis->mDirection)
 #endif // IBMBIDI
-  result.Append(NS_LITERAL_STRING("."));
+  result.AppendLiteral(".");
   return success;
 }
 
diff --git a/layout/html/base/src/nsDummyLayoutRequest.h b/layout/html/base/src/nsDummyLayoutRequest.h
index f39fb65122ad..b9b5e34ba79b 100644
--- a/layout/html/base/src/nsDummyLayoutRequest.h
+++ b/layout/html/base/src/nsDummyLayoutRequest.h
@@ -72,7 +72,7 @@ public:
 
 	// nsIRequest
   NS_IMETHOD GetName(nsACString &result) { 
-    result = NS_LITERAL_CSTRING("about:layout-dummy-request");
+    result.AssignLiteral("about:layout-dummy-request");
     return NS_OK;
   }
   NS_IMETHOD IsPending(PRBool *_retval) { *_retval = PR_TRUE; return NS_OK; }
diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp
index f0d293775571..486446ca466a 100644
--- a/layout/html/base/src/nsFrame.cpp
+++ b/layout/html/base/src/nsFrame.cpp
@@ -1310,7 +1310,7 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
               nsAutoString type;
               rv = inputElement->GetType(type);
               if (NS_SUCCEEDED(rv) &&
-                  type.Equals(NS_LITERAL_STRING("image"), nsCaseInsensitiveStringComparator()))
+                  type.LowerCaseEqualsLiteral("image"))
                 inputElement->GetSrc(href);
             } else {
               // XLink ?
diff --git a/layout/html/base/src/nsGfxScrollFrame.cpp b/layout/html/base/src/nsGfxScrollFrame.cpp
index 857cafeda024..a4a592b46a5d 100644
--- a/layout/html/base/src/nsGfxScrollFrame.cpp
+++ b/layout/html/base/src/nsGfxScrollFrame.cpp
@@ -705,7 +705,7 @@ void nsGfxScrollFrameInner::ReloadChildFrames()
           if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None,
                                                             nsXULAtoms::orient, value)) {
             // probably a scrollbar then
-            if (value.EqualsIgnoreCase("horizontal")) {
+            if (value.LowerCaseEqualsLiteral("horizontal")) {
               NS_ASSERTION(!mHScrollbarBox, "Found multiple horizontal scrollbars?");
               mHScrollbarBox = box;
             } else {
diff --git a/layout/html/base/src/nsImageMap.cpp b/layout/html/base/src/nsImageMap.cpp
index af0a660d75d6..8a7d80949191 100644
--- a/layout/html/base/src/nsImageMap.cpp
+++ b/layout/html/base/src/nsImageMap.cpp
@@ -862,19 +862,19 @@ nsImageMap::AddArea(nsIContent* aArea)
 
   Area* area;
   if (shape.IsEmpty() ||
-      shape.EqualsIgnoreCase("rect") ||
-      shape.EqualsIgnoreCase("rectangle")) {
+      shape.LowerCaseEqualsLiteral("rect") ||
+      shape.LowerCaseEqualsLiteral("rectangle")) {
     area = new RectArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("poly") ||
-           shape.EqualsIgnoreCase("polygon")) {
+  else if (shape.LowerCaseEqualsLiteral("poly") ||
+           shape.LowerCaseEqualsLiteral("polygon")) {
     area = new PolyArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("circle") ||
-           shape.EqualsIgnoreCase("circ")) {
+  else if (shape.LowerCaseEqualsLiteral("circle") ||
+           shape.LowerCaseEqualsLiteral("circ")) {
     area = new CircleArea(aArea);
   }
-  else if (shape.EqualsIgnoreCase("default")) {
+  else if (shape.LowerCaseEqualsLiteral("default")) {
     area = new DefaultArea(aArea);
   }
   else {
diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp
index 06ab5b59a69f..fece08bd3b6e 100644
--- a/layout/html/base/src/nsObjectFrame.cpp
+++ b/layout/html/base/src/nsObjectFrame.cpp
@@ -1390,12 +1390,9 @@ nsObjectFrame::IsHidden(PRBool aCheckVisibilityStyle) const
     // widget in layout. See bug 188959.
     if (NS_CONTENT_ATTR_NOT_THERE != result &&
        (hidden.IsEmpty() ||
-        !hidden.Equals(NS_LITERAL_STRING("false"),
-                       nsCaseInsensitiveStringComparator()) &&
-        !hidden.Equals(NS_LITERAL_STRING("no"),
-                       nsCaseInsensitiveStringComparator()) &&
-        !hidden.Equals(NS_LITERAL_STRING("off"),
-                       nsCaseInsensitiveStringComparator()))) {
+        !hidden.LowerCaseEqualsLiteral("false") &&
+        !hidden.LowerCaseEqualsLiteral("no") &&
+        !hidden.LowerCaseEqualsLiteral("off"))) {
       return PR_TRUE;
     }
   }
@@ -2813,8 +2810,8 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetMayScript(PRBool *result)
 // |value| for certain inputs of |name|
 void nsObjectFrame::FixUpURLS(const nsString &name, nsAString &value)
 {
-  if (name.EqualsIgnoreCase("PLUGINURL") ||
-      name.EqualsIgnoreCase("PLUGINSPAGE")) {        
+  if (name.LowerCaseEqualsLiteral("pluginurl") ||
+      name.LowerCaseEqualsLiteral("pluginspage")) {        
     
     nsCOMPtr baseURI = mContent->GetBaseURI();
     nsAutoString newURL;
diff --git a/layout/html/base/src/nsPageFrame.cpp b/layout/html/base/src/nsPageFrame.cpp
index e49de94109e4..58ab506df1b5 100644
--- a/layout/html/base/src/nsPageFrame.cpp
+++ b/layout/html/base/src/nsPageFrame.cpp
@@ -512,7 +512,7 @@ nsPageFrame::DrawHeaderFooter(nsIPresContext*      aPresContext,
                                 PRInt32(contentWidth), indx, textWidth)) {
       if (indx < len-1 && len > 3) {
         str.SetLength(indx-3);
-        str.Append(NS_LITERAL_STRING("..."));
+        str.AppendLiteral("...");
       }
     } else { 
       return; // bail if couldn't find the correct length
diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp
index c87e97b54e18..c01a766c7e85 100644
--- a/layout/html/base/src/nsPresShell.cpp
+++ b/layout/html/base/src/nsPresShell.cpp
@@ -2558,12 +2558,12 @@ nsresult PresShell::SetPrefFocusRules(void)
         ///////////////////////////////////////////////////////////////
         // - focus: '*:focus
         ColorToString(focusText,strColor);
-        strRule.Append(NS_LITERAL_STRING("*:focus,*:focus>font {color: "));
+        strRule.AppendLiteral("*:focus,*:focus>font {color: ");
         strRule.Append(strColor);
-        strRule.Append(NS_LITERAL_STRING(" !important; background-color: "));
+        strRule.AppendLiteral(" !important; background-color: ");
         ColorToString(focusBackground,strColor);
         strRule.Append(strColor);
-        strRule.Append(NS_LITERAL_STRING(" !important; } "));
+        strRule.AppendLiteral(" !important; } ");
         // insert the rules
         result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
       }
@@ -2574,26 +2574,26 @@ nsresult PresShell::SetPrefFocusRules(void)
         PRUint32 index = 0;
         nsAutoString strRule;
         if (!focusRingOnAnything)
-          strRule.Append(NS_LITERAL_STRING("*|*:link:focus, *|*:visited"));    // If we only want focus rings on the normal things like links
-        strRule.Append(NS_LITERAL_STRING(":focus {-moz-outline: "));     // For example 3px dotted WindowText (maximum 4)
+          strRule.AppendLiteral("*|*:link:focus, *|*:visited");    // If we only want focus rings on the normal things like links
+        strRule.AppendLiteral(":focus {-moz-outline: ");     // For example 3px dotted WindowText (maximum 4)
         strRule.AppendInt(focusRingWidth);
-        strRule.Append(NS_LITERAL_STRING("px dotted WindowText !important; } "));     // For example 3px dotted WindowText
+        strRule.AppendLiteral("px dotted WindowText !important; } ");     // For example 3px dotted WindowText
         // insert the rules
         result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
         NS_ENSURE_SUCCESS(result, result);
         if (focusRingWidth != 1) {
           // If the focus ring width is different from the default, fix buttons with rings
-          strRule.Assign(NS_LITERAL_STRING("button::-moz-focus-inner, input[type=\"reset\"]::-moz-focus-inner,"));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"button\"]::-moz-focus-inner, "));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"submit\"]::-moz-focus-inner { padding: 1px 2px 1px 2px; border: "));
+          strRule.AssignLiteral("button::-moz-focus-inner, input[type=\"reset\"]::-moz-focus-inner,");
+          strRule.AppendLiteral("input[type=\"button\"]::-moz-focus-inner, ");
+          strRule.AppendLiteral("input[type=\"submit\"]::-moz-focus-inner { padding: 1px 2px 1px 2px; border: ");
           strRule.AppendInt(focusRingWidth);
-          strRule.Append(NS_LITERAL_STRING("px dotted transparent !important; } "));
+          strRule.AppendLiteral("px dotted transparent !important; } ");
           result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
           NS_ENSURE_SUCCESS(result, result);
           
-          strRule.Assign(NS_LITERAL_STRING("button:focus::-moz-focus-inner, input[type=\"reset\"]:focus::-moz-focus-inner,"));
-          strRule.Append(NS_LITERAL_STRING("input[type=\"button\"]:focus::-moz-focus-inner, input[type=\"submit\"]:focus::-moz-focus-inner {"));
-          strRule.Append(NS_LITERAL_STRING("border-color: ButtonText !important; }"));
+          strRule.AssignLiteral("button:focus::-moz-focus-inner, input[type=\"reset\"]:focus::-moz-focus-inner,");
+          strRule.AppendLiteral("input[type=\"button\"]:focus::-moz-focus-inner, input[type=\"submit\"]:focus::-moz-focus-inner {");
+          strRule.AppendLiteral("border-color: ButtonText !important; }");
           result = sheet->InsertRule(strRule, sInsertPrefSheetRulesAt, &index);
         }
       }
@@ -4155,7 +4155,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll)
     
     // Scroll to the top/left if the anchor can not be
     // found and it is labelled top (quirks mode only). @see bug 80784
-    if ((NS_LossyConvertUCS2toASCII(aAnchorName).EqualsIgnoreCase("top")) &&
+    if ((NS_LossyConvertUCS2toASCII(aAnchorName).LowerCaseEqualsLiteral("top")) &&
         (mPresContext->CompatibilityMode() == eCompatibility_NavQuirks)) {
       rv = NS_OK;
       // Check |aScroll| after setting |rv| so we set |rv| to the same
diff --git a/layout/html/base/src/nsSimplePageSequence.cpp b/layout/html/base/src/nsSimplePageSequence.cpp
index 3fab24094fab..dba058e267e0 100644
--- a/layout/html/base/src/nsSimplePageSequence.cpp
+++ b/layout/html/base/src/nsSimplePageSequence.cpp
@@ -730,7 +730,7 @@ nsSimplePageSequenceFrame::StartPrint(nsIPresContext*   aPresContext,
   nsAutoString fontName;
   rv = nsFormControlHelper::GetLocalizedString(PRINTING_PROPERTIES, NS_LITERAL_STRING("fontname").get(), fontName);
   if (NS_FAILED(rv)) {
-    fontName.Assign(NS_LITERAL_STRING("serif"));
+    fontName.AssignLiteral("serif");
   }
 
   nsAutoString fontSizeStr;
diff --git a/layout/html/base/src/nsSpacerFrame.cpp b/layout/html/base/src/nsSpacerFrame.cpp
index 5c4b5316c9e6..c13e99238359 100644
--- a/layout/html/base/src/nsSpacerFrame.cpp
+++ b/layout/html/base/src/nsSpacerFrame.cpp
@@ -173,12 +173,12 @@ SpacerFrame::GetType()
   nsAutoString value;
   if (NS_CONTENT_ATTR_HAS_VALUE ==
       mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, value)) {
-    if (value.EqualsIgnoreCase("line") ||
-        value.EqualsIgnoreCase("vert") ||
-        value.EqualsIgnoreCase("vertical")) {
+    if (value.LowerCaseEqualsLiteral("line") ||
+        value.LowerCaseEqualsLiteral("vert") ||
+        value.LowerCaseEqualsLiteral("vertical")) {
       return TYPE_LINE;
     }
-    if (value.EqualsIgnoreCase("block")) {
+    if (value.LowerCaseEqualsLiteral("block")) {
       return TYPE_IMAGE;
     }
   }
diff --git a/layout/html/base/src/nsTextFrame.cpp b/layout/html/base/src/nsTextFrame.cpp
index 77638042f7bb..b91025e89cfd 100644
--- a/layout/html/base/src/nsTextFrame.cpp
+++ b/layout/html/base/src/nsTextFrame.cpp
@@ -5792,13 +5792,13 @@ nsTextFrame::ToCString(nsString& aBuf, PRInt32* aTotalContentLength) const
   while (fragOffset < n) {
     PRUnichar ch = frag->CharAt(fragOffset++);
     if (ch == '\r') {
-      aBuf.Append(NS_LITERAL_STRING("\\r"));
+      aBuf.AppendLiteral("\\r");
     } else if (ch == '\n') {
-      aBuf.Append(NS_LITERAL_STRING("\\n"));
+      aBuf.AppendLiteral("\\n");
     } else if (ch == '\t') {
-      aBuf.Append(NS_LITERAL_STRING("\\t"));
+      aBuf.AppendLiteral("\\t");
     } else if ((ch < ' ') || (ch >= 127)) {
-      aBuf.Append(NS_LITERAL_STRING("\\0"));
+      aBuf.AppendLiteral("\\0");
       aBuf.AppendInt((PRInt32)ch, 8);
     } else {
       aBuf.Append(ch);
diff --git a/layout/html/document/src/nsFrameFrame.cpp b/layout/html/document/src/nsFrameFrame.cpp
index e3f2882dfea1..e1f2cc95347c 100644
--- a/layout/html/document/src/nsFrameFrame.cpp
+++ b/layout/html/document/src/nsFrameFrame.cpp
@@ -502,7 +502,7 @@ nsSubDocumentFrame::AttributeChanged(nsIPresContext* aPresContext,
         parentAsItem->GetItemType(&parentType);
         PRBool is_primary_content =
           parentType == nsIDocShellTreeItem::typeChrome &&
-          value.EqualsIgnoreCase("content-primary");
+          value.LowerCaseEqualsLiteral("content-primary");
 
         parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,
                                            value.get());
diff --git a/layout/html/forms/src/nsIsIndexFrame.cpp b/layout/html/forms/src/nsIsIndexFrame.cpp
index 776db713ee1a..0559a9bd48ff 100644
--- a/layout/html/forms/src/nsIsIndexFrame.cpp
+++ b/layout/html/forms/src/nsIsIndexFrame.cpp
@@ -496,7 +496,7 @@ nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext)
 
 void nsIsIndexFrame::GetSubmitCharset(nsCString& oCharset)
 {
-  oCharset.Assign(NS_LITERAL_CSTRING("UTF-8")); // default to utf-8
+  oCharset.AssignLiteral("UTF-8"); // default to utf-8
   // XXX
   // We may want to get it from the HTML 4 Accept-Charset attribute first
   // see 17.3 The FORM element in HTML 4 for details
diff --git a/layout/html/forms/src/nsTextControlFrame.h b/layout/html/forms/src/nsTextControlFrame.h
index dc1ad59ab2ad..240c62d05790 100644
--- a/layout/html/forms/src/nsTextControlFrame.h
+++ b/layout/html/forms/src/nsTextControlFrame.h
@@ -114,7 +114,7 @@ public:
 #ifdef NS_DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const
   {
-    aResult = NS_LITERAL_STRING("nsTextControlFrame");
+    aResult.AssignLiteral("nsTextControlFrame");
     return NS_OK;
   }
 #endif
diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp
index 812993d84e5b..4853a6c7befc 100644
--- a/layout/html/style/src/nsCSSFrameConstructor.cpp
+++ b/layout/html/style/src/nsCSSFrameConstructor.cpp
@@ -5594,7 +5594,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell*            aPresShell,
         if (aTag == nsXULAtoms::tooltip) {
           nsAutoString defaultTooltip;
           aContent->GetAttr(kNameSpaceID_None, nsXULAtoms::defaultz, defaultTooltip);
-          if (defaultTooltip.EqualsIgnoreCase("true")) {
+          if (defaultTooltip.LowerCaseEqualsLiteral("true")) {
             // Locate the root frame and tell it about the tooltip.
             nsIFrame* rootFrame = aState.mFrameManager->GetRootFrame();
             if (rootFrame)
diff --git a/layout/html/tests/TestAttributes.cpp b/layout/html/tests/TestAttributes.cpp
index c5247fe87da9..7fb3bc38f096 100644
--- a/layout/html/tests/TestAttributes.cpp
+++ b/layout/html/tests/TestAttributes.cpp
@@ -141,19 +141,19 @@ void testStrings(nsIDocument* aDoc) {
     printf("test 3 failed\n");
   }
   // EqualsIgnoreCase
-  val = (NS_ConvertASCIItoUCS2("mrString")).EqualsIgnoreCase("mrString");
+  val = (NS_ConvertASCIItoUCS2("mrString")).LowerCaseEqualsLiteral("mrstring");
   if (PR_TRUE != val) {
     printf("test 4 failed\n");
   }
-  val = (NS_ConvertASCIItoUCS2("mrString")).EqualsIgnoreCase("mrStrinG");
+  val = (NS_ConvertASCIItoUCS2("mrString")).LowerCaseEqualsLiteral("mrstring");
   if (PR_TRUE != val) {
     printf("test 5 failed\n");
   }
-  val = (NS_ConvertASCIItoUCS2("mrString")).EqualsIgnoreCase("mrStri");
+  val = (NS_ConvertASCIItoUCS2("mrString")).LowerCaseEqualsLiteral("mrstri");
   if (PR_FALSE != val) {
     printf("test 6 failed\n");
   }
-  val = (NS_ConvertASCIItoUCS2("mrStri")).EqualsIgnoreCase("mrString");
+  val = (NS_ConvertASCIItoUCS2("mrStri")).LowerCaseEqualsLiteral("mrstring");
   if (PR_FALSE != val) {
     printf("test 7 failed\n");
   }
diff --git a/layout/mathml/base/src/nsMathMLChar.cpp b/layout/mathml/base/src/nsMathMLChar.cpp
index c7f1f3a7429e..638386f0da45 100644
--- a/layout/mathml/base/src/nsMathMLChar.cpp
+++ b/layout/mathml/base/src/nsMathMLChar.cpp
@@ -210,10 +210,10 @@ LoadProperties(const nsString& aName,
                nsCOMPtr& aProperties)
 {
   nsAutoString uriStr;
-  uriStr.Assign(NS_LITERAL_STRING("resource://gre/res/fonts/mathfont"));
+  uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
   uriStr.Append(aName);
   uriStr.StripWhitespace(); // that may come from aName
-  uriStr.Append(NS_LITERAL_STRING(".properties"));
+  uriStr.AppendLiteral(".properties");
   return NS_LoadPersistentPropertiesFromURISpec(getter_AddRefs(aProperties), 
                                                 NS_ConvertUTF16toUTF8(uriStr));
 }
@@ -375,10 +375,10 @@ nsGlyphTable::ElementAt(nsIPresContext* aPresContext, nsMathMLChar* aChar, PRUin
     nsresult rv = LoadProperties(*mFontName[0], mGlyphProperties);
 #ifdef NS_DEBUG
     nsCAutoString uriStr;
-    uriStr.Assign(NS_LITERAL_CSTRING("resource://gre/res/fonts/mathfont"));
+    uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
     LossyAppendUTF16toASCII(*mFontName[0], uriStr);
     uriStr.StripWhitespace(); // that may come from mFontName
-    uriStr.Append(NS_LITERAL_CSTRING(".properties"));
+    uriStr.AppendLiteral(".properties");
     printf("Loading %s ... %s\n",
             uriStr.get(),
             (NS_FAILED(rv)) ? "Failed" : "Done");
@@ -393,7 +393,7 @@ nsGlyphTable::ElementAt(nsIPresContext* aPresContext, nsMathMLChar* aChar, PRUin
     nsCAutoString key;
     nsAutoString value;
     for (PRInt32 i = 1; ; i++) {
-      key.Assign(NS_LITERAL_CSTRING("external."));
+      key.AssignLiteral("external.");
       key.AppendInt(i, 10);
       rv = mGlyphProperties->GetStringProperty(key, value);
       if (NS_FAILED(rv)) break;
@@ -1130,11 +1130,11 @@ MathFontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData)
    // XXX In principle, the mathfont-family list in the mathfont.properties file
    // is customizable depending on the platform. For now, this is here since there
    // is no need to alert Linux users about TrueType fonts specific to Windows.
-   if (aFamily.EqualsIgnoreCase("MT Extra"))
+   if (aFamily.LowerCaseEqualsLiteral("mt extra"))
      return PR_TRUE; // continue to try other fonts
 //#endif
     if (!missingFamilyList->IsEmpty()) {
-      missingFamilyList->Append(NS_LITERAL_STRING(", "));
+      missingFamilyList->AppendLiteral(", ");
     }
     missingFamilyList->Append(aFamily);
   }
@@ -1205,7 +1205,7 @@ InitGlobals(nsIPresContext* aPresContext)
   if (NS_FAILED(rv)) return rv;
 
   // Load the "mathfontPUA.properties" file
-  value.Assign(NS_LITERAL_STRING("PUA"));
+  value.AssignLiteral("PUA");
   rv = LoadProperties(value, gPUAProperties);
   if (NS_FAILED(rv)) return rv;
 
diff --git a/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/layout/mathml/base/src/nsMathMLContainerFrame.cpp
index 6689850c8677..d1f759783c5f 100644
--- a/layout/mathml/base/src/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/base/src/nsMathMLContainerFrame.cpp
@@ -97,7 +97,7 @@ nsMathMLContainerFrame::ReflowError(nsIPresContext*      aPresContext,
   aRenderingContext.SetFont(GetStyleFont()->mFont, nsnull);
 
   // bounding metrics
-  nsAutoString errorMsg; errorMsg.AssignWithConversion("invalid-markup");
+  nsAutoString errorMsg; errorMsg.AssignLiteral("invalid-markup");
   rv = aRenderingContext.GetBoundingMetrics(errorMsg.get(),
                                             PRUint32(errorMsg.Length()),
                                             mBoundingMetrics);
@@ -146,7 +146,7 @@ nsMathMLContainerFrame::PaintError(nsIPresContext*      aPresContext,
     aRenderingContext.GetFontMetrics(*getter_AddRefs(fm));
     fm->GetMaxAscent(ascent);
 
-    nsAutoString errorMsg; errorMsg.AssignWithConversion("invalid-markup");
+    nsAutoString errorMsg; errorMsg.AssignLiteral("invalid-markup");
     aRenderingContext.DrawString(errorMsg.get(),
                                  PRUint32(errorMsg.Length()),
                                  0, ascent);
@@ -642,12 +642,12 @@ nsMathMLContainerFrame::PropagateScriptStyleFor(nsIPresContext* aPresContext,
           gap = NS_MATHML_CSS_NEGATIVE_SCRIPTLEVEL_LIMIT;
         gap = -gap;
         scriptsizemultiplier = 1.0f / scriptsizemultiplier;
-        fontsize.Assign(NS_LITERAL_STRING("-"));
+        fontsize.AssignLiteral("-");
       }
       else { // the size is going to be decreased
         if (gap > NS_MATHML_CSS_POSITIVE_SCRIPTLEVEL_LIMIT)
           gap = NS_MATHML_CSS_POSITIVE_SCRIPTLEVEL_LIMIT;
-        fontsize.Assign(NS_LITERAL_STRING("+"));
+        fontsize.AssignLiteral("+");
       }
       fontsize.AppendInt(gap, 10);
       // we want to make sure that the size will stay readable
@@ -657,7 +657,7 @@ nsMathMLContainerFrame::PropagateScriptStyleFor(nsIPresContext* aPresContext,
         newFontSize = (nscoord)((float)(newFontSize) * scriptsizemultiplier);
       }
       if (newFontSize <= scriptminsize) {
-        fontsize.Assign(NS_LITERAL_STRING("scriptminsize"));
+        fontsize.AssignLiteral("scriptminsize");
       }
 
       // set the -moz-math-font-size attribute without notifying that we want a reflow
diff --git a/layout/mathml/base/src/nsMathMLTokenFrame.cpp b/layout/mathml/base/src/nsMathMLTokenFrame.cpp
index 2300e005c16d..20efc6e9b2f3 100644
--- a/layout/mathml/base/src/nsMathMLTokenFrame.cpp
+++ b/layout/mathml/base/src/nsMathMLTokenFrame.cpp
@@ -308,16 +308,16 @@ nsMathMLTokenFrame::SetTextStyle(nsIPresContext* aPresContext)
     if (isStyleInvariant) {
       // bug 65951 - we always enforce the style to normal for a non-stylable char
       // XXX also disable bold type? (makes sense to let the set IR be bold, no?)
-      fontstyle.Assign(NS_LITERAL_STRING("normal"));
+      fontstyle.AssignLiteral("normal");
       restyle = PR_TRUE;
     }
     else {
-      fontstyle.Assign(NS_LITERAL_STRING("italic"));
+      fontstyle.AssignLiteral("italic");
     }
   }
   else {
     // our textual content consists of multiple characters
-    fontstyle.Assign(NS_LITERAL_STRING("normal"));
+    fontstyle.AssignLiteral("normal");
   }
 
   // set the -moz-math-font-style attribute without notifying that we want a reflow
diff --git a/layout/mathml/base/src/nsMathMLmoFrame.cpp b/layout/mathml/base/src/nsMathMLmoFrame.cpp
index cf4ba5ddbf55..56308ff9112a 100644
--- a/layout/mathml/base/src/nsMathMLmoFrame.cpp
+++ b/layout/mathml/base/src/nsMathMLmoFrame.cpp
@@ -516,8 +516,8 @@ nsMathMLmoFrame::ProcessOperatorData(nsIPresContext* aPresContext)
   // don't process them here
 
   nsAutoString kfalse, ktrue;
-  kfalse.Assign(NS_LITERAL_STRING("false"));
-  ktrue.Assign(NS_LITERAL_STRING("true"));
+  kfalse.AssignLiteral("false");
+  ktrue.AssignLiteral("true");
 
   if (NS_MATHML_OPERATOR_IS_STRETCHY(mFlags)) {
     if (NS_CONTENT_ATTR_HAS_VALUE == GetAttribute(mContent, mPresentationData.mstyle,
diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp
index 810e87a06464..7be793d62fac 100644
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -2230,7 +2230,7 @@ nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, PRBool aIsPrinting)
 
   switch(aPrintError)
   {
-#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName = NS_LITERAL_STRING(#nserr); break;
+#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName.AssignLiteral(#nserr); break;
       NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND)
       NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_CMD_FAILURE)
       NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE)
@@ -3411,14 +3411,14 @@ nsPrintEngine::ElipseLongString(PRUnichar *& aStr, const PRUint32 aLen, PRBool a
     if (aDoFront) {
       PRUnichar * ptr = &aStr[nsCRT::strlen(aStr)-aLen+3];
       nsAutoString newStr;
-      newStr.AppendWithConversion("...");
+      newStr.AppendLiteral("...");
       newStr += ptr;
       nsMemory::Free(aStr);
       aStr = ToNewUnicode(newStr);
     } else {
       nsAutoString newStr(aStr);
       newStr.SetLength(aLen-3);
-      newStr.AppendWithConversion("...");
+      newStr.AppendLiteral("...");
       nsMemory::Free(aStr);
       aStr = ToNewUnicode(newStr);
     }
diff --git a/layout/style/nsCSSDeclaration.cpp b/layout/style/nsCSSDeclaration.cpp
index 4cabda3844f0..66ad6686027f 100644
--- a/layout/style/nsCSSDeclaration.cpp
+++ b/layout/style/nsCSSDeclaration.cpp
@@ -202,7 +202,7 @@ PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, nsAString&
                        "Top inherit or initial, left isn't.  Fix the parser!");
           AppendCSSValueToString(aProperty, rect->mTop, aResult);
         } else {
-          aResult.Append(NS_LITERAL_STRING("rect("));
+          aResult.AppendLiteral("rect(");
           AppendCSSValueToString(aProperty, rect->mTop, aResult);
           NS_NAMED_LITERAL_STRING(comma, ", ");
           aResult.Append(comma);
@@ -269,7 +269,7 @@ PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, nsAString&
             }
             if (AppendCSSValueToString(aProperty, shadow->mRadius, aResult) &&
                 shadow->mNext)
-              aResult.Append(NS_LITERAL_STRING(", "));
+              aResult.AppendLiteral(", ");
             shadow = shadow->mNext;
           }
         }
@@ -292,11 +292,11 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n
 
   if ((eCSSUnit_String <= unit) && (unit <= eCSSUnit_Counters)) {
     switch (unit) {
-      case eCSSUnit_Attr:     aResult.Append(NS_LITERAL_STRING("attr("));
+      case eCSSUnit_Attr:     aResult.AppendLiteral("attr(");
         break;
-      case eCSSUnit_Counter:  aResult.Append(NS_LITERAL_STRING("counter("));
+      case eCSSUnit_Counter:  aResult.AppendLiteral("counter(");
         break;
-      case eCSSUnit_Counters: aResult.Append(NS_LITERAL_STRING("counters("));
+      case eCSSUnit_Counters: aResult.AppendLiteral("counters(");
         break;
       default:  break;
     }
@@ -397,7 +397,7 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n
     nsAutoString tmpStr;
     nscolor color = aValue.GetColorValue();
 
-    aResult.Append(NS_LITERAL_STRING("rgb("));
+    aResult.AppendLiteral("rgb(");
 
     NS_NAMED_LITERAL_STRING(comma, ", ");
 
@@ -432,11 +432,11 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n
 
   switch (unit) {
     case eCSSUnit_Null:         break;
-    case eCSSUnit_Auto:         aResult.Append(NS_LITERAL_STRING("auto"));     break;
-    case eCSSUnit_Inherit:      aResult.Append(NS_LITERAL_STRING("inherit"));  break;
-    case eCSSUnit_Initial:      aResult.Append(NS_LITERAL_STRING("initial"));  break;
-    case eCSSUnit_None:         aResult.Append(NS_LITERAL_STRING("none"));     break;
-    case eCSSUnit_Normal:       aResult.Append(NS_LITERAL_STRING("normal"));   break;
+    case eCSSUnit_Auto:         aResult.AppendLiteral("auto");     break;
+    case eCSSUnit_Inherit:      aResult.AppendLiteral("inherit");  break;
+    case eCSSUnit_Initial:      aResult.AppendLiteral("initial");  break;
+    case eCSSUnit_None:         aResult.AppendLiteral("none");     break;
+    case eCSSUnit_Normal:       aResult.AppendLiteral("normal");   break;
 
     case eCSSUnit_String:       break;
     case eCSSUnit_URL:          break;
@@ -450,37 +450,37 @@ PRBool nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty, const n
     case eCSSUnit_Percent:      aResult.Append(PRUnichar('%'));    break;
     case eCSSUnit_Number:       break;
 
-    case eCSSUnit_Inch:         aResult.Append(NS_LITERAL_STRING("in"));   break;
-    case eCSSUnit_Foot:         aResult.Append(NS_LITERAL_STRING("ft"));   break;
-    case eCSSUnit_Mile:         aResult.Append(NS_LITERAL_STRING("mi"));   break;
-    case eCSSUnit_Millimeter:   aResult.Append(NS_LITERAL_STRING("mm"));   break;
-    case eCSSUnit_Centimeter:   aResult.Append(NS_LITERAL_STRING("cm"));   break;
-    case eCSSUnit_Meter:        aResult.Append(NS_LITERAL_STRING("m"));    break;
-    case eCSSUnit_Kilometer:    aResult.Append(NS_LITERAL_STRING("km"));   break;
-    case eCSSUnit_Point:        aResult.Append(NS_LITERAL_STRING("pt"));   break;
-    case eCSSUnit_Pica:         aResult.Append(NS_LITERAL_STRING("pc"));   break;
-    case eCSSUnit_Didot:        aResult.Append(NS_LITERAL_STRING("dt"));   break;
-    case eCSSUnit_Cicero:       aResult.Append(NS_LITERAL_STRING("cc"));   break;
+    case eCSSUnit_Inch:         aResult.AppendLiteral("in");   break;
+    case eCSSUnit_Foot:         aResult.AppendLiteral("ft");   break;
+    case eCSSUnit_Mile:         aResult.AppendLiteral("mi");   break;
+    case eCSSUnit_Millimeter:   aResult.AppendLiteral("mm");   break;
+    case eCSSUnit_Centimeter:   aResult.AppendLiteral("cm");   break;
+    case eCSSUnit_Meter:        aResult.AppendLiteral("m");    break;
+    case eCSSUnit_Kilometer:    aResult.AppendLiteral("km");   break;
+    case eCSSUnit_Point:        aResult.AppendLiteral("pt");   break;
+    case eCSSUnit_Pica:         aResult.AppendLiteral("pc");   break;
+    case eCSSUnit_Didot:        aResult.AppendLiteral("dt");   break;
+    case eCSSUnit_Cicero:       aResult.AppendLiteral("cc");   break;
 
-    case eCSSUnit_EM:           aResult.Append(NS_LITERAL_STRING("em"));   break;
-    case eCSSUnit_EN:           aResult.Append(NS_LITERAL_STRING("en"));   break;
-    case eCSSUnit_XHeight:      aResult.Append(NS_LITERAL_STRING("ex"));   break;
-    case eCSSUnit_CapHeight:    aResult.Append(NS_LITERAL_STRING("cap"));  break;
-    case eCSSUnit_Char:         aResult.Append(NS_LITERAL_STRING("ch"));   break;
+    case eCSSUnit_EM:           aResult.AppendLiteral("em");   break;
+    case eCSSUnit_EN:           aResult.AppendLiteral("en");   break;
+    case eCSSUnit_XHeight:      aResult.AppendLiteral("ex");   break;
+    case eCSSUnit_CapHeight:    aResult.AppendLiteral("cap");  break;
+    case eCSSUnit_Char:         aResult.AppendLiteral("ch");   break;
 
-    case eCSSUnit_Pixel:        aResult.Append(NS_LITERAL_STRING("px"));   break;
+    case eCSSUnit_Pixel:        aResult.AppendLiteral("px");   break;
 
-    case eCSSUnit_Proportional: aResult.Append(NS_LITERAL_STRING("*"));   break;
+    case eCSSUnit_Proportional: aResult.AppendLiteral("*");   break;
 
-    case eCSSUnit_Degree:       aResult.Append(NS_LITERAL_STRING("deg"));  break;
-    case eCSSUnit_Grad:         aResult.Append(NS_LITERAL_STRING("grad")); break;
-    case eCSSUnit_Radian:       aResult.Append(NS_LITERAL_STRING("rad"));  break;
+    case eCSSUnit_Degree:       aResult.AppendLiteral("deg");  break;
+    case eCSSUnit_Grad:         aResult.AppendLiteral("grad"); break;
+    case eCSSUnit_Radian:       aResult.AppendLiteral("rad");  break;
 
-    case eCSSUnit_Hertz:        aResult.Append(NS_LITERAL_STRING("Hz"));   break;
-    case eCSSUnit_Kilohertz:    aResult.Append(NS_LITERAL_STRING("kHz"));  break;
+    case eCSSUnit_Hertz:        aResult.AppendLiteral("Hz");   break;
+    case eCSSUnit_Kilohertz:    aResult.AppendLiteral("kHz");  break;
 
     case eCSSUnit_Seconds:      aResult.Append(PRUnichar('s'));    break;
-    case eCSSUnit_Milliseconds: aResult.Append(NS_LITERAL_STRING("ms"));   break;
+    case eCSSUnit_Milliseconds: aResult.AppendLiteral("ms");   break;
   }
 
   return PR_TRUE;
@@ -736,7 +736,7 @@ void
 nsCSSDeclaration::AppendImportanceToString(PRBool aIsImportant, nsAString& aString) const
 {
   if (aIsImportant) {
-   aString.Append(NS_LITERAL_STRING(" ! important"));
+   aString.AppendLiteral(" ! important");
   }
 }
 
@@ -748,11 +748,11 @@ nsCSSDeclaration::AppendPropertyAndValueToString(nsCSSProperty aProperty,
   NS_ASSERTION(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
                "property enum out of range");
   AppendASCIItoUTF16(nsCSSProps::GetStringValue(aPropertyName), aResult);
-  aResult.Append(NS_LITERAL_STRING(": "));
+  aResult.AppendLiteral(": ");
   AppendValueToString(aProperty, aResult);
   PRBool  isImportant = GetValueIsImportant(aProperty);
   AppendImportanceToString(isImportant, aResult);
-  aResult.Append(NS_LITERAL_STRING("; "));
+  aResult.AppendLiteral("; ");
 }
 
 PRBool
@@ -804,7 +804,7 @@ nsCSSDeclaration::TryBorderShorthand(nsAString & aString, PRUint32 aPropertiesSe
   }
   if (border) {
     AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_border), aString);
-    aString.Append(NS_LITERAL_STRING(": "));
+    aString.AppendLiteral(": ");
 
     AppendValueToString(eCSSProperty_border_top_width, aString);
     aString.Append(PRUnichar(' '));
@@ -822,7 +822,7 @@ nsCSSDeclaration::TryBorderShorthand(nsAString & aString, PRUint32 aPropertiesSe
       aString.Append(valueString);
     }
     AppendImportanceToString(isImportant, aString);
-    aString.Append(NS_LITERAL_STRING("; "));
+    aString.AppendLiteral("; ");
   }
   return border;
 }
@@ -839,7 +839,7 @@ nsCSSDeclaration::TryBorderSideShorthand(nsAString & aString,
                                   0, 0, 0,
                                   isImportant)) {
     AppendASCIItoUTF16(nsCSSProps::GetStringValue(aShorthand), aString);
-    aString.Append(NS_LITERAL_STRING(": "));
+    aString.AppendLiteral(": ");
 
     AppendValueToString(OrderValueAt(aBorderWidth-1), aString);
 
@@ -849,11 +849,11 @@ nsCSSDeclaration::TryBorderSideShorthand(nsAString & aString,
     nsAutoString valueString;
     AppendValueToString(OrderValueAt(aBorderColor-1), valueString);
     if (!valueString.EqualsLiteral("-moz-use-text-color")) {
-      aString.Append(NS_LITERAL_STRING(" "));
+      aString.AppendLiteral(" ");
       aString.Append(valueString);
     }
     AppendImportanceToString(isImportant, aString);
-    aString.Append(NS_LITERAL_STRING("; "));
+    aString.AppendLiteral("; ");
     return PR_TRUE;
   }
   return PR_FALSE;
@@ -876,7 +876,7 @@ nsCSSDeclaration::TryFourSidesShorthand(nsAString & aString,
                                   isImportant)) {
     // all 4 properties are set, we can output a shorthand
     AppendASCIItoUTF16(nsCSSProps::GetStringValue(aShorthand), aString);
-    aString.Append(NS_LITERAL_STRING(": "));
+    aString.AppendLiteral(": ");
     nsCSSValue topValue, bottomValue, leftValue, rightValue;
     nsCSSProperty topProp    = OrderValueAt(aTop-1);
     nsCSSProperty bottomProp = OrderValueAt(aBottom-1);
@@ -903,7 +903,7 @@ nsCSSDeclaration::TryFourSidesShorthand(nsAString & aString,
       aTop = 0; aBottom = 0; aLeft = 0; aRight = 0;
     }
     AppendImportanceToString(isImportant, aString);
-    aString.Append(NS_LITERAL_STRING("; "));
+    aString.AppendLiteral("; ");
     return PR_TRUE;
   }
   return PR_FALSE;
@@ -926,7 +926,7 @@ nsCSSDeclaration::TryBackgroundShorthand(nsAString & aString,
       AllPropertiesSameImportance(aBgColor, aBgImage, aBgRepeat, aBgAttachment,
                                   aBgPositionX, aBgPositionY, isImportant)) {
     AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_background), aString);
-    aString.Append(NS_LITERAL_STRING(": "));
+    aString.AppendLiteral(": ");
 
     AppendValueToString(eCSSProperty_background_color, aString);
     aBgColor = 0;
@@ -946,7 +946,7 @@ nsCSSDeclaration::TryBackgroundShorthand(nsAString & aString,
     aString.Append(PRUnichar(' '));
     UseBackgroundPosition(aString, aBgPositionX, aBgPositionY);
     AppendImportanceToString(isImportant, aString);
-    aString.Append(NS_LITERAL_STRING("; "));
+    aString.AppendLiteral("; ");
   }
 }
 
@@ -1198,10 +1198,10 @@ nsCSSDeclaration::ToString(nsAString& aString) const
             AllPropertiesSameImportance(bgPositionX, bgPositionY,
                                         0, 0, 0, 0, isImportant)) {
           AppendASCIItoUTF16(nsCSSProps::GetStringValue(eCSSProperty_background_position), aString);
-          aString.Append(NS_LITERAL_STRING(": "));
+          aString.AppendLiteral(": ");
           UseBackgroundPosition(aString, bgPositionX, bgPositionY);
           AppendImportanceToString(isImportant, aString);
-          aString.Append(NS_LITERAL_STRING("; "));
+          aString.AppendLiteral("; ");
         }
         else if (eCSSProperty_background_x_position == property && bgPositionX) {
           AppendPropertyAndValueToString(eCSSProperty_background_x_position, aString);
diff --git a/layout/style/nsCSSLoader.cpp b/layout/style/nsCSSLoader.cpp
index 626b6631e3de..c4cdc578d756 100644
--- a/layout/style/nsCSSLoader.cpp
+++ b/layout/style/nsCSSLoader.cpp
@@ -652,7 +652,7 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
 #ifdef PR_LOGGING
     LOG_WARN(("  Falling back to ISO-8859-1"));
 #endif
-    aCharset = NS_LITERAL_CSTRING("ISO-8859-1");
+    aCharset.AssignLiteral("ISO-8859-1");
   }
 
   mCharset = aCharset;
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index 46f960360b1b..61cfa0873257 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -405,9 +405,9 @@ static void ReportUnexpectedToken(nsCSSScanner *sc,
   // Flatten the string so we don't append to a concatenation, since
   // that goes into an infinite loop.  See bug 70083.
   nsAutoString error(err);
-  error += NS_LITERAL_STRING(" '");
+  error.AppendLiteral(" '");
   tok.AppendToString(error);
-  error += NS_LITERAL_STRING("'.");
+  error.AppendLiteral("'.");
   sc->AddToError(error);
 }
 
@@ -953,39 +953,39 @@ PRBool CSSParserImpl::ParseAtRule(nsresult& aErrorCode, RuleAppendFunc aAppendFu
                                   void* aData)
 {
   if ((mSection <= eCSSSection_Charset) && 
-      (mToken.mIdent.EqualsIgnoreCase("charset"))) {
+      (mToken.mIdent.LowerCaseEqualsLiteral("charset"))) {
     if (ParseCharsetRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_Import;  // only one charset allowed
       return PR_TRUE;
     }
   }
   if ((mSection <= eCSSSection_Import) && 
-      mToken.mIdent.EqualsIgnoreCase("import")) {
+      mToken.mIdent.LowerCaseEqualsLiteral("import")) {
     if (ParseImportRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_Import;
       return PR_TRUE;
     }
   }
   if ((mSection <= eCSSSection_NameSpace) && 
-      mToken.mIdent.EqualsIgnoreCase("namespace")) {
+      mToken.mIdent.LowerCaseEqualsLiteral("namespace")) {
     if (ParseNameSpaceRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_NameSpace;
       return PR_TRUE;
     }
   }
-  if (mToken.mIdent.EqualsIgnoreCase("media")) {
+  if (mToken.mIdent.LowerCaseEqualsLiteral("media")) {
     if (ParseMediaRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_General;
       return PR_TRUE;
     }
   }
-  if (mToken.mIdent.EqualsIgnoreCase("font-face")) {
+  if (mToken.mIdent.LowerCaseEqualsLiteral("font-face")) {
     if (ParseFontFaceRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_General;
       return PR_TRUE;
     }
   }
-  if (mToken.mIdent.EqualsIgnoreCase("page")) {
+  if (mToken.mIdent.LowerCaseEqualsLiteral("page")) {
     if (ParsePageRule(aErrorCode, aAppendFunc, aData)) {
       mSection = eCSSSection_General;
       return PR_TRUE;
@@ -1111,7 +1111,7 @@ PRBool CSSParserImpl::ParseImportRule(nsresult& aErrorCode, RuleAppendFunc aAppe
     }
   }
   else if ((eCSSToken_Function == mToken.mType) && 
-           (mToken.mIdent.EqualsIgnoreCase("url"))) {
+           (mToken.mIdent.LowerCaseEqualsLiteral("url"))) {
     if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) {
       if (GetURLToken(aErrorCode, PR_TRUE)) {
         if ((eCSSToken_String == mToken.mType) || (eCSSToken_URL == mToken.mType)) {
@@ -1258,7 +1258,7 @@ PRBool CSSParserImpl::ParseNameSpaceRule(nsresult& aErrorCode,
     }
   }
   else if ((eCSSToken_Function == mToken.mType) && 
-           (mToken.mIdent.EqualsIgnoreCase("url"))) {
+           (mToken.mIdent.LowerCaseEqualsLiteral("url"))) {
     if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) {
       if (GetURLToken(aErrorCode, PR_TRUE)) {
         if ((eCSSToken_String == mToken.mType) || (eCSSToken_URL == mToken.mType)) {
@@ -2547,7 +2547,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue)
       }
       break;
     case eCSSToken_Function:
-      if (mToken.mIdent.EqualsIgnoreCase("rgb")) {
+      if (mToken.mIdent.LowerCaseEqualsLiteral("rgb")) {
         // rgb ( component , component , component )
         PRUint8 r, g, b;
         PRInt32 type = COLOR_TYPE_UNKNOWN;
@@ -2560,7 +2560,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue)
         }
         return PR_FALSE;  // already pushed back
       }
-      else if (mToken.mIdent.EqualsIgnoreCase("-moz-rgba")) {
+      else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-rgba")) {
         // rgba ( component , component , component , opacity )
         PRUint8 r, g, b, a;
         PRInt32 type = COLOR_TYPE_UNKNOWN;
@@ -2574,7 +2574,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue)
         }
         return PR_FALSE;  // already pushed back
       }
-      else if (mToken.mIdent.EqualsIgnoreCase("hsl")) {
+      else if (mToken.mIdent.LowerCaseEqualsLiteral("hsl")) {
         // hsl ( hue , saturation , lightness )
         // "hue" is a number, "saturation" and "lightness" are percentages.
         if (ParseHSLColor(aErrorCode, rgba, ')')) {
@@ -2583,7 +2583,7 @@ PRBool CSSParserImpl::ParseColor(nsresult& aErrorCode, nsCSSValue& aValue)
         }
         return PR_FALSE;
       }
-      else if (mToken.mIdent.EqualsIgnoreCase("-moz-hsla")) {
+      else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-hsla")) {
         // hsla ( hue , saturation , lightness , opacity )
         // "hue" is a number, "saturation" and "lightness" are percentages,
         // "opacity" is a number.
@@ -2958,7 +2958,7 @@ CSSParserImpl::ParseDeclaration(nsresult& aErrorCode,
           return PR_FALSE;
         }
         if ((eCSSToken_Ident != tk->mType) ||
-            !tk->mIdent.EqualsIgnoreCase("important")) {
+            !tk->mIdent.LowerCaseEqualsLiteral("important")) {
           REPORT_UNEXPECTED_TOKEN(
             NS_LITERAL_STRING("Expected 'important' but found"));
           OUTPUT_ERROR();
@@ -3424,7 +3424,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue,
   }
   if (((aVariantMask & VARIANT_URL) != 0) &&
       (eCSSToken_Function == tk->mType) && 
-      tk->mIdent.EqualsIgnoreCase("url")) {
+      tk->mIdent.LowerCaseEqualsLiteral("url")) {
     if (ParseURL(aErrorCode, aValue)) {
       return PR_TRUE;
     }
@@ -3435,10 +3435,10 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue,
     		(eCSSToken_ID == tk->mType) || 
         (eCSSToken_Ident == tk->mType) ||
         ((eCSSToken_Function == tk->mType) && 
-         (tk->mIdent.EqualsIgnoreCase("rgb") ||
-          tk->mIdent.EqualsIgnoreCase("hsl") ||
-          tk->mIdent.EqualsIgnoreCase("-moz-rgba") ||
-          tk->mIdent.EqualsIgnoreCase("-moz-hsla")))) {
+         (tk->mIdent.LowerCaseEqualsLiteral("rgb") ||
+          tk->mIdent.LowerCaseEqualsLiteral("hsl") ||
+          tk->mIdent.LowerCaseEqualsLiteral("-moz-rgba") ||
+          tk->mIdent.LowerCaseEqualsLiteral("-moz-hsla")))) {
       // Put token back so that parse color can get it
       UngetToken();
       if (ParseColor(aErrorCode, aValue)) {
@@ -3463,8 +3463,8 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue,
   }
   if (((aVariantMask & VARIANT_COUNTER) != 0) &&
       (eCSSToken_Function == tk->mType) &&
-      (tk->mIdent.EqualsIgnoreCase("counter") || 
-       tk->mIdent.EqualsIgnoreCase("counters"))) {
+      (tk->mIdent.LowerCaseEqualsLiteral("counter") || 
+       tk->mIdent.LowerCaseEqualsLiteral("counters"))) {
 #ifdef ENABLE_COUNTERS
     if (ParseCounter(aErrorCode, aValue)) {
       return PR_TRUE;
@@ -3474,7 +3474,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue,
   }
   if (((aVariantMask & VARIANT_ATTR) != 0) &&
       (eCSSToken_Function == tk->mType) &&
-      tk->mIdent.EqualsIgnoreCase("attr")) {
+      tk->mIdent.LowerCaseEqualsLiteral("attr")) {
     
     if (ParseAttr(aErrorCode, aValue)) {
       return PR_TRUE;
@@ -3489,7 +3489,7 @@ PRBool CSSParserImpl::ParseVariant(nsresult& aErrorCode, nsCSSValue& aValue,
 
 PRBool CSSParserImpl::ParseCounter(nsresult& aErrorCode, nsCSSValue& aValue)
 {
-  nsCSSUnit unit = (mToken.mIdent.EqualsIgnoreCase("counter") ? 
+  nsCSSUnit unit = (mToken.mIdent.LowerCaseEqualsLiteral("counter") ? 
                     eCSSUnit_Counter : eCSSUnit_Counters);
 
   if (ExpectSymbol(aErrorCode, '(', PR_FALSE)) {
@@ -4900,7 +4900,7 @@ CSSParserImpl::DoParseRect(nsCSSRect& aRect, nsresult& aErrorCode)
         break;
     }
   } else if ((eCSSToken_Function == mToken.mType) && 
-             mToken.mIdent.EqualsIgnoreCase("rect")) {
+             mToken.mIdent.LowerCaseEqualsLiteral("rect")) {
     if (!ExpectSymbol(aErrorCode, '(', PR_TRUE)) {
       return PR_FALSE;
     }
@@ -4997,21 +4997,21 @@ PRBool CSSParserImpl::ParseCounterData(nsresult& aErrorCode,
   if (nsnull == ident) {
     return PR_FALSE;
   }
-  if (ident->EqualsIgnoreCase("none")) {
+  if (ident->LowerCaseEqualsLiteral("none")) {
     if (ExpectEndProperty(aErrorCode, PR_TRUE)) {
       return SetSingleCounterValue(aResult, aErrorCode, aPropID,
                                    nsCSSValue(eCSSUnit_None));
     }
     return PR_FALSE;
   }
-  else if (ident->EqualsIgnoreCase("inherit")) {
+  else if (ident->LowerCaseEqualsLiteral("inherit")) {
     if (ExpectEndProperty(aErrorCode, PR_TRUE)) {
       return SetSingleCounterValue(aResult, aErrorCode, aPropID,
                                    nsCSSValue(eCSSUnit_Inherit));
     }
     return PR_FALSE;
   }
-  else if (ident->EqualsIgnoreCase("-moz-initial")) {
+  else if (ident->LowerCaseEqualsLiteral("-moz-initial")) {
     if (ExpectEndProperty(aErrorCode, PR_TRUE)) {
       return SetSingleCounterValue(aResult, aErrorCode, aPropID,
                                    nsCSSValue(eCSSUnit_Initial));
diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp
index 72209de14faa..d8375e310d11 100644
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -302,9 +302,9 @@ CSSCharsetRuleImpl::GetType(PRUint16* aType)
 NS_IMETHODIMP
 CSSCharsetRuleImpl::GetCssText(nsAString& aCssText)
 {
-  aCssText.Assign(NS_LITERAL_STRING("@charset \""));
+  aCssText.AssignLiteral("@charset \"");
   aCssText.Append(mEncoding);
-  aCssText.Append(NS_LITERAL_STRING("\";"));
+  aCssText.AppendLiteral("\";");
   return NS_OK;
 }
 
@@ -552,18 +552,18 @@ CSSImportRuleImpl::GetType(PRUint16* aType)
 NS_IMETHODIMP
 CSSImportRuleImpl::GetCssText(nsAString& aCssText)
 {
-  aCssText.Assign(NS_LITERAL_STRING("@import url("));
+  aCssText.AssignLiteral("@import url(");
   aCssText.Append(mURLSpec);
   aCssText.Append(NS_LITERAL_STRING(")"));
   if (mMedia) {
     nsAutoString mediaText;
     mMedia->GetText(mediaText);
     if (!mediaText.IsEmpty()) {
-      aCssText.Append(NS_LITERAL_STRING(" "));
+      aCssText.AppendLiteral(" ");
       aCssText.Append(mediaText);
     }
   }
-  aCssText.Append(NS_LITERAL_STRING(";"));
+  aCssText.AppendLiteral(";");
   return NS_OK;
 }
 
@@ -996,7 +996,7 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText)
 {
   PRUint32 index;
   PRUint32 count;
-  aCssText.Assign(NS_LITERAL_STRING("@media "));
+  aCssText.AssignLiteral("@media ");
   // get all the media
   if (mMedia) {
     mMedia->Count(&count);
@@ -1005,14 +1005,14 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText)
       if (medium) {
         nsAutoString tempString;
         if (index > 0)
-          aCssText.Append(NS_LITERAL_STRING(", "));
+          aCssText.AppendLiteral(", ");
         medium->ToString(tempString);
         aCssText.Append(tempString);
       }
     }
   }
 
-  aCssText.Append(NS_LITERAL_STRING(" {\n"));
+  aCssText.AppendLiteral(" {\n");
 
   // get all the rules
   if (mRules) {
@@ -1032,7 +1032,7 @@ CSSMediaRuleImpl::GetCssText(nsAString& aCssText)
     }
   }
 
-  aCssText.Append(NS_LITERAL_STRING("}"));
+  aCssText.AppendLiteral("}");
   
   return NS_OK;
 }
@@ -1301,14 +1301,14 @@ CSSNameSpaceRuleImpl::GetType(PRUint16* aType)
 NS_IMETHODIMP
 CSSNameSpaceRuleImpl::GetCssText(nsAString& aCssText)
 {
-  aCssText.Assign(NS_LITERAL_STRING("@namespace "));
+  aCssText.AssignLiteral("@namespace ");
   if (mPrefix) {
     nsString atomStr;
     mPrefix->ToString(atomStr);
     aCssText.Append(atomStr);
-    aCssText.Append(NS_LITERAL_STRING(" "));
+    aCssText.AppendLiteral(" ");
   }
-  aCssText.Append(NS_LITERAL_STRING("url("));
+  aCssText.AppendLiteral("url(");
   aCssText.Append(mURLSpec);
   aCssText.Append(NS_LITERAL_STRING(");"));
   return NS_OK;
diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp
index 7ffbd315887c..e01e408ddd5e 100644
--- a/layout/style/nsCSSScanner.cpp
+++ b/layout/style/nsCSSScanner.cpp
@@ -153,10 +153,10 @@ nsCSSToken::AppendToString(nsString& aBuffer)
       aBuffer.Append(mIdent);
       break;
     case eCSSToken_Includes:
-      aBuffer.Append(NS_LITERAL_STRING("~="));
+      aBuffer.AppendLiteral("~=");
       break;
     case eCSSToken_Dashmatch:
-      aBuffer.Append(NS_LITERAL_STRING("|="));
+      aBuffer.AppendLiteral("|=");
       break;
 
     default:
@@ -507,7 +507,7 @@ PRBool nsCSSScanner::Next(nsresult& aErrorCode, nsCSSToken& aToken)
       if (LookAhead(aErrorCode, '-')) {
         if (LookAhead(aErrorCode, '-')) {
           aToken.mType = eCSSToken_HTMLComment;
-          aToken.mIdent.Assign(NS_LITERAL_STRING(""));
+        aToken.mIdent.AssignLiteral("-->");
         return PR_TRUE;
       }
       Pushback('-');
diff --git a/layout/style/nsCSSStruct.cpp b/layout/style/nsCSSStruct.cpp
index 98ab3f4afda3..f54b90772157 100644
--- a/layout/style/nsCSSStruct.cpp
+++ b/layout/style/nsCSSStruct.cpp
@@ -341,7 +341,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const
 
   if (eCSSProperty_UNKNOWN < aPropID) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
   }
 
   mTop.AppendToString(buffer);
@@ -359,22 +359,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co
 
   if (eCSSUnit_Null != mTop.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mTop.AppendToString(buffer);
   }
   if (eCSSUnit_Null != mRight.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mRight.AppendToString(buffer);
   }
   if (eCSSUnit_Null != mBottom.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mBottom.AppendToString(buffer); 
   }
   if (eCSSUnit_Null != mLeft.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mLeft.AppendToString(buffer);
   }
 
@@ -427,7 +427,7 @@ void nsCSSValueListRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent)
 
   if (eCSSProperty_UNKNOWN < aPropID) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
   }
 
   mTop.AppendToString(buffer);
@@ -447,22 +447,22 @@ void nsCSSValueListRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aT
 
   if (eCSSUnit_Null != mTop.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mTop.AppendToString(buffer);
   }
   if (eCSSUnit_Null != mRight.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mRight.AppendToString(buffer);
   }
   if (eCSSUnit_Null != mBottom.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mBottom.AppendToString(buffer); 
   }
   if (eCSSUnit_Null != mLeft.GetUnit()) {
     buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get());
-    buffer.Append(NS_LITERAL_STRING(": "));
+    buffer.AppendLiteral(": ");
     mLeft.AppendToString(buffer);
   }
 
diff --git a/layout/style/nsCSSStyleRule.cpp b/layout/style/nsCSSStyleRule.cpp
index 205f879abcd3..0c1b5f6a39a9 100644
--- a/layout/style/nsCSSStyleRule.cpp
+++ b/layout/style/nsCSSStyleRule.cpp
@@ -78,7 +78,7 @@
   if (nsnull != ptr) { delete ptr; ptr = nsnull; }
 
 #define NS_IF_NEGATED_START(bool,str)  \
-  if (bool) { str.Append(NS_LITERAL_STRING(":not(")); }
+  if (bool) { str.AppendLiteral(":not("); }
 
 #define NS_IF_NEGATED_END(bool,str)  \
   if (bool) { str.Append(PRUnichar(')')); }
@@ -525,7 +525,7 @@ static PRBool IsPseudoElement(nsIAtom* aAtom)
 
 void nsCSSSelector::AppendNegationToString(nsAString& aString)
 {
-  aString.Append(NS_LITERAL_STRING(":not("));
+  aString.AppendLiteral(":not(");
 }
 
 //
@@ -780,7 +780,7 @@ nsCSSSelectorList::ToString(nsAString& aResult, nsICSSStyleSheet* aSheet)
     p = p->mNext;
     if (!p)
       break;
-    aResult.Append(NS_LITERAL_STRING(", "));
+    aResult.AppendLiteral(", ");
   }
 }
 
@@ -1480,7 +1480,7 @@ CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const
   if (mSelector)
     mSelector->ToString(buffer, mSheet);
 
-  buffer.Append(NS_LITERAL_STRING(" "));
+  buffer.AppendLiteral(" ");
   fputs(NS_LossyConvertUCS2toASCII(buffer).get(), out);
   if (nsnull != mDeclaration) {
     mDeclaration->List(out);
diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp
index 8ade8496b708..809445ff0ecf 100644
--- a/layout/style/nsCSSStyleSheet.cpp
+++ b/layout/style/nsCSSStyleSheet.cpp
@@ -1108,7 +1108,7 @@ DOMMediaListImpl::GetText(nsAString& aMediaText)
     medium->ToString(buffer);
     aMediaText.Append(buffer);
     if (index < count) {
-      aMediaText.Append(NS_LITERAL_STRING(", "));
+      aMediaText.AppendLiteral(", ");
     }
   }
 
@@ -1782,7 +1782,7 @@ CSSStyleSheetImpl::SetTitle(const nsAString& aTitle)
 NS_IMETHODIMP
 CSSStyleSheetImpl::GetType(nsString& aType) const
 {
-  aType.Assign(NS_LITERAL_STRING("text/css"));
+  aType.AssignLiteral("text/css");
   return NS_OK;
 }
 
@@ -2420,7 +2420,7 @@ CSSStyleSheetImpl::SetModified(PRBool aModified)
 NS_IMETHODIMP    
 CSSStyleSheetImpl::GetType(nsAString& aType)
 {
-  aType.Assign(NS_LITERAL_STRING("text/css"));
+  aType.AssignLiteral("text/css");
   return NS_OK;
 }
 
diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp
index f734e267af2f..f2e59d35bb41 100644
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -399,15 +399,15 @@ void nsCSSValue::AppendToString(nsAString& aBuffer,
 
   if (-1 < aPropID) {
     AppendASCIItoUTF16(nsCSSProps::GetStringValue(aPropID), aBuffer);
-    aBuffer.Append(NS_LITERAL_STRING(": "));
+    aBuffer.AppendLiteral(": ");
   }
 
   switch (mUnit) {
     case eCSSUnit_Image:
-    case eCSSUnit_URL:      aBuffer.Append(NS_LITERAL_STRING("url("));       break;
-    case eCSSUnit_Attr:     aBuffer.Append(NS_LITERAL_STRING("attr("));      break;
-    case eCSSUnit_Counter:  aBuffer.Append(NS_LITERAL_STRING("counter("));   break;
-    case eCSSUnit_Counters: aBuffer.Append(NS_LITERAL_STRING("counters("));  break;
+    case eCSSUnit_URL:      aBuffer.AppendLiteral("url(");       break;
+    case eCSSUnit_Attr:     aBuffer.AppendLiteral("attr(");      break;
+    case eCSSUnit_Counter:  aBuffer.AppendLiteral("counter(");   break;
+    case eCSSUnit_Counters: aBuffer.AppendLiteral("counters(");  break;
     default:  break;
   }
   if ((eCSSUnit_String <= mUnit) && (mUnit <= eCSSUnit_Counters)) {
@@ -417,7 +417,7 @@ void nsCSSValue::AppendToString(nsAString& aBuffer,
       aBuffer.Append(PRUnichar('"'));
     }
     else {
-      aBuffer.Append(NS_LITERAL_STRING("null str"));
+      aBuffer.AppendLiteral("null str");
     }
   }
   else if ((eCSSUnit_Integer <= mUnit) && (mUnit <= eCSSUnit_Enumerated)) {
@@ -425,7 +425,7 @@ void nsCSSValue::AppendToString(nsAString& aBuffer,
     intStr.AppendInt(mValue.mInt, 10);
     aBuffer.Append(intStr);
 
-    aBuffer.Append(NS_LITERAL_STRING("[0x"));
+    aBuffer.AppendLiteral("[0x");
 
     intStr.Truncate();
     intStr.AppendInt(mValue.mInt, 16);
@@ -434,25 +434,25 @@ void nsCSSValue::AppendToString(nsAString& aBuffer,
     aBuffer.Append(PRUnichar(']'));
   }
   else if (eCSSUnit_Color == mUnit) {
-    aBuffer.Append(NS_LITERAL_STRING("(0x"));
+    aBuffer.AppendLiteral("(0x");
 
     nsAutoString intStr;
     intStr.AppendInt(NS_GET_R(mValue.mColor), 16);
     aBuffer.Append(intStr);
 
-    aBuffer.Append(NS_LITERAL_STRING(" 0x"));
+    aBuffer.AppendLiteral(" 0x");
 
     intStr.Truncate();
     intStr.AppendInt(NS_GET_G(mValue.mColor), 16);
     aBuffer.Append(intStr);
 
-    aBuffer.Append(NS_LITERAL_STRING(" 0x"));
+    aBuffer.AppendLiteral(" 0x");
 
     intStr.Truncate();
     intStr.AppendInt(NS_GET_B(mValue.mColor), 16);
     aBuffer.Append(intStr);
 
-    aBuffer.Append(NS_LITERAL_STRING(" 0x"));
+    aBuffer.AppendLiteral(" 0x");
 
     intStr.Truncate();
     intStr.AppendInt(NS_GET_A(mValue.mColor), 16);
@@ -479,49 +479,49 @@ void nsCSSValue::AppendToString(nsAString& aBuffer,
 
   switch (mUnit) {
     case eCSSUnit_Null:         break;
-    case eCSSUnit_Auto:         aBuffer.Append(NS_LITERAL_STRING("auto"));     break;
-    case eCSSUnit_Inherit:      aBuffer.Append(NS_LITERAL_STRING("inherit"));  break;
-    case eCSSUnit_Initial:      aBuffer.Append(NS_LITERAL_STRING("initial"));  break;
-    case eCSSUnit_None:         aBuffer.Append(NS_LITERAL_STRING("none"));     break;
-    case eCSSUnit_Normal:       aBuffer.Append(NS_LITERAL_STRING("normal"));   break;
+    case eCSSUnit_Auto:         aBuffer.AppendLiteral("auto");     break;
+    case eCSSUnit_Inherit:      aBuffer.AppendLiteral("inherit");  break;
+    case eCSSUnit_Initial:      aBuffer.AppendLiteral("initial");  break;
+    case eCSSUnit_None:         aBuffer.AppendLiteral("none");     break;
+    case eCSSUnit_Normal:       aBuffer.AppendLiteral("normal");   break;
     case eCSSUnit_String:       break;
     case eCSSUnit_URL:
     case eCSSUnit_Image:
     case eCSSUnit_Attr:
     case eCSSUnit_Counter:
     case eCSSUnit_Counters:     aBuffer.Append(NS_LITERAL_STRING(")"));    break;
-    case eCSSUnit_Integer:      aBuffer.Append(NS_LITERAL_STRING("int"));  break;
-    case eCSSUnit_Enumerated:   aBuffer.Append(NS_LITERAL_STRING("enum")); break;
-    case eCSSUnit_Color:        aBuffer.Append(NS_LITERAL_STRING("rbga")); break;
-    case eCSSUnit_Percent:      aBuffer.Append(NS_LITERAL_STRING("%"));    break;
-    case eCSSUnit_Number:       aBuffer.Append(NS_LITERAL_STRING("#"));    break;
-    case eCSSUnit_Inch:         aBuffer.Append(NS_LITERAL_STRING("in"));   break;
-    case eCSSUnit_Foot:         aBuffer.Append(NS_LITERAL_STRING("ft"));   break;
-    case eCSSUnit_Mile:         aBuffer.Append(NS_LITERAL_STRING("mi"));   break;
-    case eCSSUnit_Millimeter:   aBuffer.Append(NS_LITERAL_STRING("mm"));   break;
-    case eCSSUnit_Centimeter:   aBuffer.Append(NS_LITERAL_STRING("cm"));   break;
-    case eCSSUnit_Meter:        aBuffer.Append(NS_LITERAL_STRING("m"));    break;
-    case eCSSUnit_Kilometer:    aBuffer.Append(NS_LITERAL_STRING("km"));   break;
-    case eCSSUnit_Point:        aBuffer.Append(NS_LITERAL_STRING("pt"));   break;
-    case eCSSUnit_Pica:         aBuffer.Append(NS_LITERAL_STRING("pc"));   break;
-    case eCSSUnit_Didot:        aBuffer.Append(NS_LITERAL_STRING("dt"));   break;
-    case eCSSUnit_Cicero:       aBuffer.Append(NS_LITERAL_STRING("cc"));   break;
-    case eCSSUnit_EM:           aBuffer.Append(NS_LITERAL_STRING("em"));   break;
-    case eCSSUnit_EN:           aBuffer.Append(NS_LITERAL_STRING("en"));   break;
-    case eCSSUnit_XHeight:      aBuffer.Append(NS_LITERAL_STRING("ex"));   break;
-    case eCSSUnit_CapHeight:    aBuffer.Append(NS_LITERAL_STRING("cap"));  break;
-    case eCSSUnit_Char:         aBuffer.Append(NS_LITERAL_STRING("ch"));   break;
-    case eCSSUnit_Pixel:        aBuffer.Append(NS_LITERAL_STRING("px"));   break;
-    case eCSSUnit_Proportional: aBuffer.Append(NS_LITERAL_STRING("*"));    break;
-    case eCSSUnit_Degree:       aBuffer.Append(NS_LITERAL_STRING("deg"));  break;
-    case eCSSUnit_Grad:         aBuffer.Append(NS_LITERAL_STRING("grad")); break;
-    case eCSSUnit_Radian:       aBuffer.Append(NS_LITERAL_STRING("rad"));  break;
-    case eCSSUnit_Hertz:        aBuffer.Append(NS_LITERAL_STRING("Hz"));   break;
-    case eCSSUnit_Kilohertz:    aBuffer.Append(NS_LITERAL_STRING("kHz"));  break;
-    case eCSSUnit_Seconds:      aBuffer.Append(NS_LITERAL_STRING("s"));    break;
-    case eCSSUnit_Milliseconds: aBuffer.Append(NS_LITERAL_STRING("ms"));   break;
+    case eCSSUnit_Integer:      aBuffer.AppendLiteral("int");  break;
+    case eCSSUnit_Enumerated:   aBuffer.AppendLiteral("enum"); break;
+    case eCSSUnit_Color:        aBuffer.AppendLiteral("rbga"); break;
+    case eCSSUnit_Percent:      aBuffer.AppendLiteral("%");    break;
+    case eCSSUnit_Number:       aBuffer.AppendLiteral("#");    break;
+    case eCSSUnit_Inch:         aBuffer.AppendLiteral("in");   break;
+    case eCSSUnit_Foot:         aBuffer.AppendLiteral("ft");   break;
+    case eCSSUnit_Mile:         aBuffer.AppendLiteral("mi");   break;
+    case eCSSUnit_Millimeter:   aBuffer.AppendLiteral("mm");   break;
+    case eCSSUnit_Centimeter:   aBuffer.AppendLiteral("cm");   break;
+    case eCSSUnit_Meter:        aBuffer.AppendLiteral("m");    break;
+    case eCSSUnit_Kilometer:    aBuffer.AppendLiteral("km");   break;
+    case eCSSUnit_Point:        aBuffer.AppendLiteral("pt");   break;
+    case eCSSUnit_Pica:         aBuffer.AppendLiteral("pc");   break;
+    case eCSSUnit_Didot:        aBuffer.AppendLiteral("dt");   break;
+    case eCSSUnit_Cicero:       aBuffer.AppendLiteral("cc");   break;
+    case eCSSUnit_EM:           aBuffer.AppendLiteral("em");   break;
+    case eCSSUnit_EN:           aBuffer.AppendLiteral("en");   break;
+    case eCSSUnit_XHeight:      aBuffer.AppendLiteral("ex");   break;
+    case eCSSUnit_CapHeight:    aBuffer.AppendLiteral("cap");  break;
+    case eCSSUnit_Char:         aBuffer.AppendLiteral("ch");   break;
+    case eCSSUnit_Pixel:        aBuffer.AppendLiteral("px");   break;
+    case eCSSUnit_Proportional: aBuffer.AppendLiteral("*");    break;
+    case eCSSUnit_Degree:       aBuffer.AppendLiteral("deg");  break;
+    case eCSSUnit_Grad:         aBuffer.AppendLiteral("grad"); break;
+    case eCSSUnit_Radian:       aBuffer.AppendLiteral("rad");  break;
+    case eCSSUnit_Hertz:        aBuffer.AppendLiteral("Hz");   break;
+    case eCSSUnit_Kilohertz:    aBuffer.AppendLiteral("kHz");  break;
+    case eCSSUnit_Seconds:      aBuffer.AppendLiteral("s");    break;
+    case eCSSUnit_Milliseconds: aBuffer.AppendLiteral("ms");   break;
   }
-  aBuffer.Append(NS_LITERAL_STRING(" "));
+  aBuffer.AppendLiteral(" ");
 }
 
 void nsCSSValue::ToString(nsAString& aBuffer,
diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp
index 034adf9c2e31..708237119747 100644
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -184,7 +184,7 @@ nsDOMCSSDeclaration::GetPropertyPriority(const nsAString& aPropertyName,
 
   aReturn.Truncate();
   if (decl && decl->GetValueIsImportant(aPropertyName)) {
-    aReturn.Assign(NS_LITERAL_STRING("important"));    
+    aReturn.AssignLiteral("important");    
   }
 
   return result;
diff --git a/layout/style/nsDOMCSSValueList.cpp b/layout/style/nsDOMCSSValueList.cpp
index cac8ae7d1a4c..f0988049aabb 100644
--- a/layout/style/nsDOMCSSValueList.cpp
+++ b/layout/style/nsDOMCSSValueList.cpp
@@ -98,7 +98,7 @@ nsDOMCSSValueList::GetCssText(nsAString& aCssText)
 
   nsAutoString separator;
   if (mCommaDelimited) {
-    separator.Assign(NS_LITERAL_STRING(", "));
+    separator.AssignLiteral(", ");
   }
   else {
     separator.Assign(PRUnichar(' '));
diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp
index ce54ae824ef3..dc957ebd0f11 100644
--- a/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -559,14 +559,14 @@ HTMLCSSStyleSheetImpl::GetURL(nsIURI*& aURL) const
 NS_IMETHODIMP
 HTMLCSSStyleSheetImpl::GetTitle(nsString& aTitle) const
 {
-  aTitle.Assign(NS_LITERAL_STRING("Internal HTML/CSS Style Sheet"));
+  aTitle.AssignLiteral("Internal HTML/CSS Style Sheet");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HTMLCSSStyleSheetImpl::GetType(nsString& aType) const
 {
-  aType.Assign(NS_LITERAL_STRING("text/html"));
+  aType.AssignLiteral("text/html");
   return NS_OK;
 }
 
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index bdac8e3b87d0..812d37a0f4b0 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -691,7 +691,7 @@ nsHTMLStyleSheet::GetTitle(nsString& aTitle) const
 NS_IMETHODIMP
 nsHTMLStyleSheet::GetType(nsString& aType) const
 {
-  aType.Assign(NS_LITERAL_STRING("text/html"));
+  aType.AssignLiteral("text/html");
   return NS_OK;
 }
 
diff --git a/layout/style/nsROCSSPrimitiveValue.cpp b/layout/style/nsROCSSPrimitiveValue.cpp
index 8a5315b38010..e2c6cc2ba26f 100644
--- a/layout/style/nsROCSSPrimitiveValue.cpp
+++ b/layout/style/nsROCSSPrimitiveValue.cpp
@@ -122,35 +122,35 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
       {
         float val = NSTwipsToFloatPixels(mValue.mTwips, mT2P);
         tmpStr.AppendFloat(val);
-        tmpStr.Append(NS_LITERAL_STRING("px"));
+        tmpStr.AppendLiteral("px");
         break;
       }
     case CSS_CM :
       {
         float val = NS_TWIPS_TO_CENTIMETERS(mValue.mTwips);
         tmpStr.AppendFloat(val);
-        tmpStr.Append(NS_LITERAL_STRING("cm"));
+        tmpStr.AppendLiteral("cm");
         break;
       }
     case CSS_MM :
       {
         float val = NS_TWIPS_TO_MILLIMETERS(mValue.mTwips);
         tmpStr.AppendFloat(val);
-        tmpStr.Append(NS_LITERAL_STRING("mm"));
+        tmpStr.AppendLiteral("mm");
         break;
       }
     case CSS_IN :
       {
         float val = NS_TWIPS_TO_INCHES(mValue.mTwips);
         tmpStr.AppendFloat(val);
-        tmpStr.Append(NS_LITERAL_STRING("in"));
+        tmpStr.AppendLiteral("in");
         break;
       }
     case CSS_PT :
       {
         float val = NSTwipsToFloatPoints(mValue.mTwips);
         tmpStr.AppendFloat(val);
-        tmpStr.Append(NS_LITERAL_STRING("pt"));
+        tmpStr.AppendLiteral("pt");
         break;
       }
     case CSS_IDENT :
@@ -197,7 +197,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
         NS_NAMED_LITERAL_STRING(comma, ", ");
         nsCOMPtr sideCSSValue;
         nsAutoString sideValue;
-        tmpStr = NS_LITERAL_STRING("rect(");
+        tmpStr.AssignLiteral("rect(");
         // get the top
         result = mValue.mRect->GetTop(getter_AddRefs(sideCSSValue));
         if (NS_FAILED(result))
@@ -238,7 +238,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
         NS_NAMED_LITERAL_STRING(comma, ", ");
         nsCOMPtr colorCSSValue;
         nsAutoString colorValue;
-        tmpStr = NS_LITERAL_STRING("rgb(");
+        tmpStr.AssignLiteral("rgb(");
 
         // get the red component
         result = mValue.mColor->GetRed(getter_AddRefs(colorCSSValue));
diff --git a/layout/style/nsStyleCoord.cpp b/layout/style/nsStyleCoord.cpp
index 5822dffbcb97..abc8b13b7b59 100644
--- a/layout/style/nsStyleCoord.cpp
+++ b/layout/style/nsStyleCoord.cpp
@@ -199,22 +199,22 @@ void nsStyleCoord::AppendToString(nsString& aBuffer) const
            (eStyleUnit_Enumerated == mUnit) ||
            (eStyleUnit_Integer == mUnit)) {
     aBuffer.AppendInt(mValue.mInt, 10);
-    aBuffer.Append(NS_LITERAL_STRING("[0x"));
+    aBuffer.AppendLiteral("[0x");
     aBuffer.AppendInt(mValue.mInt, 16);
     aBuffer.Append(PRUnichar(']'));
   }
 
   switch (mUnit) {
-    case eStyleUnit_Null:         aBuffer.Append(NS_LITERAL_STRING("Null"));     break;
-    case eStyleUnit_Coord:        aBuffer.Append(NS_LITERAL_STRING("tw"));       break;
-    case eStyleUnit_Percent:      aBuffer.Append(NS_LITERAL_STRING("%"));        break;
-    case eStyleUnit_Factor:       aBuffer.Append(NS_LITERAL_STRING("f"));        break;
-    case eStyleUnit_Normal:       aBuffer.Append(NS_LITERAL_STRING("Normal"));   break;
-    case eStyleUnit_Auto:         aBuffer.Append(NS_LITERAL_STRING("Auto"));     break;
-    case eStyleUnit_Proportional: aBuffer.Append(NS_LITERAL_STRING("*"));        break;
-    case eStyleUnit_Enumerated:   aBuffer.Append(NS_LITERAL_STRING("enum"));     break;
-    case eStyleUnit_Integer:      aBuffer.Append(NS_LITERAL_STRING("int"));      break;
-    case eStyleUnit_Chars:        aBuffer.Append(NS_LITERAL_STRING("chars"));    break;
+    case eStyleUnit_Null:         aBuffer.AppendLiteral("Null");     break;
+    case eStyleUnit_Coord:        aBuffer.AppendLiteral("tw");       break;
+    case eStyleUnit_Percent:      aBuffer.AppendLiteral("%");        break;
+    case eStyleUnit_Factor:       aBuffer.AppendLiteral("f");        break;
+    case eStyleUnit_Normal:       aBuffer.AppendLiteral("Normal");   break;
+    case eStyleUnit_Auto:         aBuffer.AppendLiteral("Auto");     break;
+    case eStyleUnit_Proportional: aBuffer.AppendLiteral("*");        break;
+    case eStyleUnit_Enumerated:   aBuffer.AppendLiteral("enum");     break;
+    case eStyleUnit_Integer:      aBuffer.AppendLiteral("int");      break;
+    case eStyleUnit_Chars:        aBuffer.AppendLiteral("chars");    break;
   }
   aBuffer.Append(PRUnichar(' '));
 }
@@ -269,19 +269,19 @@ void nsStyleSides::AppendToString(nsString& aBuffer) const
   nsStyleCoord  temp;
 
   GetLeft(temp);
-  aBuffer.Append(NS_LITERAL_STRING("left: "));
+  aBuffer.AppendLiteral("left: ");
   temp.AppendToString(aBuffer);
 
   GetTop(temp);
-  aBuffer.Append(NS_LITERAL_STRING("top: "));
+  aBuffer.AppendLiteral("top: ");
   temp.AppendToString(aBuffer);
 
   GetRight(temp);
-  aBuffer.Append(NS_LITERAL_STRING("right: "));
+  aBuffer.AppendLiteral("right: ");
   temp.AppendToString(aBuffer);
 
   GetBottom(temp);
-  aBuffer.Append(NS_LITERAL_STRING("bottom: "));
+  aBuffer.AppendLiteral("bottom: ");
   temp.AppendToString(aBuffer);
 }
 
diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp
index 7cfd3bb5463e..fe7f56c67bfd 100644
--- a/layout/svg/base/src/nsSVGGlyphFrame.cpp
+++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp
@@ -912,7 +912,7 @@ nsSVGGlyphFrame::BuildGlyphFragmentTree(PRUint32 charNum, PRBool lastBranch)
 #ifdef DEBUG
     printf("Glyph frame with zero length text\n");
 #endif
-    mCharacterData = NS_LITERAL_STRING("");
+    mCharacterData.AssignLiteral("");
     return charNum;
   }
 
diff --git a/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp b/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
index 8a8ac1f74961..af6e06f53a61 100644
--- a/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
+++ b/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
@@ -364,14 +364,14 @@ FindFont(const nsString& aFamily, PRBool aGeneric, void *aData)
     nsFont::GetGenericID(aFamily, &id);
     switch (id) {
       case kGenericFont_serif:
-        family_name = NS_LITERAL_CSTRING("times new roman");
+        family_name.AssignLiteral("times new roman");
         break;
       case kGenericFont_monospace:
-        family_name = NS_LITERAL_CSTRING("courier new");
+        family_name.AssignLiteral("courier new");
         break;
       case kGenericFont_sans_serif:
       default:
-        family_name = NS_LITERAL_CSTRING("arial");
+        family_name.AssignLiteral("arial");
         break;
     }
   }
diff --git a/layout/xul/base/src/nsBox.cpp b/layout/xul/base/src/nsBox.cpp
index c93a447e1584..1d94f4b5f62e 100644
--- a/layout/xul/base/src/nsBox.cpp
+++ b/layout/xul/base/src/nsBox.cpp
@@ -84,9 +84,9 @@ void
 nsBox::AppendAttribute(const nsAutoString& aAttribute, const nsAutoString& aValue, nsAutoString& aResult)
 {
    aResult.Append(aAttribute);
-   aResult.Append(NS_LITERAL_STRING("='"));
+   aResult.AppendLiteral("='");
    aResult.Append(aValue);
-   aResult.Append(NS_LITERAL_STRING("' "));
+   aResult.AppendLiteral("' ");
 }
 
 void
@@ -102,7 +102,7 @@ nsBox::ListBox(nsAutoString& aResult)
 
     aResult.AppendWithConversion(addr);
     aResult.Append(name);
-    aResult.Append(NS_LITERAL_STRING(" "));
+    aResult.AppendLiteral(" ");
 
     nsIContent* content = frame->GetContent();
 
@@ -152,7 +152,7 @@ nsBox::ChildrenMustHaveWidgets(PRBool& aMust)
 void
 nsBox::GetBoxName(nsAutoString& aName)
 {
-  aName.Assign(NS_LITERAL_STRING("Box"));
+  aName.AssignLiteral("Box");
 }
 #endif
 
@@ -167,13 +167,13 @@ nsBox::BeginLayout(nsBoxLayoutState& aState)
       switch(aState.GetLayoutReason())
       {
         case nsBoxLayoutState::Dirty:
-           reason.Assign(NS_LITERAL_STRING("Dirty"));
+           reason.AssignLiteral("Dirty");
         break;
         case nsBoxLayoutState::Initial:
-           reason.Assign(NS_LITERAL_STRING("Initial"));
+           reason.AssignLiteral("Initial");
         break;
         case nsBoxLayoutState::Resize:
-           reason.Assign(NS_LITERAL_STRING("Resize"));
+           reason.AssignLiteral("Resize");
         break;
       }
 
diff --git a/layout/xul/base/src/nsBoxObject.cpp b/layout/xul/base/src/nsBoxObject.cpp
index 89eb08563e84..88aa965b8e01 100644
--- a/layout/xul/base/src/nsBoxObject.cpp
+++ b/layout/xul/base/src/nsBoxObject.cpp
@@ -402,7 +402,7 @@ nsBoxObject::GetLookAndFeelMetric(const PRUnichar* aPropertyName,
     return NS_ERROR_FAILURE;
     
   nsAutoString property(aPropertyName);
-  if (property.EqualsIgnoreCase("scrollbarStyle")) {
+  if (property.LowerCaseEqualsLiteral("scrollbarstyle")) {
     PRInt32 metricResult;
     lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ScrollArrowStyle, metricResult);
     switch (metricResult) {
@@ -420,7 +420,7 @@ nsBoxObject::GetLookAndFeelMetric(const PRUnichar* aPropertyName,
         break;   
     } 
   }
-  else if (property.EqualsIgnoreCase("thumbStyle")) {
+  else if (property.LowerCaseEqualsLiteral("thumbstyle")) {
     PRInt32 metricResult;
     lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ScrollSliderStyle, metricResult);
     if ( metricResult == nsILookAndFeel::eMetric_ScrollThumbStyleNormal )
diff --git a/layout/xul/base/src/nsContainerBox.cpp b/layout/xul/base/src/nsContainerBox.cpp
index a797d13d006e..09f47f7bbb94 100644
--- a/layout/xul/base/src/nsContainerBox.cpp
+++ b/layout/xul/base/src/nsContainerBox.cpp
@@ -96,7 +96,7 @@ nsContainerBox::Destroy(nsBoxLayoutState& aState)
 void
 nsContainerBox::GetBoxName(nsAutoString& aName)
 {
-  aName.Assign(NS_LITERAL_STRING("ContainerBox"));
+  aName.AssignLiteral("ContainerBox");
 }
 #endif
 
diff --git a/layout/xul/base/src/nsGrippyFrame.cpp b/layout/xul/base/src/nsGrippyFrame.cpp
index 2a781a8614f4..1f634525b532 100644
--- a/layout/xul/base/src/nsGrippyFrame.cpp
+++ b/layout/xul/base/src/nsGrippyFrame.cpp
@@ -103,7 +103,7 @@ nsGrippyFrame::MouseClicked (nsIPresContext* aPresContext, nsGUIEvent* aEvent)
         if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttr(kNameSpaceID_None, nsXULAtoms::state, oldState))
         {
             if (oldState.Equals(newState))
-                newState.Assign(NS_LITERAL_STRING("open"));
+                newState.AssignLiteral("open");
         }
 
         content->SetAttr(kNameSpaceID_None, nsXULAtoms::state, newState, PR_TRUE);
diff --git a/layout/xul/base/src/nsMenuFrame.cpp b/layout/xul/base/src/nsMenuFrame.cpp
index bb6081ea1966..3e4a0ea22fa3 100644
--- a/layout/xul/base/src/nsMenuFrame.cpp
+++ b/layout/xul/base/src/nsMenuFrame.cpp
@@ -562,12 +562,12 @@ nsMenuFrame::SelectMenu(PRBool aActivateFlag)
     // Highlight the menu.
     mContent->SetAttr(kNameSpaceID_None, nsXULAtoms::menuactive, NS_LITERAL_STRING("true"), PR_TRUE);
     // The menuactivated event is used by accessibility to track the user's movements through menus
-    domEventToFire.Assign(NS_LITERAL_STRING("DOMMenuItemActive"));
+    domEventToFire.AssignLiteral("DOMMenuItemActive");
   }
   else {
     // Unhighlight the menu.
     mContent->UnsetAttr(kNameSpaceID_None, nsXULAtoms::menuactive, PR_TRUE);
-    domEventToFire.Assign(NS_LITERAL_STRING("DOMMenuItemInactive"));
+    domEventToFire.AssignLiteral("DOMMenuItemInactive");
   }
 
   FireDOMEvent(mPresContext, domEventToFire);
@@ -784,15 +784,15 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag)
 
       if (onMenuBar) {
         if (popupAnchor.IsEmpty())
-          popupAnchor = NS_LITERAL_STRING("bottomleft");
+          popupAnchor.AssignLiteral("bottomleft");
         if (popupAlign.IsEmpty())
-          popupAlign = NS_LITERAL_STRING("topleft");
+          popupAlign.AssignLiteral("topleft");
       }
       else {
         if (popupAnchor.IsEmpty())
-          popupAnchor = NS_LITERAL_STRING("topright");
+          popupAnchor.AssignLiteral("topright");
         if (popupAlign.IsEmpty())
-          popupAlign = NS_LITERAL_STRING("topleft");
+          popupAlign.AssignLiteral("topleft");
       }
 
       nsBoxLayoutState state(mPresContext);
@@ -1109,40 +1109,40 @@ static void ConvertPosition(nsIContent* aPopupElt, nsString& aAnchor, nsString&
     return;
 
   if (position.EqualsLiteral("before_start")) {
-    aAnchor.Assign(NS_LITERAL_STRING("topleft"));
-    aAlign.Assign(NS_LITERAL_STRING("bottomleft"));
+    aAnchor.AssignLiteral("topleft");
+    aAlign.AssignLiteral("bottomleft");
   }
   else if (position.EqualsLiteral("before_end")) {
-    aAnchor.Assign(NS_LITERAL_STRING("topright"));
-    aAlign.Assign(NS_LITERAL_STRING("bottomright"));
+    aAnchor.AssignLiteral("topright");
+    aAlign.AssignLiteral("bottomright");
   }
   else if (position.EqualsLiteral("after_start")) {
-    aAnchor.Assign(NS_LITERAL_STRING("bottomleft"));
-    aAlign.Assign(NS_LITERAL_STRING("topleft"));
+    aAnchor.AssignLiteral("bottomleft");
+    aAlign.AssignLiteral("topleft");
   }
   else if (position.EqualsLiteral("after_end")) {
-    aAnchor.Assign(NS_LITERAL_STRING("bottomright"));
-    aAlign.Assign(NS_LITERAL_STRING("topright"));
+    aAnchor.AssignLiteral("bottomright");
+    aAlign.AssignLiteral("topright");
   }
   else if (position.EqualsLiteral("start_before")) {
-    aAnchor.Assign(NS_LITERAL_STRING("topleft"));
-    aAlign.Assign(NS_LITERAL_STRING("topright"));
+    aAnchor.AssignLiteral("topleft");
+    aAlign.AssignLiteral("topright");
   }
   else if (position.EqualsLiteral("start_after")) {
-    aAnchor.Assign(NS_LITERAL_STRING("bottomleft"));
-    aAlign.Assign(NS_LITERAL_STRING("bottomright"));
+    aAnchor.AssignLiteral("bottomleft");
+    aAlign.AssignLiteral("bottomright");
   }
   else if (position.EqualsLiteral("end_before")) {
-    aAnchor.Assign(NS_LITERAL_STRING("topright"));
-    aAlign.Assign(NS_LITERAL_STRING("topleft"));
+    aAnchor.AssignLiteral("topright");
+    aAlign.AssignLiteral("topleft");
   }
   else if (position.EqualsLiteral("end_after")) {
-    aAnchor.Assign(NS_LITERAL_STRING("bottomright"));
-    aAlign.Assign(NS_LITERAL_STRING("bottomleft"));
+    aAnchor.AssignLiteral("bottomright");
+    aAlign.AssignLiteral("bottomleft");
   }
   else if (position.EqualsLiteral("overlap")) {
-    aAnchor.Assign(NS_LITERAL_STRING("topleft"));
-    aAlign.Assign(NS_LITERAL_STRING("topleft"));
+    aAnchor.AssignLiteral("topleft");
+    aAlign.AssignLiteral("topleft");
   }
 }
 
@@ -1169,15 +1169,15 @@ nsMenuFrame::RePositionPopup(nsBoxLayoutState& aState)
 
     if (onMenuBar) {
       if (popupAnchor.IsEmpty())
-          popupAnchor = NS_LITERAL_STRING("bottomleft");
+          popupAnchor.AssignLiteral("bottomleft");
       if (popupAlign.IsEmpty())
-          popupAlign = NS_LITERAL_STRING("topleft");
+          popupAlign.AssignLiteral("topleft");
     }
     else {
       if (popupAnchor.IsEmpty())
-        popupAnchor = NS_LITERAL_STRING("topright");
+        popupAnchor.AssignLiteral("topright");
       if (popupAlign.IsEmpty())
-        popupAlign = NS_LITERAL_STRING("topleft");
+        popupAlign.AssignLiteral("topleft");
     }
 
     menuPopup->SyncViewWithFrame(presContext, popupAnchor, popupAlign, this, -1, -1);
diff --git a/layout/xul/base/src/nsMenuPopupFrame.cpp b/layout/xul/base/src/nsMenuPopupFrame.cpp
index b1d1b83ae7f4..ff787bd3a59b 100644
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -640,22 +640,22 @@ nsMenuPopupFrame::AdjustPositionForAnchorAlign ( PRInt32* ioXPos, PRInt32* ioYPo
 
   if (GetStyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {
     if (popupAnchor.EqualsLiteral("topright"))
-      popupAnchor.Assign(NS_LITERAL_STRING("topleft"));
+      popupAnchor.AssignLiteral("topleft");
     else if (popupAnchor.EqualsLiteral("topleft"))
-      popupAnchor.Assign(NS_LITERAL_STRING("topright"));
+      popupAnchor.AssignLiteral("topright");
     else if (popupAnchor.EqualsLiteral("bottomleft"))
-      popupAnchor.Assign(NS_LITERAL_STRING("bottomright"));
+      popupAnchor.AssignLiteral("bottomright");
     else if (popupAnchor.EqualsLiteral("bottomright"))
-      popupAnchor.Assign(NS_LITERAL_STRING("bottomleft"));
+      popupAnchor.AssignLiteral("bottomleft");
 
     if (popupAlign.EqualsLiteral("topright"))
-      popupAlign.Assign(NS_LITERAL_STRING("topleft"));
+      popupAlign.AssignLiteral("topleft");
     else if (popupAlign.EqualsLiteral("topleft"))
-      popupAlign.Assign(NS_LITERAL_STRING("topright"));
+      popupAlign.AssignLiteral("topright");
     else if (popupAlign.EqualsLiteral("bottomleft"))
-      popupAlign.Assign(NS_LITERAL_STRING("bottomright"));
+      popupAlign.AssignLiteral("bottomright");
     else if (popupAnchor.EqualsLiteral("bottomright"))
-      popupAlign.Assign(NS_LITERAL_STRING("bottomleft"));
+      popupAlign.AssignLiteral("bottomleft");
   }
 
   // Adjust position for margins at the aligned corner
diff --git a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
index 8df85a3bd162..7053b31805a0 100644
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -339,7 +339,7 @@ nsTreeBodyFrame::Destroy(nsIPresContext* aPresContext)
   if (mTreeBoxObject) {
     nsCOMPtr box(do_QueryInterface(mTreeBoxObject));
     if (mTopRowIndex > 0) {
-      nsAutoString topRowStr; topRowStr.Assign(NS_LITERAL_STRING("topRow"));
+      nsAutoString topRowStr; topRowStr.AssignLiteral("topRow");
       nsAutoString topRow;
       topRow.AppendInt(mTopRowIndex);
       box->SetProperty(topRowStr.get(), topRow.get());
@@ -899,13 +899,13 @@ nsTreeBodyFrame::GetCellAt(PRInt32 aX, PRInt32 aY, PRInt32* aRow, nsITreeColumn*
   if (col) {
     NS_ADDREF(*aCol = col);
     if (child == nsCSSAnonBoxes::moztreecell)
-      aChildElt = NS_LITERAL_CSTRING("cell");
+      aChildElt.AssignLiteral("cell");
     else if (child == nsCSSAnonBoxes::moztreetwisty)
-      aChildElt = NS_LITERAL_CSTRING("twisty");
+      aChildElt.AssignLiteral("twisty");
     else if (child == nsCSSAnonBoxes::moztreeimage)
-      aChildElt = NS_LITERAL_CSTRING("image");
+      aChildElt.AssignLiteral("image");
     else if (child == nsCSSAnonBoxes::moztreecelltext)
-      aChildElt = NS_LITERAL_CSTRING("text");
+      aChildElt.AssignLiteral("text");
   }
 
   return NS_OK;
@@ -2768,7 +2768,7 @@ nsTreeBodyFrame::PaintText(PRInt32              aRowIndex,
     if (ellipsisWidth > width)
       text.SetLength(0);
     else if (ellipsisWidth == width)
-      text.Assign(NS_LITERAL_STRING(ELLIPSIS));
+      text.AssignLiteral(ELLIPSIS);
     else {
       // We will be drawing an ellipsis, thank you very much.
       // Subtract out the required width of the ellipsis.
@@ -2792,7 +2792,7 @@ nsTreeBodyFrame::PaintText(PRInt32              aRowIndex,
             twidth += cwidth;
           }
           text.Truncate(i);
-          text += NS_LITERAL_STRING(ELLIPSIS);
+          text.AppendLiteral(ELLIPSIS);
         }
         break;
 
@@ -2812,7 +2812,7 @@ nsTreeBodyFrame::PaintText(PRInt32              aRowIndex,
 
           nsAutoString copy;
           text.Right(copy, length-1-i);
-          text.Assign(NS_LITERAL_STRING(ELLIPSIS));
+          text.AssignLiteral(ELLIPSIS);
           text += copy;
         }
         break;
diff --git a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
index a0014edfd499..0dff05b568e6 100644
--- a/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
+++ b/mailnews/addrbook/src/nsAbAutoCompleteSession.cpp
@@ -179,9 +179,9 @@ nsAbAutoCompleteSession::AddToResult(const PRUnichar* pNickNameStr,
       // check this so we do not get a bogus entry "someName <>"
       if (pStr && pStr[0] != 0) {
         nsAutoString aStr(pDisplayNameStr);
-        aStr.Append(NS_LITERAL_STRING(" <"));
+        aStr.AppendLiteral(" <");
         aStr += pStr;
-        aStr.Append(NS_LITERAL_STRING(">"));
+        aStr.AppendLiteral(">");
         fullAddrStr = ToNewUnicode(aStr);
       }
       else
diff --git a/mailnews/addrbook/src/nsAbBoolExprToLDAPFilter.cpp b/mailnews/addrbook/src/nsAbBoolExprToLDAPFilter.cpp
index 9599d4cb5e5e..e4ba9c59d03e 100644
--- a/mailnews/addrbook/src/nsAbBoolExprToLDAPFilter.cpp
+++ b/mailnews/addrbook/src/nsAbBoolExprToLDAPFilter.cpp
@@ -109,21 +109,21 @@ nsresult nsAbBoolExprToLDAPFilter::FilterExpression (
         }
     }
 
-    filter += NS_LITERAL_CSTRING("(");
+    filter.AppendLiteral("(");
     switch (operation)
     {
         case nsIAbBooleanOperationTypes::AND:
-            filter += NS_LITERAL_CSTRING("&");
+            filter.AppendLiteral("&");
             rv = FilterExpressions (childExpressions, filter, flags);
             break;
         case nsIAbBooleanOperationTypes::OR:
-            filter += NS_LITERAL_CSTRING("|");
+            filter.AppendLiteral("|");
             rv = FilterExpressions (childExpressions, filter, flags);
             break;
         case nsIAbBooleanOperationTypes::NOT:
             if (count > 1)
                 return NS_ERROR_FAILURE;
-            filter += NS_LITERAL_CSTRING("!");
+            filter.AppendLiteral("!");
             rv = FilterExpressions (childExpressions, filter, flags);
             break;
         default:
diff --git a/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp b/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
index dfcb0d933644..839bb94c116a 100644
--- a/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPAutoCompFormatter.cpp
@@ -269,7 +269,7 @@ nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
 
         // put the entire nsresult in string form
         //
-        errCodeNum += NS_LITERAL_STRING("0x");
+        errCodeNum.AppendLiteral("0x");
         errCodeNum.AppendInt(aErrorCode, 16);    
 
         // figure out the key to index into the string bundle
diff --git a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
index 645e6a568023..cbc9593c70a8 100644
--- a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
@@ -130,8 +130,8 @@ NS_IMETHODIMP nsAbOutlookDirectory::Init(const char *aUri)
         PRINTF(("Cannot get name.\n")) ;
         return NS_ERROR_FAILURE ;
     }
-    if (mAbWinType == nsAbWinType_Outlook) { prefix.Assign(NS_LITERAL_STRING("OP ")) ; }
-    else { prefix.Assign(NS_LITERAL_STRING("OE ")) ; }
+    if (mAbWinType == nsAbWinType_Outlook) { prefix.AssignLiteral("OP ") ; }
+    else { prefix.AssignLiteral("OE ") ; }
     prefix.Append(unichars) ;
     SetDirName(prefix.get()) ; 
     if (objectType == MAPI_DISTLIST) {
diff --git a/mailnews/addrbook/src/nsAbWinHelper.cpp b/mailnews/addrbook/src/nsAbWinHelper.cpp
index 6d32fd781c84..93bbe17a0dc1 100644
--- a/mailnews/addrbook/src/nsAbWinHelper.cpp
+++ b/mailnews/addrbook/src/nsAbWinHelper.cpp
@@ -680,7 +680,7 @@ BOOL nsAbWinHelper::CreateEntry(const nsMapiEntry& aParent, nsMapiEntry& aNewEnt
     nsAutoString tempName ;
 
     displayName.ulPropTag = PR_DISPLAY_NAME_W ;
-    tempName.Assign(NS_LITERAL_STRING("__MailUser__")) ;
+    tempName.AssignLiteral("__MailUser__") ;
     tempName.AppendInt(mEntryCounter ++) ;
     displayName.Value.lpszW = NS_CONST_CAST(WORD *, tempName.get()) ;
     mLastError = newEntry->SetProps(1, &displayName, &problems) ;
@@ -743,7 +743,7 @@ BOOL nsAbWinHelper::CreateDistList(const nsMapiEntry& aParent, nsMapiEntry& aNew
     nsAutoString tempName ;
 
     displayName.ulPropTag = PR_DISPLAY_NAME_W ;
-    tempName.Assign(NS_LITERAL_STRING("__MailList__")) ;
+    tempName.AssignLiteral("__MailList__") ;
     tempName.AppendInt(mEntryCounter ++) ;
     displayName.Value.lpszW = NS_CONST_CAST(WORD *, tempName.get()) ;
     mLastError = newEntry->SetProps(1, &displayName, &problems) ;
diff --git a/mailnews/addrbook/src/nsAddressBook.cpp b/mailnews/addrbook/src/nsAddressBook.cpp
index 7c626a794044..4dc08f813812 100644
--- a/mailnews/addrbook/src/nsAddressBook.cpp
+++ b/mailnews/addrbook/src/nsAddressBook.cpp
@@ -1423,7 +1423,7 @@ NS_IMETHODIMP nsAddressBook::ExportAddressBook(nsIDOMWindowInternal *aParentWin,
        (fileName.RFind(LDIF_FILE_EXTENSION2, PR_TRUE, -1, sizeof(LDIF_FILE_EXTENSION2)-1) == kNotFound)) {
 
        // Add the extenstion and build a new localFile.
-       fileName.Append(NS_LITERAL_STRING(LDIF_FILE_EXTENSION2));
+       fileName.AppendLiteral(LDIF_FILE_EXTENSION2);
        localFile->SetLeafName(fileName);
     }
       rv = ExportDirectoryToLDIF(aDirectory, localFile);
@@ -1434,7 +1434,7 @@ NS_IMETHODIMP nsAddressBook::ExportAddressBook(nsIDOMWindowInternal *aParentWin,
       if (fileName.RFind(CSV_FILE_EXTENSION, PR_TRUE, -1, sizeof(CSV_FILE_EXTENSION)-1) == kNotFound) {
 
        // Add the extenstion and build a new localFile.
-       fileName.Append(NS_LITERAL_STRING(CSV_FILE_EXTENSION));
+       fileName.AppendLiteral(CSV_FILE_EXTENSION);
        localFile->SetLeafName(fileName);
     }
       rv = ExportDirectoryToDelimitedText(aDirectory, CSV_DELIM, CSV_DELIM_LEN, localFile);
@@ -1446,7 +1446,7 @@ NS_IMETHODIMP nsAddressBook::ExportAddressBook(nsIDOMWindowInternal *aParentWin,
           (fileName.RFind(TAB_FILE_EXTENSION, PR_TRUE, -1, sizeof(TAB_FILE_EXTENSION)-1) == kNotFound) ) {
 
        // Add the extenstion and build a new localFile.
-       fileName.Append(NS_LITERAL_STRING(TXT_FILE_EXTENSION));
+       fileName.AppendLiteral(TXT_FILE_EXTENSION);
        localFile->SetLeafName(fileName);
   }
       rv = ExportDirectoryToDelimitedText(aDirectory, TAB_DELIM, TAB_DELIM_LEN, localFile);
@@ -1556,7 +1556,7 @@ nsAddressBook::ExportDirectoryToDelimitedText(nsIAbDirectory *aDirectory, const
               if (needsQuotes)
               {
                 newValue.Insert(NS_LITERAL_STRING("\""), 0);
-                newValue.Append(NS_LITERAL_STRING("\""));
+                newValue.AppendLiteral("\"");
               }
 
               // For notes, make sure CR/LF is converted to spaces 
@@ -1696,9 +1696,9 @@ nsAddressBook::ExportDirectoryToLDIF(nsIAbDirectory *aDirectory, nsILocalFile *a
  
               if (!PL_strcmp(EXPORT_ATTRIBUTES_TABLE[i].abColName, kPreferMailFormatColumn)) {
                 if (value.Equals(NS_LITERAL_STRING("html").get()))
-                  value = NS_LITERAL_STRING("true");
+                  value.AssignLiteral("true");
                 else if (value.Equals(NS_LITERAL_STRING("plaintext").get()))
-                  value = NS_LITERAL_STRING("false");
+                  value.AssignLiteral("false");
                 else
                   value.Truncate(); // unknown.
               }
@@ -1835,7 +1835,7 @@ nsresult nsAddressBook::AppendDNForCard(const char *aProperty, nsIAbCard *aCard,
   if (!displayName.IsEmpty()) {
     cnStr += NS_LITERAL_STRING("cn=") + displayName;
     if (!email.IsEmpty()) {
-      cnStr += NS_LITERAL_STRING(",");
+      cnStr.AppendLiteral(",");
     }
   }
 
diff --git a/mailnews/base/search/src/nsMsgSearchValue.cpp b/mailnews/base/search/src/nsMsgSearchValue.cpp
index 4bda7157bb65..025b9ec077f5 100644
--- a/mailnews/base/search/src/nsMsgSearchValue.cpp
+++ b/mailnews/base/search/src/nsMsgSearchValue.cpp
@@ -112,7 +112,7 @@ nsMsgSearchValueImpl::ToString(PRUnichar **aResult)
     NS_ENSURE_ARG_POINTER(aResult);
 
     nsAutoString resultStr;
-    resultStr.Assign(NS_LITERAL_STRING("[nsIMsgSearchValue: "));
+    resultStr.AssignLiteral("[nsIMsgSearchValue: ");
     if (IS_STRING_ATTRIBUTE(mValue.attribute)) {
         resultStr.Append(NS_ConvertUTF8toUCS2(mValue.string));
         return NS_OK;
@@ -130,14 +130,14 @@ nsMsgSearchValueImpl::ToString(PRUnichar **aResult)
     case nsMsgSearchAttrib::FolderInfo:
     case nsMsgSearchAttrib::Label:
     case nsMsgSearchAttrib::JunkStatus:
-        resultStr.Append(NS_LITERAL_STRING("type="));
+        resultStr.AppendLiteral("type=");
         resultStr.AppendInt(mValue.attribute);
         break;
     default:
         NS_ASSERTION(0, "Unknown search value type");
     }        
 
-    resultStr.Append(NS_LITERAL_STRING("]"));
+    resultStr.AppendLiteral("]");
 
     *aResult = ToNewUnicode(resultStr);
     return NS_OK;
diff --git a/mailnews/base/src/nsMessenger.cpp b/mailnews/base/src/nsMessenger.cpp
index 0baff96dd1d9..a8e54a9fcad0 100644
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -1024,19 +1024,19 @@ nsMessenger::SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity,
       case HTML_FILE_TYPE:
           if ( (fileName.RFind(HTML_FILE_EXTENSION, PR_TRUE, -1, sizeof(HTML_FILE_EXTENSION)-1) == kNotFound) &&
                (fileName.RFind(HTML_FILE_EXTENSION2, PR_TRUE, -1, sizeof(HTML_FILE_EXTENSION2)-1) == kNotFound) ) {
-           fileName.Append(NS_LITERAL_STRING(HTML_FILE_EXTENSION2));
+           fileName.AppendLiteral(HTML_FILE_EXTENSION2);
            localFile->SetLeafName(fileName);
         }
         break;
       case TEXT_FILE_TYPE:
         if (fileName.RFind(TEXT_FILE_EXTENSION, PR_TRUE, -1, sizeof(TEXT_FILE_EXTENSION)-1) == kNotFound) {
-         fileName.Append(NS_LITERAL_STRING(TEXT_FILE_EXTENSION));
+         fileName.AppendLiteral(TEXT_FILE_EXTENSION);
          localFile->SetLeafName(fileName);
         }
         break;
       case EML_FILE_TYPE:
         if (fileName.RFind(EML_FILE_EXTENSION, PR_TRUE, -1, sizeof(EML_FILE_EXTENSION)-1) == kNotFound) {
-         fileName.Append(NS_LITERAL_STRING(EML_FILE_EXTENSION));
+         fileName.AppendLiteral(EML_FILE_EXTENSION);
          localFile->SetLeafName(fileName);
         }
         break;
@@ -1063,7 +1063,7 @@ nsMessenger::SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity,
         if (noExtensionFound)
         {
           saveAsFileType = EML_FILE_TYPE; 
-          fileName.Append(NS_LITERAL_STRING(EML_FILE_EXTENSION));
+          fileName.AppendLiteral(EML_FILE_EXTENSION);
           localFile->SetLeafName(fileName);
         }
         break;
@@ -1111,13 +1111,13 @@ nsMessenger::SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity,
       {
         saveListener->m_outputFormat = nsSaveMsgListener::ePlainText;
         saveListener->m_doCharsetConversion = PR_TRUE;
-        urlString += NS_LITERAL_CSTRING("?header=print");  
+        urlString.AppendLiteral("?header=print");  
       }
       else 
       {
         saveListener->m_outputFormat = nsSaveMsgListener::eHTML;
         saveListener->m_doCharsetConversion = PR_FALSE;
-        urlString += NS_LITERAL_CSTRING("?header=saveas");  
+        urlString.AppendLiteral("?header=saveas");  
       }
       
       rv = CreateStartupUrl(urlString.get(), getter_AddRefs(url));
diff --git a/mailnews/base/src/nsMessengerWinIntegration.cpp b/mailnews/base/src/nsMessengerWinIntegration.cpp
index a2aa09fc0ba4..695cc149f7e4 100644
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -622,7 +622,7 @@ void nsMessengerWinIntegration::FillToolTipInfo()
     	    if (index > 0)
             toolTipText.Append(NS_LITERAL_STRING("\n").get());
           toolTipText.Append(accountName);
-          toolTipText.Append(NS_LITERAL_STRING(" "));
+          toolTipText.AppendLiteral(" ");
 		      toolTipText.Append(finalText);
         }
       } // if we got a bundle
diff --git a/mailnews/base/src/nsMsgAccount.cpp b/mailnews/base/src/nsMsgAccount.cpp
index 2feff76ce559..610e84edfe74 100644
--- a/mailnews/base/src/nsMsgAccount.cpp
+++ b/mailnews/base/src/nsMsgAccount.cpp
@@ -487,7 +487,7 @@ nsMsgAccount::ToString(PRUnichar **aResult)
 {
   nsAutoString val(NS_LITERAL_STRING("[nsIMsgAccount: "));
   val.AppendWithConversion(m_accountKey);
-  val.Append(NS_LITERAL_STRING("]"));
+  val.AppendLiteral("]");
   *aResult = ToNewUnicode(val);
   return NS_OK;
 }
diff --git a/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mailnews/base/src/nsMsgAccountManagerDS.cpp
index 2e338ad234a3..c0dff5e8a6a5 100644
--- a/mailnews/base/src/nsMsgAccountManagerDS.cpp
+++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp
@@ -419,7 +419,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
         NS_ENSURE_SUCCESS(rv,rv);
 
         nsAutoString panelTitleName;
-        panelTitleName = NS_LITERAL_STRING("prefPanel-");
+        panelTitleName.AssignLiteral("prefPanel-");
         panelTitleName.AppendWithConversion(sourceValue + strlen(NC_RDF_PAGETITLE_PREFIX));
         bundle->GetStringFromName(panelTitleName.get(), getter_Copies(pageTitle));
       }
@@ -429,18 +429,18 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
   else if (property == kNC_PageTag) {
     // do NOT localize these strings. these are the urls of the XUL files
     if (source == kNC_PageTitleServer)
-      str = NS_LITERAL_STRING("am-server.xul");
+      str.AssignLiteral("am-server.xul");
     else if (source == kNC_PageTitleCopies)
-      str = NS_LITERAL_STRING("am-copies.xul");
+      str.AssignLiteral("am-copies.xul");
     else if ((source == kNC_PageTitleOfflineAndDiskSpace) ||
              (source == kNC_PageTitleDiskSpace))
-      str = NS_LITERAL_STRING("am-offline.xul");
+      str.AssignLiteral("am-offline.xul");
     else if (source == kNC_PageTitleAddressing)
-      str = NS_LITERAL_STRING("am-addressing.xul");
+      str.AssignLiteral("am-addressing.xul");
     else if (source == kNC_PageTitleSMTP)
-      str = NS_LITERAL_STRING("am-smtp.xul");
+      str.AssignLiteral("am-smtp.xul");
     else if (source == kNC_PageTitleFakeAccount)
-      str = NS_LITERAL_STRING("am-fakeaccount.xul");
+      str.AssignLiteral("am-fakeaccount.xul");
     else {
       nsCOMPtr folder = do_QueryInterface(source, &rv);
       if (NS_SUCCEEDED(rv) && folder) {
@@ -451,14 +451,14 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
           PRBool hasIdentities;
           rv = serverHasIdentities(server, &hasIdentities);
           if (NS_SUCCEEDED(rv) && !hasIdentities) {
-            str = NS_LITERAL_STRING("am-serverwithnoidentities.xul");
+            str.AssignLiteral("am-serverwithnoidentities.xul");
           }
           else {
-            str = NS_LITERAL_STRING("am-main.xul");
+            str.AssignLiteral("am-main.xul");
           }
         }
         else {
-          str = NS_LITERAL_STRING("am-main.xul");
+          str.AssignLiteral("am-main.xul");
         }
       }
       else {
@@ -471,9 +471,9 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
         NS_ENSURE_TRUE(sourceValue && (strlen(sourceValue) > strlen(NC_RDF_PAGETITLE_PREFIX)), NS_ERROR_UNEXPECTED);
 
         // turn NC#PageTitlefoobar into foobar, so we can get the am-foobar.xul file
-        str = NS_LITERAL_STRING("am-");
+        str.AssignLiteral("am-");
         str.AppendWithConversion((sourceValue + strlen(NC_RDF_PAGETITLE_PREFIX)));
-        str += NS_LITERAL_STRING(".xul");
+        str.AppendLiteral(".xul");
       }
     }
   }
@@ -501,7 +501,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
       nsCOMPtr am = do_QueryReferent(mAccountManager);
 
       if (isDefaultServer(server))
-        str = NS_LITERAL_STRING("0000");
+        str.AssignLiteral("0000");
       else {
         rv = am->FindServerIndex(server, &accountNum);
         if (NS_FAILED(rv)) return rv;
@@ -534,19 +534,19 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
       // so that the folder data source will take care of it.
       if (sourceValue && (strncmp(sourceValue, NC_RDF_PAGETITLE_PREFIX, strlen(NC_RDF_PAGETITLE_PREFIX)) == 0)) {
         if (source == kNC_PageTitleSMTP)
-          str = NS_LITERAL_STRING("4000");
+          str.AssignLiteral("4000");
         else if (source == kNC_PageTitleFakeAccount)
-          str = NS_LITERAL_STRING("5000");
+          str.AssignLiteral("5000");
         else if (source == kNC_PageTitleServer)
-          str = NS_LITERAL_STRING("1");
+          str.AssignLiteral("1");
         else if (source == kNC_PageTitleCopies)
-          str = NS_LITERAL_STRING("2");
+          str.AssignLiteral("2");
         else if (source == kNC_PageTitleAddressing)
-          str = NS_LITERAL_STRING("3");
+          str.AssignLiteral("3");
         else if (source == kNC_PageTitleOfflineAndDiskSpace)
-          str = NS_LITERAL_STRING("4");
+          str.AssignLiteral("4");
         else if (source == kNC_PageTitleDiskSpace)
-          str = NS_LITERAL_STRING("4");
+          str.AssignLiteral("4");
         else {
           // allow for the accountmanager to be dynamically extended
           // all the other pages come after the standard ones
@@ -571,7 +571,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
     folder->GetIsServer(&isServer);
     // no need to localize this!
     if (isServer)
-      str = NS_LITERAL_STRING("ServerSettings");
+      str.AssignLiteral("ServerSettings");
   }
 
   else if (property == kNC_IsDefaultServer) {
@@ -580,7 +580,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
     if (NS_FAILED(rv) || !thisServer) return NS_RDF_NO_VALUE;
 
     if (isDefaultServer(thisServer))
-      str = NS_LITERAL_STRING("true");
+      str.AssignLiteral("true");
   }
 
   else if (property == kNC_SupportsFilters) {
@@ -589,7 +589,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
     if (NS_FAILED(rv) || !server) return NS_RDF_NO_VALUE;
 
     if (supportsFilters(server))
-      str = NS_LITERAL_STRING("true");
+      str.AssignLiteral("true");
   }
   else if (property == kNC_CanGetMessages) {
     nsCOMPtr server;
@@ -597,7 +597,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
     if (NS_FAILED(rv) || !server) return NS_RDF_NO_VALUE;
 
     if (canGetMessages(server))
-      str = NS_LITERAL_STRING("true");
+      str.AssignLiteral("true");
   }
   else if (property == kNC_CanGetIncomingMessages) {
     nsCOMPtr server;
@@ -605,11 +605,11 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source,
     if (NS_FAILED(rv) || !server) return NS_RDF_NO_VALUE;
 
     if (canGetIncomingMessages(server))
-      str = NS_LITERAL_STRING("true");
+      str.AssignLiteral("true");
   }
   else if (property == kNC_PageTitleFakeAccount) {
     if (source == kNC_PageTitleFakeAccount)
-      str = NS_LITERAL_STRING("true");
+      str.AssignLiteral("true");
   }
   if (!str.IsEmpty())
     rv = createNode(str.get(), target, getRDFService());
diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp
index 68ebd85a9c2a..78b399a9a439 100644
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -587,7 +587,7 @@ nsresult nsMsgDBView::FetchSubject(nsIMsgHdr * aMsgHdr, PRUint32 aFlags, PRUnich
     nsXPIDLString subject;
     aMsgHdr->GetMime2DecodedSubject(getter_Copies(subject));
     nsAutoString reSubject;
-    reSubject.Assign(NS_LITERAL_STRING("Re: "));
+    reSubject.AssignLiteral("Re: ");
     reSubject.Append(subject);
     *aValue = ToNewUnicode(reSubject);
   }
@@ -733,7 +733,7 @@ nsresult nsMsgDBView::FetchSize(nsIMsgHdr * aHdr, PRUnichar ** aSizeString)
     
     formattedSizeString.AppendInt(sizeInKB);
     // XXX todo, fix this hard coded string?
-    formattedSizeString.Append(NS_LITERAL_STRING("KB"));
+    formattedSizeString.AppendLiteral("KB");
   }
   
   *aSizeString = ToNewUnicode(formattedSizeString);
diff --git a/mailnews/base/src/nsMsgFolderDataSource.cpp b/mailnews/base/src/nsMsgFolderDataSource.cpp
index fc7cc409efa0..7d78ea82ad56 100644
--- a/mailnews/base/src/nsMsgFolderDataSource.cpp
+++ b/mailnews/base/src/nsMsgFolderDataSource.cpp
@@ -1129,22 +1129,22 @@ nsMsgFolderDataSource::createFolderSpecialNode(nsIMsgFolder *folder,
   
   nsAutoString specialFolderString;
   if (flags & MSG_FOLDER_FLAG_INBOX)
-    specialFolderString = NS_LITERAL_STRING("Inbox");
+    specialFolderString.AssignLiteral("Inbox");
   else if (flags & MSG_FOLDER_FLAG_TRASH)
-    specialFolderString = NS_LITERAL_STRING("Trash");
+    specialFolderString.AssignLiteral("Trash");
   else if (flags & MSG_FOLDER_FLAG_QUEUE)
-    specialFolderString = NS_LITERAL_STRING("Unsent Messages");
+    specialFolderString.AssignLiteral("Unsent Messages");
   else if (flags & MSG_FOLDER_FLAG_SENTMAIL)
-    specialFolderString = NS_LITERAL_STRING("Sent");
+    specialFolderString.AssignLiteral("Sent");
   else if (flags & MSG_FOLDER_FLAG_DRAFTS)
-    specialFolderString = NS_LITERAL_STRING("Drafts");
+    specialFolderString.AssignLiteral("Drafts");
   else if (flags & MSG_FOLDER_FLAG_TEMPLATES)
-    specialFolderString = NS_LITERAL_STRING("Templates");
+    specialFolderString.AssignLiteral("Templates");
   else if (flags & MSG_FOLDER_FLAG_JUNK)
-    specialFolderString = NS_LITERAL_STRING("Junk");
+    specialFolderString.AssignLiteral("Junk");
   else {
     // XXX why do this at all? or just ""
-    specialFolderString = NS_LITERAL_STRING("none");
+    specialFolderString.AssignLiteral("none");
   }
   
   createNode(specialFolderString.get(), target, getRDFService());
@@ -1861,9 +1861,9 @@ nsMsgFolderDataSource::GetFolderSizeNode(PRInt32 aFolderSize, nsIRDFNode **aNode
     // can we catch this problem at compile time?
     // see #179234
     if (sizeInMB)
-      sizeString.Append(NS_LITERAL_STRING(" MB"));
+      sizeString.AppendLiteral(" MB");
     else
-      sizeString.Append(NS_LITERAL_STRING(" KB"));
+      sizeString.AppendLiteral(" KB");
     createNode(sizeString.get(), aNode, getRDFService());
   }
   return NS_OK;
diff --git a/mailnews/base/util/nsLocalFolderSummarySpec.cpp b/mailnews/base/util/nsLocalFolderSummarySpec.cpp
index 9965066da774..5c5d60e18373 100644
--- a/mailnews/base/util/nsLocalFolderSummarySpec.cpp
+++ b/mailnews/base/util/nsLocalFolderSummarySpec.cpp
@@ -89,7 +89,7 @@ void nsLocalFolderSummarySpec::	CreateSummaryFileName()
 	// Append .msf (msg summary file) this is what windows will want.
 	// Mac and Unix can decide for themselves.
 
-	fullLeafName.Append(NS_LITERAL_STRING(".msf"));				// message summary file
+	fullLeafName.AppendLiteral(".msf");				// message summary file
 	char *cLeafName = ToNewCString(fullLeafName);
 	SetLeafName(cLeafName);
     nsMemory::Free(cLeafName);
diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp
index 3a54232db6c1..c275c16d07de 100644
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -2680,21 +2680,21 @@ NS_IMETHODIMP nsMsgDBFolder::SetPrettyName(const PRUnichar *name)
   nsAutoString unicodeName(name);
 
   //Set pretty name only if special flag is set and if it the default folder name
-  if (mFlags & MSG_FOLDER_FLAG_INBOX && unicodeName.Equals(NS_LITERAL_STRING("Inbox"), nsCaseInsensitiveStringComparator()))
+  if (mFlags & MSG_FOLDER_FLAG_INBOX && unicodeName.LowerCaseEqualsLiteral("inbox"))
     rv = SetName(kLocalizedInboxName);
-  else if (mFlags & MSG_FOLDER_FLAG_SENTMAIL && unicodeName.Equals(NS_LITERAL_STRING("Sent"), nsCaseInsensitiveStringComparator()))
+  else if (mFlags & MSG_FOLDER_FLAG_SENTMAIL && unicodeName.LowerCaseEqualsLiteral("sent"))
     rv = SetName(kLocalizedSentName);
   //netscape webmail uses "Draft" instead of "Drafts"
-  else if (mFlags & MSG_FOLDER_FLAG_DRAFTS && (unicodeName.Equals(NS_LITERAL_STRING("Drafts"), nsCaseInsensitiveStringComparator()) 
-                                                || unicodeName.Equals(NS_LITERAL_STRING("Draft"), nsCaseInsensitiveStringComparator())))  
+  else if (mFlags & MSG_FOLDER_FLAG_DRAFTS && (unicodeName.LowerCaseEqualsLiteral("drafts") 
+                                                || unicodeName.LowerCaseEqualsLiteral("draft")))  
     rv = SetName(kLocalizedDraftsName);
-  else if (mFlags & MSG_FOLDER_FLAG_TEMPLATES && unicodeName.Equals(NS_LITERAL_STRING("Templates"), nsCaseInsensitiveStringComparator()))
+  else if (mFlags & MSG_FOLDER_FLAG_TEMPLATES && unicodeName.LowerCaseEqualsLiteral("templates"))
     rv = SetName(kLocalizedTemplatesName);
-  else if (mFlags & MSG_FOLDER_FLAG_TRASH && unicodeName.Equals(NS_LITERAL_STRING("Trash"), nsCaseInsensitiveStringComparator()))
+  else if (mFlags & MSG_FOLDER_FLAG_TRASH && unicodeName.LowerCaseEqualsLiteral("trash"))
     rv = SetName(kLocalizedTrashName);
-  else if (mFlags & MSG_FOLDER_FLAG_QUEUE && unicodeName.Equals(NS_LITERAL_STRING("Unsent Messages"), nsCaseInsensitiveStringComparator()))
+  else if (mFlags & MSG_FOLDER_FLAG_QUEUE && unicodeName.LowerCaseEqualsLiteral("unsent messages"))
     rv = SetName(kLocalizedUnsentName);
-  else if (mFlags & MSG_FOLDER_FLAG_JUNK && unicodeName.Equals(NS_LITERAL_STRING("Junk"), nsCaseInsensitiveStringComparator()))
+  else if (mFlags & MSG_FOLDER_FLAG_JUNK && unicodeName.LowerCaseEqualsLiteral("junk"))
     rv = SetName(kLocalizedJunkName);
   else
     rv = SetName(name);
@@ -3741,7 +3741,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetNewMessagesNotificationDescription(PRUnichar * *
       // put this test here because we don't want to just put "folder name on"
       // in case the above failed
       if (!(mFlags & MSG_FOLDER_FLAG_INBOX))
-        description.Append(NS_LITERAL_STRING(" on "));
+        description.AppendLiteral(" on ");
       description.Append(serverName);
     }
   }
@@ -4100,7 +4100,7 @@ nsresult nsMsgDBFolder::NotifyFolderEvent(nsIAtom* aEvent)
 nsresult
 nsGetMailFolderSeparator(nsString& result)
 {
-  result.Assign(NS_LITERAL_STRING(".sbd"));
+  result.AssignLiteral(".sbd");
   return NS_OK;
 }
 
diff --git a/mailnews/base/util/nsMsgI18N.cpp b/mailnews/base/util/nsMsgI18N.cpp
index 72f4813faf0f..c076716b5ea5 100644
--- a/mailnews/base/util/nsMsgI18N.cpp
+++ b/mailnews/base/util/nsMsgI18N.cpp
@@ -256,7 +256,7 @@ PRBool nsMsgI18Nmultibyte_charset(const char *charset)
     nsAutoString charsetData;
     res = ccm->GetCharsetData(charset, NS_LITERAL_STRING(".isMultibyte").get(), charsetData);
     if (NS_SUCCEEDED(res)) {
-      result = charsetData.EqualsIgnoreCase("true");
+      result = charsetData.LowerCaseEqualsLiteral("true");
     }
   }
 
diff --git a/mailnews/base/util/nsMsgIdentity.cpp b/mailnews/base/util/nsMsgIdentity.cpp
index f94206f28592..55526d6087d7 100644
--- a/mailnews/base/util/nsMsgIdentity.cpp
+++ b/mailnews/base/util/nsMsgIdentity.cpp
@@ -361,9 +361,9 @@ nsMsgIdentity::GetIdentityName(PRUnichar **idName) {
 
     nsAutoString str;
     str += (const PRUnichar*)fullName;
-    str.Append(NS_LITERAL_STRING(" <"));
+    str.AppendLiteral(" <");
     str.AppendWithConversion((const char*)email);
-    str.Append(NS_LITERAL_STRING(">"));
+    str.AppendLiteral(">");
     *idName = ToNewUnicode(str);
     rv = NS_OK;
   }
@@ -380,7 +380,7 @@ nsMsgIdentity::ToString(PRUnichar **aResult)
 {
   nsString idname(NS_LITERAL_STRING("[nsIMsgIdentity: "));
   idname.AppendWithConversion(m_identityKey);
-  idname.Append(NS_LITERAL_STRING("]"));
+  idname.AppendLiteral("]");
 
   *aResult = ToNewUnicode(idname);
   return NS_OK;
diff --git a/mailnews/base/util/nsMsgIncomingServer.cpp b/mailnews/base/util/nsMsgIncomingServer.cpp
index f5994689cc5d..ec5c8d991295 100644
--- a/mailnews/base/util/nsMsgIncomingServer.cpp
+++ b/mailnews/base/util/nsMsgIncomingServer.cpp
@@ -750,7 +750,7 @@ nsMsgIncomingServer::GetConstructedPrettyName(PRUnichar **retval)
   if ((const char*)username &&
       PL_strcmp((const char*)username, "")!=0) {
     prettyName.AssignWithConversion(username);
-    prettyName.Append(NS_LITERAL_STRING(" on "));
+    prettyName.AppendLiteral(" on ");
   }
   
   nsXPIDLCString hostname;
@@ -1866,10 +1866,10 @@ nsMsgIncomingServer::ConfigureTemporaryServerSpamFilters(nsIMsgFilterList *filte
   // check if filters have been setup already.
   nsAutoString yesFilterName, noFilterName;
   yesFilterName.AppendWithConversion(serverFilterName);
-  yesFilterName.AppendWithConversion("Yes");
+  yesFilterName.AppendLiteral("Yes");
 
   noFilterName.AppendWithConversion(serverFilterName);
-  noFilterName.AppendWithConversion("No");
+  noFilterName.AppendLiteral("No");
 
   nsCOMPtr newFilter;
   (void) filterList->GetFilterNamed(yesFilterName.get(),
diff --git a/mailnews/base/util/nsMsgProtocol.cpp b/mailnews/base/util/nsMsgProtocol.cpp
index 1704e526d252..87089d9668ad 100644
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -405,7 +405,7 @@ NS_IMETHODIMP nsMsgProtocol::OnStopRequest(nsIRequest *request, nsISupports *ctx
         {
           nsAutoString resultString(NS_LITERAL_STRING("[StringID "));
           resultString.AppendInt(errorID);
-          resultString.Append(NS_LITERAL_STRING("?]"));
+          resultString.AppendLiteral("?]");
           errorMsg = ToNewUnicode(resultString);
         }
         rv = msgPrompt->Alert(nsnull, errorMsg);
@@ -571,7 +571,7 @@ NS_IMETHODIMP nsMsgProtocol::GetContentType(nsACString &aContentType)
   // a part in the message that has a content type that is not message/rfc822
 
   if (m_ContentType.IsEmpty())
-    aContentType = NS_LITERAL_CSTRING("message/rfc822");
+    aContentType.AssignLiteral("message/rfc822");
   else
     aContentType = m_ContentType;
   return NS_OK;
diff --git a/mailnews/base/util/nsMsgUtils.cpp b/mailnews/base/util/nsMsgUtils.cpp
index a25ed463ede8..fb58110e0ba5 100644
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -204,22 +204,22 @@ nsresult NS_MsgGetUntranslatedPriorityName (nsMsgPriorityValue p, nsString *outN
 	{
 	case nsMsgPriority::notSet:
 	case nsMsgPriority::none:
-		outName->Assign(NS_LITERAL_STRING("None"));
+		outName->AssignLiteral("None");
 		break;
 	case nsMsgPriority::lowest:
-		outName->Assign(NS_LITERAL_STRING("Lowest"));
+		outName->AssignLiteral("Lowest");
 		break;
 	case nsMsgPriority::low:
-		outName->Assign(NS_LITERAL_STRING("Low"));
+		outName->AssignLiteral("Low");
 		break;
 	case nsMsgPriority::normal:
-		outName->Assign(NS_LITERAL_STRING("Normal"));
+		outName->AssignLiteral("Normal");
 		break;
 	case nsMsgPriority::high:
-		outName->Assign(NS_LITERAL_STRING("High"));
+		outName->AssignLiteral("High");
 		break;
 	case nsMsgPriority::highest:
-		outName->Assign(NS_LITERAL_STRING("Highest"));
+		outName->AssignLiteral("Highest");
 		break;
 	default:
 		NS_ASSERTION(PR_FALSE, "invalid priority value");
diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp
index 2c7ecaf79116..abc153a8654a 100644
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -511,7 +511,7 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix,
     if (!aPrefix.IsEmpty())
     {
       if (!aHTMLEditor)
-        aPrefix.Append(NS_LITERAL_STRING("\n"));
+        aPrefix.AppendLiteral("\n");
       textEditor->InsertText(aPrefix);
       m_editor->EndOfDocument();
     }
@@ -1084,7 +1084,7 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_DeliverMode deliverMode, nsIMsgIdentity
                   attachment->SetName(NS_LITERAL_STRING("vcard.vcf"));
               else
               {
-                  userid.Append(NS_LITERAL_CSTRING(".vcf"));
+                  userid.AppendLiteral(".vcf");
                   attachment->SetName(NS_ConvertASCIItoUCS2(userid));
               }
  
@@ -1800,7 +1800,7 @@ QuotingOutputStreamListener::QuotingOutputStreamListener(const char * originalMs
       PRInt32 reply_on_top = 0;
       mIdentity->GetReplyOnTop(&reply_on_top);
       if (reply_on_top == 1)
-        mCitePrefix += NS_LITERAL_STRING("\n\n");
+        mCitePrefix.AppendLiteral("\n\n");
 
       
       PRBool header, headerDate;
@@ -1961,9 +1961,9 @@ QuotingOutputStreamListener::QuotingOutputStreamListener(const char * originalMs
                                 getter_Copies(replyHeaderColon),
                                 getter_Copies(replyHeaderOriginalmessage));
       }
-      mCitePrefix.Append(NS_LITERAL_STRING("\n\n"));
+      mCitePrefix.AppendLiteral("\n\n");
       mCitePrefix.Append(replyHeaderOriginalmessage);
-      mCitePrefix.Append(NS_LITERAL_STRING("\n"));
+      mCitePrefix.AppendLiteral("\n");
     }
   }
 }
@@ -2009,7 +2009,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIRequest *request, ns
       compose->GetCompFields(getter_AddRefs(compFields));
       if (compFields)
       {
-        aCharset = NS_LITERAL_STRING("UTF-8");
+        aCharset.AssignLiteral("UTF-8");
         nsAutoString recipient;
         nsAutoString cc;
         nsAutoString replyTo;
@@ -2042,7 +2042,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIRequest *request, ns
           }
               
           if (recipient.Length() > 0 && cc.Length() > 0)
-            recipient.Append(NS_LITERAL_STRING(", "));
+            recipient.AppendLiteral(", ");
           recipient += cc;
           compFields->SetCc(recipient);
 
@@ -2179,7 +2179,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIRequest *request, ns
 #endif
 
     if (! mHeadersOnly)
-      mMsgBody.Append(NS_LITERAL_STRING(""));
+      mMsgBody.AppendLiteral("");
     
     // Now we have an HTML representation of the quoted message.
     // If we are in plain text mode, we need to convert this to plain
@@ -2355,7 +2355,7 @@ QuotingOutputStreamListener::InsertToCompose(nsIEditor *aEditor,
     if (!mCitePrefix.IsEmpty())
     {
       if (!aHTMLEditor)
-        mCitePrefix.Append(NS_LITERAL_STRING("\n"));
+        mCitePrefix.AppendLiteral("\n");
       nsCOMPtr textEditor (do_QueryInterface(aEditor));
       if (textEditor)
         textEditor->InsertText(mCitePrefix);
@@ -2807,8 +2807,7 @@ nsresult nsMsgComposeSendListener::OnStopSending(const char *aMsgID, nsresult aS
       {
         if (!fieldsFCC.IsEmpty())
         {
-          if (fieldsFCC.Equals(NS_LITERAL_STRING("nocopy://"),
-                               nsCaseInsensitiveStringComparator()))
+          if (fieldsFCC.LowerCaseEqualsLiteral("nocopy://"))
           {
             compose->NotifyStateListeners(eComposeProcessDone, NS_OK);
             if (progress)
@@ -3410,11 +3409,11 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, PRBool aQuoted, nsStrin
       if (reply_on_top != 1 || sig_bottom || !aQuoted)
         sigOutput.AppendWithConversion(dashes);
       sigOutput.AppendWithConversion(htmlBreak);
-      sigOutput.Append(NS_LITERAL_STRING(""));
+      sigOutput.AppendLiteral("\" border=0>");
       sigOutput.AppendWithConversion(htmlsigclose);
     }
   }
@@ -3989,7 +3988,7 @@ NS_IMETHODIMP nsMsgCompose::CheckAndPopulateRecipients(PRBool populateMailList,
                     {
                       //oops, parser problem! I will try to do my best...
                       fullNameStr = pDisplayName;
-                      fullNameStr.Append(NS_LITERAL_STRING(" <"));
+                      fullNameStr.AppendLiteral(" <");
                       if (bIsMailList)
                       {
                         if (pEmail && pEmail[0] != 0)
@@ -4195,56 +4194,56 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node,  PRInt32 *_retval)
 
     nsCOMPtr pItem;
     if      (
-              element.EqualsIgnoreCase("#text") ||
-              element.EqualsIgnoreCase("br") ||
-              element.EqualsIgnoreCase("p") ||
-              element.EqualsIgnoreCase("pre") ||
-              element.EqualsIgnoreCase("tt") ||
-              element.EqualsIgnoreCase("html") ||
-              element.EqualsIgnoreCase("head") ||
-              element.EqualsIgnoreCase("title")
+              element.LowerCaseEqualsLiteral("#text") ||
+              element.LowerCaseEqualsLiteral("br") ||
+              element.LowerCaseEqualsLiteral("p") ||
+              element.LowerCaseEqualsLiteral("pre") ||
+              element.LowerCaseEqualsLiteral("tt") ||
+              element.LowerCaseEqualsLiteral("html") ||
+              element.LowerCaseEqualsLiteral("head") ||
+              element.LowerCaseEqualsLiteral("title")
             )
     {
       *_retval = nsIMsgCompConvertible::Plain;
     }
     else if (
-              //element.EqualsIgnoreCase("blockquote") || // see below
-              element.EqualsIgnoreCase("ul") ||
-              element.EqualsIgnoreCase("ol") ||
-              element.EqualsIgnoreCase("li") ||
-              element.EqualsIgnoreCase("dl") ||
-              element.EqualsIgnoreCase("dt") ||
-              element.EqualsIgnoreCase("dd")
+              //element.LowerCaseEqualsLiteral("blockquote") || // see below
+              element.LowerCaseEqualsLiteral("ul") ||
+              element.LowerCaseEqualsLiteral("ol") ||
+              element.LowerCaseEqualsLiteral("li") ||
+              element.LowerCaseEqualsLiteral("dl") ||
+              element.LowerCaseEqualsLiteral("dt") ||
+              element.LowerCaseEqualsLiteral("dd")
             )
     {
       *_retval = nsIMsgCompConvertible::Yes;
     }
     else if (
-              //element.EqualsIgnoreCase("a") || // see below
-              element.EqualsIgnoreCase("h1") ||
-              element.EqualsIgnoreCase("h2") ||
-              element.EqualsIgnoreCase("h3") ||
-              element.EqualsIgnoreCase("h4") ||
-              element.EqualsIgnoreCase("h5") ||
-              element.EqualsIgnoreCase("h6") ||
-              element.EqualsIgnoreCase("hr") ||
+              //element.LowerCaseEqualsLiteral("a") || // see below
+              element.LowerCaseEqualsLiteral("h1") ||
+              element.LowerCaseEqualsLiteral("h2") ||
+              element.LowerCaseEqualsLiteral("h3") ||
+              element.LowerCaseEqualsLiteral("h4") ||
+              element.LowerCaseEqualsLiteral("h5") ||
+              element.LowerCaseEqualsLiteral("h6") ||
+              element.LowerCaseEqualsLiteral("hr") ||
               (
                 mConvertStructs
                 &&
                 (
-                  element.EqualsIgnoreCase("em") ||
-                  element.EqualsIgnoreCase("strong") ||
-                  element.EqualsIgnoreCase("code") ||
-                  element.EqualsIgnoreCase("b") ||
-                  element.EqualsIgnoreCase("i") ||
-                  element.EqualsIgnoreCase("u")
+                  element.LowerCaseEqualsLiteral("em") ||
+                  element.LowerCaseEqualsLiteral("strong") ||
+                  element.LowerCaseEqualsLiteral("code") ||
+                  element.LowerCaseEqualsLiteral("b") ||
+                  element.LowerCaseEqualsLiteral("i") ||
+                  element.LowerCaseEqualsLiteral("u")
                 )
               )
             )
     {
       *_retval = nsIMsgCompConvertible::Altering;
     }
-    else if (element.EqualsIgnoreCase("body"))
+    else if (element.LowerCaseEqualsLiteral("body"))
     {
       *_retval = nsIMsgCompConvertible::Plain;
 
@@ -4265,7 +4264,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node,  PRInt32 *_retval)
         else if (NS_SUCCEEDED(domElement->HasAttribute(NS_LITERAL_STRING("bgcolor"), &hasAttribute)) &&
                  hasAttribute &&
                  NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING("bgcolor"), color)) &&
-                 !color.Equals(NS_LITERAL_STRING("#FFFFFF"), nsCaseInsensitiveStringComparator())) {
+                 !color.LowerCaseEqualsLiteral("#ffffff")) {
           *_retval = nsIMsgCompConvertible::Altering;
         }
 		else if (NS_SUCCEEDED(domElement->HasAttribute(NS_LITERAL_STRING("dir"), &hasAttribute))
@@ -4276,7 +4275,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node,  PRInt32 *_retval)
       }
 
     }
-    else if (element.EqualsIgnoreCase("blockquote"))
+    else if (element.LowerCaseEqualsLiteral("blockquote"))
     {
       // Skip 
*_retval = nsIMsgCompConvertible::Yes; @@ -4285,7 +4284,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) if (NS_SUCCEEDED(node->GetAttributes(getter_AddRefs(pAttributes))) && pAttributes) { - nsAutoString typeName; typeName.Assign(NS_LITERAL_STRING("type")); + nsAutoString typeName; typeName.AssignLiteral("type"); if (NS_SUCCEEDED(pAttributes->GetNamedItem(typeName, getter_AddRefs(pItem))) && pItem) @@ -4294,17 +4293,16 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) if (NS_SUCCEEDED(pItem->GetNodeValue(typeValue))) { typeValue.StripChars("\""); - if (typeValue.Equals(NS_LITERAL_STRING("cite"), - nsCaseInsensitiveStringComparator())) + if (typeValue.LowerCaseEqualsLiteral("cite")) *_retval = nsIMsgCompConvertible::Plain; } } } } else if ( - element.EqualsIgnoreCase("div") || - element.EqualsIgnoreCase("span") || - element.EqualsIgnoreCase("a") + element.LowerCaseEqualsLiteral("div") || + element.LowerCaseEqualsLiteral("span") || + element.LowerCaseEqualsLiteral("a") ) { /* Do some special checks for these tags. They are inside this |else if| @@ -4321,7 +4319,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) && pAttributes) { nsAutoString className; - className.Assign(NS_LITERAL_STRING("class")); + className.AssignLiteral("class"); if (NS_SUCCEEDED(pAttributes->GetNamedItem(className, getter_AddRefs(pItem))) && pItem) @@ -4338,7 +4336,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) } // Maybe, it's an element inserted by another recognizer (e.g. 4.x') - if (element.EqualsIgnoreCase("a")) + if (element.LowerCaseEqualsLiteral("a")) { /* Ignore anchor tag, if the URI is the same as the text (as inserted by recognizers) */ @@ -4347,7 +4345,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) if (NS_SUCCEEDED(node->GetAttributes(getter_AddRefs(pAttributes))) && pAttributes) { - nsAutoString hrefName; hrefName.Assign(NS_LITERAL_STRING("href")); + nsAutoString hrefName; hrefName.AssignLiteral("href"); if (NS_SUCCEEDED(pAttributes->GetNamedItem(hrefName, getter_AddRefs(pItem))) && pItem) @@ -4375,8 +4373,8 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) // Lastly, test, if it is just a "simple"
or else if ( - element.EqualsIgnoreCase("div") || - element.EqualsIgnoreCase("span") + element.LowerCaseEqualsLiteral("div") || + element.LowerCaseEqualsLiteral("span") ) { /* skip only if no style attribute */ @@ -4386,7 +4384,7 @@ nsresult nsMsgCompose::TagConvertible(nsIDOMNode *node, PRInt32 *_retval) && pAttributes) { nsAutoString styleName; - styleName.Assign(NS_LITERAL_STRING("style")); + styleName.AssignLiteral("style"); if (NS_SUCCEEDED(pAttributes->GetNamedItem(styleName, getter_AddRefs(pItem))) && pItem) @@ -4496,7 +4494,7 @@ nsresult nsMsgCompose::SetSignature(nsIMsgIdentity *identity) { nsAutoString attributeName; nsAutoString attributeValue; - attributeName.Assign(NS_LITERAL_STRING("class")); + attributeName.AssignLiteral("class"); rv = element->GetAttribute(attributeName, attributeValue); if (NS_SUCCEEDED(rv)) @@ -4746,7 +4744,7 @@ nsMsgMailList::nsMsgMailList(nsString listName, nsString listDescription, nsIAbD { //oops, parser problem! I will try to do my best... mFullName = listName; - mFullName.Append(NS_LITERAL_STRING(" <")); + mFullName.AppendLiteral(" <"); if (listDescription.IsEmpty()) mFullName += listName; else diff --git a/mailnews/compose/src/nsMsgPrompts.cpp b/mailnews/compose/src/nsMsgPrompts.cpp index 60163ab2e716..9fc299610dbe 100644 --- a/mailnews/compose/src/nsMsgPrompts.cpp +++ b/mailnews/compose/src/nsMsgPrompts.cpp @@ -61,12 +61,12 @@ nsMsgBuildErrorMessageByID(PRInt32 msgID, nsString& retval, nsString* param0, ns nsString target; if (param0) { - target.Assign(NS_LITERAL_STRING("%P0%")); + target.AssignLiteral("%P0%"); retval.ReplaceSubstring(target, *param0); } if (param1) { - target.Assign(NS_LITERAL_STRING("%P1%")); + target.AssignLiteral("%P1%"); retval.ReplaceSubstring(target, *param1); } } diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp index dad8c3b60c50..e447531ecc03 100644 --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -1463,7 +1463,7 @@ nsMsgComposeAndSend::GetEmbeddedObjectInfo(nsIDOMNode *node, nsMsgAttachmentData { nsAutoString attributeValue; if (NS_SUCCEEDED(domElement->GetAttribute(NS_LITERAL_STRING("moz-do-not-send"), attributeValue))) - if (attributeValue.Equals(NS_LITERAL_STRING("true"), nsCaseInsensitiveStringComparator())) + if (attributeValue.LowerCaseEqualsLiteral("true")) return NS_OK; } diff --git a/mailnews/compose/src/nsMsgSendReport.cpp b/mailnews/compose/src/nsMsgSendReport.cpp index 08cb0eaeeff5..429cbc0e749a 100644 --- a/mailnews/compose/src/nsMsgSendReport.cpp +++ b/mailnews/compose/src/nsMsgSendReport.cpp @@ -366,7 +366,7 @@ NS_IMETHODIMP nsMsgSendReport::DisplayReport(nsIPrompt *prompt, PRBool showError if (! currMessage.Equals(temp)) { if (! dialogMessage.IsEmpty()) - temp.Append(NS_LITERAL_STRING("\n")); + temp.AppendLiteral("\n"); temp.Append(currMessage); dialogMessage.Assign(temp); } @@ -379,7 +379,7 @@ NS_IMETHODIMP nsMsgSendReport::DisplayReport(nsIPrompt *prompt, PRBool showError composebundle->GetStringByID(NS_MSG_ASK_TO_COMEBACK_TO_COMPOSE, getter_Copies(text1)); nsAutoString temp((const PRUnichar *)dialogMessage); // Because of bug 74726, we cannot use directly an XPIDLString if (! dialogMessage.IsEmpty()) - temp.Append(NS_LITERAL_STRING("\n")); + temp.AppendLiteral("\n"); temp.Append(text1); dialogMessage.Assign(temp); nsMsgAskBooleanQuestionByString(prompt, dialogMessage, &oopsGiveMeBackTheComposeWindow, dialogTitle); @@ -432,7 +432,7 @@ NS_IMETHODIMP nsMsgSendReport::DisplayReport(nsIPrompt *prompt, PRBool showError { nsAutoString temp((const PRUnichar *)dialogMessage); // Because of bug 74726, we cannot use directly an XPIDLString if (! dialogMessage.IsEmpty()) - temp.Append(NS_LITERAL_STRING("\n")); + temp.AppendLiteral("\n"); temp.Append(currMessage); dialogMessage.Assign(temp); } diff --git a/mailnews/compose/src/nsSmtpProtocol.cpp b/mailnews/compose/src/nsSmtpProtocol.cpp index 806d6463ea56..5197de179296 100644 --- a/mailnews/compose/src/nsSmtpProtocol.cpp +++ b/mailnews/compose/src/nsSmtpProtocol.cpp @@ -369,9 +369,9 @@ void nsSmtpProtocol::GetUserDomainName(nsACString& aResult) "unexpected IPv4-mapped IPv6 address"); if (iaddr.raw.family == PR_AF_INET6) // IPv6 style address? - aResult.Assign(NS_LITERAL_CSTRING("[IPv6:")); + aResult.AssignLiteral("[IPv6:"); else - aResult.Assign(NS_LITERAL_CSTRING("[")); + aResult.AssignLiteral("["); aResult.Append(nsDependentCString(ipAddressString) + NS_LITERAL_CSTRING("]")); } diff --git a/mailnews/db/msgdb/src/nsMailDatabase.cpp b/mailnews/db/msgdb/src/nsMailDatabase.cpp index 93eea5ebca76..dc32afad0864 100644 --- a/mailnews/db/msgdb/src/nsMailDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp @@ -536,22 +536,22 @@ NS_IMETHODIMP nsMailDatabase::GetSummaryValid(PRBool *aResult) #else if (!*aResult) { - errorMsg.AppendWithConversion("time stamp didn't match delta = "); + errorMsg.AppendLiteral("time stamp didn't match delta = "); errorMsg.AppendInt(actualFolderTimeStamp - folderDate); - errorMsg.AppendWithConversion(" leeway = "); + errorMsg.AppendLiteral(" leeway = "); errorMsg.AppendInt(gTimeStampLeeway); } } else if (folderSize != m_folderSpec->GetFileSize()) { - errorMsg.AppendWithConversion("folder size didn't match db size = "); + errorMsg.AppendLiteral("folder size didn't match db size = "); errorMsg.AppendInt(folderSize); - errorMsg.AppendWithConversion(" actual size = "); + errorMsg.AppendLiteral(" actual size = "); errorMsg.AppendInt(m_folderSpec->GetFileSize()); } else if (numUnreadMessages < 0) { - errorMsg.AppendWithConversion("numUnreadMessages < 0"); + errorMsg.AppendLiteral("numUnreadMessages < 0"); } } if (errorMsg.Length()) diff --git a/mailnews/extensions/palmsync/src/nsAbPalmSync.cpp b/mailnews/extensions/palmsync/src/nsAbPalmSync.cpp index 9bc3e97e4c14..21c5865d7aa2 100644 --- a/mailnews/extensions/palmsync/src/nsAbPalmSync.cpp +++ b/mailnews/extensions/palmsync/src/nsAbPalmSync.cpp @@ -234,7 +234,7 @@ nsresult nsAbPalmHotSync::GetABInterface() // to match "Personal" category. if(description == mAbName || (prefName.Equals("ldap_2.servers.pab", nsCaseInsensitiveCStringComparator()) - && mAbName.Equals(NS_LITERAL_STRING("Personal"), nsCaseInsensitiveStringComparator()))) + && mAbName.LowerCaseEqualsLiteral("personal"))) break; directory = nsnull; } diff --git a/mailnews/imap/src/nsIMAPHostSessionList.cpp b/mailnews/imap/src/nsIMAPHostSessionList.cpp index eb87b469d5ef..24ec01056934 100644 --- a/mailnews/imap/src/nsIMAPHostSessionList.cpp +++ b/mailnews/imap/src/nsIMAPHostSessionList.cpp @@ -722,7 +722,7 @@ NS_IMETHODIMP nsIMAPHostSessionList::GetOnlineInboxPathForHost(const char *serve if (ns) { result.AssignWithConversion(ns->GetPrefix()); - result.Append(NS_LITERAL_STRING("INBOX")); + result.AppendLiteral("INBOX"); } } else diff --git a/mailnews/imap/src/nsImapIncomingServer.cpp b/mailnews/imap/src/nsImapIncomingServer.cpp index 59e500b32536..ec8eb36bd09b 100644 --- a/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mailnews/imap/src/nsImapIncomingServer.cpp @@ -229,7 +229,7 @@ nsImapIncomingServer::GetConstructedPrettyName(PRUnichar **retval) if ((const char*)username && (const char *) hostName && PL_strcmp((const char*)username, "")!=0) { emailAddress.AssignWithConversion(username); - emailAddress.Append(NS_LITERAL_STRING("@")); + emailAddress.AppendLiteral("@"); emailAddress.AppendWithConversion(hostName); } @@ -3450,12 +3450,12 @@ nsImapIncomingServer::GeneratePrettyNameForMigration(PRUnichar **aPrettyName) // Construct pretty name from username and hostname nsAutoString constructedPrettyName; constructedPrettyName.AssignWithConversion(userName); - constructedPrettyName.Append(NS_LITERAL_STRING("@")); + constructedPrettyName.AppendLiteral("@"); constructedPrettyName.AppendWithConversion(hostName); // If the port is valid and not default, add port value to the pretty name if ((serverPort > 0) && (!isItDefaultPort)) { - constructedPrettyName.Append(NS_LITERAL_STRING(":")); + constructedPrettyName.AppendLiteral(":"); constructedPrettyName.AppendInt(serverPort); } diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 97f456d8e17a..b8b47c890c81 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -376,8 +376,7 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolderWithPath(nsAString& name, nsIFileSpe if(NS_SUCCEEDED(rv)) { if(isServer && - name.Equals(NS_LITERAL_STRING("Inbox"), - nsCaseInsensitiveStringComparator())) + name.LowerCaseEqualsLiteral("inbox")) flags |= MSG_FOLDER_FLAG_INBOX; else if(isServer || isParentInbox) { @@ -387,11 +386,11 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolderWithPath(nsAString& name, nsIFileSpe flags |= MSG_FOLDER_FLAG_TRASH; } #if 0 - else if(name.Equals(NS_LITERAL_STRING("Sent"), nsCaseInsensitiveStringComparator())) + else if(name.LowerCaseEqualsLiteral("sent")) folder->SetFlag(MSG_FOLDER_FLAG_SENTMAIL); - else if(name.Equals(NS_LITERAL_STRING("Drafts"), nsCaseInsensitiveStringComparator())) + else if(name.LowerCaseEqualsLiteral("drafts")) folder->SetFlag(MSG_FOLDER_FLAG_DRAFTS); - else if (name.Equals(NS_LITERAL_STRING("Templates"), nsCaseInsensitiveStringComparator())) + else if (name.LowerCaseEqualsLiteral("templates")) folder->SetFlag(MSG_FOLDER_FLAG_TEMPLATES); #endif } @@ -787,7 +786,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateSubfolder(const PRUnichar* folderName, nsI ThrowAlertMsg("folderExists", msgWindow); return NS_MSG_FOLDER_EXISTS; } - else if (mIsServer && nsDependentString(folderName).Equals(NS_LITERAL_STRING("Inbox"),nsCaseInsensitiveStringComparator()) ) // Inbox, a special folder + else if (mIsServer && nsDependentString(folderName).LowerCaseEqualsLiteral("inbox") ) // Inbox, a special folder { ThrowAlertMsg("folderExists", msgWindow); return NS_MSG_FOLDER_EXISTS; @@ -5650,49 +5649,49 @@ nsresult nsMsgIMAPFolderACL::CreateACLRightsString(PRUnichar **rightsString) } if (GetCanIWriteFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_WRITE_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanIInsertInFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_INSERT_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanILookupFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_LOOKUP_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanIStoreSeenInFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_SEEN_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanIDeleteInFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_DELETE_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanICreateSubfolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_CREATE_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanIPostToFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_POST_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } if (GetCanIAdministerFolder()) { - if (!rights.IsEmpty()) rights += NS_LITERAL_STRING(", "); + if (!rights.IsEmpty()) rights.AppendLiteral(", "); bundle->GetStringFromID(IMAP_ACL_ADMINISTER_RIGHT, getter_Copies(curRight)); rights.Append(curRight); } @@ -6842,7 +6841,7 @@ NS_IMETHODIMP nsImapMailFolder::MatchName(nsString *name, PRBool *matches) { if (!matches) return NS_ERROR_NULL_POINTER; - PRBool isInbox = mName.EqualsIgnoreCase("inbox"); + PRBool isInbox = mName.LowerCaseEqualsLiteral("inbox"); if (isInbox) *matches = mName.Equals(*name, nsCaseInsensitiveStringComparator()); else diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index 885acc70e048..a54410b70c62 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -8159,9 +8159,9 @@ NS_IMETHODIMP nsImapMockChannel::GetContentType(nsACString &aContentType) } } if (imapAction == nsIImapUrl::nsImapSelectFolder) - aContentType = NS_LITERAL_CSTRING("x-application-imapfolder"); + aContentType.AssignLiteral("x-application-imapfolder"); else - aContentType = NS_LITERAL_CSTRING("message/rfc822"); + aContentType.AssignLiteral("message/rfc822"); } else aContentType = m_ContentType; diff --git a/mailnews/imap/src/nsImapUndoTxn.cpp b/mailnews/imap/src/nsImapUndoTxn.cpp index d3dee235544c..a0b0d0225180 100644 --- a/mailnews/imap/src/nsImapUndoTxn.cpp +++ b/mailnews/imap/src/nsImapUndoTxn.cpp @@ -85,7 +85,7 @@ nsImapMoveCopyMsgTxn::Init( nsCString protocolType(uri); protocolType.SetLength(protocolType.FindChar(':')); // ** jt -- only do this for mailbox protocol - if (protocolType.EqualsIgnoreCase("mailbox")) + if (protocolType.LowerCaseEqualsLiteral("mailbox")) { m_srcIsPop3 = PR_TRUE; PRUint32 i, count = m_srcKeyArray.GetSize(); diff --git a/mailnews/import/comm4x/src/nsComm4xMail.cpp b/mailnews/import/comm4x/src/nsComm4xMail.cpp index 95cd2a1f3e7a..6795e9b25e1d 100644 --- a/mailnews/import/comm4x/src/nsComm4xMail.cpp +++ b/mailnews/import/comm4x/src/nsComm4xMail.cpp @@ -78,17 +78,17 @@ nsShouldIgnoreFile(nsString& name) if (firstChar == '.' || firstChar == '#' || name.CharAt(name.Length() - 1) == '~') return PR_TRUE; - if (name.EqualsIgnoreCase("rules.dat") || name.EqualsIgnoreCase("rulesbackup.dat")) + if (name.LowerCaseEqualsLiteral("rules.dat") || name.LowerCaseEqualsLiteral("rulesbackup.dat")) return PR_TRUE; // don't add summary files to the list of folders; // don't add popstate files to the list either, or rules (sort.dat). if (nsStringEndsWith(name, ".snm") || - name.EqualsIgnoreCase("popstate.dat") || - name.EqualsIgnoreCase("sort.dat") || - name.EqualsIgnoreCase("mailfilt.log") || - name.EqualsIgnoreCase("filters.js") || + name.LowerCaseEqualsLiteral("popstate.dat") || + name.LowerCaseEqualsLiteral("sort.dat") || + name.LowerCaseEqualsLiteral("mailfilt.log") || + name.LowerCaseEqualsLiteral("filters.js") || nsStringEndsWith(name, ".toc")|| nsStringEndsWith(name,".sbd")) return PR_TRUE; diff --git a/mailnews/import/eudora/src/nsEudoraCompose.cpp b/mailnews/import/eudora/src/nsEudoraCompose.cpp index 6b3337d26662..eb4d5f4e7eda 100644 --- a/mailnews/import/eudora/src/nsEudoraCompose.cpp +++ b/mailnews/import/eudora/src/nsEudoraCompose.cpp @@ -521,7 +521,7 @@ void nsEudoraCompose::ExtractType( nsString& str) // valid multipart! if (str.Length() > 10) { str.Left( tStr, 10); - if (tStr.Equals(NS_LITERAL_STRING("multipart/"), nsCaseInsensitiveStringComparator())) + if (tStr.LowerCaseEqualsLiteral("multipart/")) str.Truncate(); } } diff --git a/mailnews/import/eudora/src/nsEudoraStringBundle.cpp b/mailnews/import/eudora/src/nsEudoraStringBundle.cpp index 60a2cd91f889..04d8db8f5ea0 100644 --- a/mailnews/import/eudora/src/nsEudoraStringBundle.cpp +++ b/mailnews/import/eudora/src/nsEudoraStringBundle.cpp @@ -114,7 +114,7 @@ PRUnichar *nsEudoraStringBundle::GetStringByID(PRInt32 stringID, nsIStringBundle nsString resultString(NS_LITERAL_STRING("[StringID ")); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); return ToNewUnicode(resultString); } diff --git a/mailnews/import/eudora/src/nsEudoraWin32.cpp b/mailnews/import/eudora/src/nsEudoraWin32.cpp index d428380aafc5..773eb829c29c 100644 --- a/mailnews/import/eudora/src/nsEudoraWin32.cpp +++ b/mailnews/import/eudora/src/nsEudoraWin32.cpp @@ -710,7 +710,7 @@ void nsEudoraWin32::GetAccountName( const char *pSection, nsString& str) nsCString s(pSection); if (s.Equals(NS_LITERAL_CSTRING("Settings"), nsCaseInsensitiveCStringComparator())) { - str.Assign(NS_LITERAL_STRING("Eudora ")); + str.AssignLiteral("Eudora "); str.AppendWithConversion( pSection); } else { @@ -1393,8 +1393,7 @@ nsresult nsEudoraWin32::FoundAddressBook( nsIFileSpec *spec, const PRUnichar *pN nsCRT::free( pLeaf); nsString tStr; name.Right( tStr, 4); - if (tStr.Equals(NS_LITERAL_STRING(".txt"), - nsCaseInsensitiveStringComparator())) { + if (tStr.LowerCaseEqualsLiteral(".txt")) { name.Left( tStr, name.Length() - 4); name = tStr; } diff --git a/mailnews/import/oexpress/nsOEStringBundle.cpp b/mailnews/import/oexpress/nsOEStringBundle.cpp index 314e36005d46..7439c415d8f0 100644 --- a/mailnews/import/oexpress/nsOEStringBundle.cpp +++ b/mailnews/import/oexpress/nsOEStringBundle.cpp @@ -112,9 +112,9 @@ PRUnichar *nsOEStringBundle::GetStringByID(PRInt32 stringID, nsIStringBundle *pB } nsString resultString; - resultString.Append(NS_LITERAL_STRING("[StringID ")); + resultString.AppendLiteral("[StringID "); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); return( ToNewUnicode(resultString)); } diff --git a/mailnews/import/outlook/src/MapiApi.cpp b/mailnews/import/outlook/src/MapiApi.cpp index 020147d8ce0b..34878271c716 100644 --- a/mailnews/import/outlook/src/MapiApi.cpp +++ b/mailnews/import/outlook/src/MapiApi.cpp @@ -1495,7 +1495,7 @@ void CMapiFolderList::AddItem( CMapiFolder *pFolder) void CMapiFolderList::ChangeName( nsString& name) { if (name.IsEmpty()) { - name.Assign(NS_LITERAL_STRING("1")); + name.AssignLiteral("1"); return; } PRUnichar lastC = name.Last(); @@ -1504,14 +1504,14 @@ void CMapiFolderList::ChangeName( nsString& name) if (lastC > '9') { lastC = '1'; name.SetCharAt( lastC, name.Length() - 1); - name.Append(NS_LITERAL_STRING("0")); + name.AppendLiteral("0"); } else { name.SetCharAt( lastC, name.Length() - 1); } } else { - name.Append(NS_LITERAL_STRING(" 2")); + name.AppendLiteral(" 2"); } } @@ -1564,7 +1564,7 @@ void CMapiFolderList::GenerateFilePath( CMapiFolder *pFolder) pCurrent = (CMapiFolder *) GetAt( i); if (pCurrent->GetDepth() == (pFolder->GetDepth() - 1)) { pCurrent->GetFilePath( path); - path.Append(NS_LITERAL_STRING(".sbd\\")); + path.AppendLiteral(".sbd\\"); pFolder->GetDisplayName( name); path += name; pFolder->SetFilePath(path.get()); diff --git a/mailnews/import/outlook/src/nsOutlookCompose.cpp b/mailnews/import/outlook/src/nsOutlookCompose.cpp index 37dcfd29b355..4202b61e666e 100644 --- a/mailnews/import/outlook/src/nsOutlookCompose.cpp +++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp @@ -235,7 +235,7 @@ nsresult nsOutlookCompose::CreateIdentity( void) if (NS_FAILED(rv)) return( rv); rv = accMgr->CreateIdentity( &m_pIdentity); nsString name; - name.Assign(NS_LITERAL_STRING("Import Identity")); + name.AssignLiteral("Import Identity"); if (m_pIdentity) { m_pIdentity->SetFullName( name.get()); m_pIdentity->SetIdentityName( name.get()); @@ -515,7 +515,7 @@ void nsOutlookCompose::ExtractType( nsString& str) // valid multipart! if (str.Length() > 10) { str.Left( tStr, 10); - if (tStr.Equals(NS_LITERAL_STRING("multipart/"), nsCaseInsensitiveStringComparator())) + if (tStr.LowerCaseEqualsLiteral("multipart/")) str.Truncate(); } } diff --git a/mailnews/import/outlook/src/nsOutlookMail.cpp b/mailnews/import/outlook/src/nsOutlookMail.cpp index 2799d1e5d8c8..1a4e8e2ada33 100644 --- a/mailnews/import/outlook/src/nsOutlookMail.cpp +++ b/mailnews/import/outlook/src/nsOutlookMail.cpp @@ -217,9 +217,9 @@ nsresult nsOutlookMail::GetMailFolders( nsISupportsArray **pArray) PRBool nsOutlookMail::IsAddressBookNameUnique( nsString& name, nsString& list) { nsString usedName; - usedName.Append(NS_LITERAL_STRING("[")); + usedName.AppendLiteral("["); usedName.Append( name); - usedName.Append(NS_LITERAL_STRING("],")); + usedName.AppendLiteral("],"); return( list.Find( usedName) == -1); } @@ -238,9 +238,9 @@ void nsOutlookMail::MakeAddressBookNameUnique( nsString& name, nsString& list) } name = newName; - list.Append(NS_LITERAL_STRING("[")); + list.AppendLiteral("["); list.Append( name); - list.Append(NS_LITERAL_STRING("],")); + list.AppendLiteral("],"); } nsresult nsOutlookMail::GetAddressBooks( nsISupportsArray **pArray) @@ -490,7 +490,7 @@ nsresult nsOutlookMail::ImportMailbox( PRUint32 *pDoneSoFar, PRBool *pAbort, PRI nsAutoString folderName(pName); nsMsgDeliverMode mode = nsIMsgSend::nsMsgDeliverNow; mode = nsIMsgSend::nsMsgSaveAsDraft; - if ( folderName.Equals(NS_LITERAL_STRING("Drafts"), nsCaseInsensitiveStringComparator()) ) + if ( folderName.LowerCaseEqualsLiteral("drafts") ) mode = nsIMsgSend::nsMsgSaveAsDraft; /* diff --git a/mailnews/import/outlook/src/nsOutlookStringBundle.cpp b/mailnews/import/outlook/src/nsOutlookStringBundle.cpp index 3112e1491734..720afa6a434a 100644 --- a/mailnews/import/outlook/src/nsOutlookStringBundle.cpp +++ b/mailnews/import/outlook/src/nsOutlookStringBundle.cpp @@ -112,9 +112,9 @@ PRUnichar *nsOutlookStringBundle::GetStringByID(PRInt32 stringID, nsIStringBundl } nsString resultString; - resultString.Append(NS_LITERAL_STRING("[StringID ")); + resultString.AppendLiteral("[StringID "); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); return ToNewUnicode(resultString); } diff --git a/mailnews/import/src/nsImportMail.cpp b/mailnews/import/src/nsImportMail.cpp index 9e33777735fe..bbc9e97e0518 100644 --- a/mailnews/import/src/nsImportMail.cpp +++ b/mailnews/import/src/nsImportMail.cpp @@ -842,7 +842,7 @@ ImportMailThread( void *stuff) nsCRT::free( pName); } else - lastName.Assign(NS_LITERAL_STRING("Unknown!")); + lastName.AssignLiteral("Unknown!"); exists = PR_FALSE; rv = curProxy->ContainsChildNamed( lastName.get(), &exists); diff --git a/mailnews/import/src/nsImportService.cpp b/mailnews/import/src/nsImportService.cpp index 9c0f03f9fd3c..5eee441b3f16 100644 --- a/mailnews/import/src/nsImportService.cpp +++ b/mailnews/import/src/nsImportService.cpp @@ -153,7 +153,7 @@ NS_IMETHODIMP nsImportService::SystemStringToUnicode(const char *sysStr, nsStrin rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName, m_sysCharset); if (NS_FAILED(rv)) - m_sysCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + m_sysCharset.AssignLiteral("ISO-8859-1"); } if (!sysStr) { @@ -168,8 +168,8 @@ NS_IMETHODIMP nsImportService::SystemStringToUnicode(const char *sysStr, nsStrin if (m_sysCharset.IsEmpty() || - m_sysCharset.EqualsIgnoreCase("us-ascii") || - m_sysCharset.EqualsIgnoreCase("ISO-8859-1")) { + m_sysCharset.LowerCaseEqualsLiteral("us-ascii") || + m_sysCharset.LowerCaseEqualsLiteral("iso-8859-1")) { uniStr.AssignWithConversion( sysStr); return( NS_OK); } @@ -218,7 +218,7 @@ NS_IMETHODIMP nsImportService::SystemStringFromUnicode(const PRUnichar *uniStr, rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName, m_sysCharset); if (NS_FAILED(rv)) - m_sysCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + m_sysCharset.AssignLiteral("ISO-8859-1"); } if (!uniStr) { @@ -232,8 +232,8 @@ NS_IMETHODIMP nsImportService::SystemStringFromUnicode(const PRUnichar *uniStr, } if (m_sysCharset.IsEmpty() || - m_sysCharset.EqualsIgnoreCase("us-ascii") || - m_sysCharset.EqualsIgnoreCase("ISO-8859-1")) { + m_sysCharset.LowerCaseEqualsLiteral("us-ascii") || + m_sysCharset.LowerCaseEqualsLiteral("iso-8859-1")) { sysStr.AssignWithConversion(uniStr); return NS_OK; } @@ -552,7 +552,7 @@ nsresult nsImportService::LoadModuleInfo( const char *pClsId, const char *pSuppo nsMemory::Free(pName); } else - theTitle.Assign(NS_LITERAL_STRING("Unknown")); + theTitle.AssignLiteral("Unknown"); rv = module->GetDescription( &pName); if (NS_SUCCEEDED( rv)) { @@ -560,7 +560,7 @@ nsresult nsImportService::LoadModuleInfo( const char *pClsId, const char *pSuppo nsMemory::Free(pName); } else - theDescription.Assign(NS_LITERAL_STRING("Unknown description")); + theDescription.AssignLiteral("Unknown description"); // call the module to get the info we need m_pModules->AddModule( clsId, pSupports, theTitle.get(), theDescription.get()); diff --git a/mailnews/import/src/nsImportStringBundle.cpp b/mailnews/import/src/nsImportStringBundle.cpp index 095cd863c8d9..0ddc283d382c 100644 --- a/mailnews/import/src/nsImportStringBundle.cpp +++ b/mailnews/import/src/nsImportStringBundle.cpp @@ -112,7 +112,7 @@ PRUnichar *nsImportStringBundle::GetStringByID(PRInt32 stringID, nsIStringBundle nsString resultString(NS_LITERAL_STRING("[StringID ")); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); return( ToNewUnicode(resultString)); } diff --git a/mailnews/import/text/src/nsTextImport.cpp b/mailnews/import/text/src/nsTextImport.cpp index 6f3e0cd1a31d..801495cdb926 100644 --- a/mailnews/import/text/src/nsTextImport.cpp +++ b/mailnews/import/text/src/nsTextImport.cpp @@ -654,7 +654,7 @@ NS_IMETHODIMP ImportAddressImpl::GetSampleData( PRInt32 index, PRBool *pFound, P PRInt32 fNum = 0; while (nsTextAddress::GetField( pLine, lineLen, fNum, field, m_delim)) { if (fNum) - str.Append(NS_LITERAL_STRING("\n")); + str.AppendLiteral("\n"); SanitizeSampleData( field); if (impSvc) impSvc->SystemStringToUnicode( field.get(), uField); diff --git a/mailnews/import/text/src/nsTextStringBundle.cpp b/mailnews/import/text/src/nsTextStringBundle.cpp index 4e82bfcf0159..2bdeec051ce8 100644 --- a/mailnews/import/text/src/nsTextStringBundle.cpp +++ b/mailnews/import/text/src/nsTextStringBundle.cpp @@ -115,7 +115,7 @@ PRUnichar *nsTextStringBundle::GetStringByID(PRInt32 stringID, nsIStringBundle * nsString resultString(NS_LITERAL_STRING("[StringID ")); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); return ToNewUnicode(resultString); } diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp index 027d3179f701..2fe0b7a886fd 100644 --- a/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mailnews/local/src/nsLocalMailFolder.cpp @@ -182,21 +182,21 @@ nsShouldIgnoreFile(nsString& name) if (firstChar == '.' || firstChar == '#' || name.CharAt(name.Length() - 1) == '~') return PR_TRUE; - if (name.EqualsIgnoreCase("msgFilterRules.dat") || - name.EqualsIgnoreCase("rules.dat") || - name.EqualsIgnoreCase("filterlog.html") || - name.EqualsIgnoreCase("junklog.html") || - name.EqualsIgnoreCase("rulesbackup.dat")) + if (name.LowerCaseEqualsLiteral("msgfilterrules.dat") || + name.LowerCaseEqualsLiteral("rules.dat") || + name.LowerCaseEqualsLiteral("filterlog.html") || + name.LowerCaseEqualsLiteral("junklog.html") || + name.LowerCaseEqualsLiteral("rulesbackup.dat")) return PR_TRUE; // don't add summary files to the list of folders; // don't add popstate files to the list either, or rules (sort.dat). if (nsStringEndsWith(name, ".snm") || - name.EqualsIgnoreCase("popstate.dat") || - name.EqualsIgnoreCase("sort.dat") || - name.EqualsIgnoreCase("mailfilt.log") || - name.EqualsIgnoreCase("filters.js") || + name.LowerCaseEqualsLiteral("popstate.dat") || + name.LowerCaseEqualsLiteral("sort.dat") || + name.LowerCaseEqualsLiteral("mailfilt.log") || + name.LowerCaseEqualsLiteral("filters.js") || nsStringEndsWith(name, ".toc")) return PR_TRUE; @@ -320,15 +320,15 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(const nsAString &name, //Only set these is these are top level children. if(NS_SUCCEEDED(rv) && isServer) { - if(name.Equals(NS_LITERAL_STRING("Inbox"), nsCaseInsensitiveStringComparator())) + if(name.LowerCaseEqualsLiteral("inbox")) { flags |= MSG_FOLDER_FLAG_INBOX; SetBiffState(nsIMsgFolder::nsMsgBiffState_Unknown); } - else if (name.Equals(NS_LITERAL_STRING("Trash"), nsCaseInsensitiveStringComparator())) + else if (name.LowerCaseEqualsLiteral("trash")) flags |= MSG_FOLDER_FLAG_TRASH; - else if (name.Equals(NS_LITERAL_STRING("Unsent Messages"), nsCaseInsensitiveStringComparator()) || - name.Equals(NS_LITERAL_STRING("Outbox"), nsCaseInsensitiveStringComparator())) + else if (name.LowerCaseEqualsLiteral("unsent messages") || + name.LowerCaseEqualsLiteral("outbox")) flags |= MSG_FOLDER_FLAG_QUEUE; #if 0 // the logic for this has been moved into @@ -1781,7 +1781,7 @@ nsMsgLocalMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsISupportsArray* nsCAutoString protocolType(uri); protocolType.SetLength(protocolType.FindChar(':')); - if (WeAreOffline() && (protocolType.EqualsIgnoreCase("imap") || protocolType.EqualsIgnoreCase("news"))) + if (WeAreOffline() && (protocolType.LowerCaseEqualsLiteral("imap") || protocolType.LowerCaseEqualsLiteral("news"))) { PRUint32 numMessages = 0; messages->Count(&numMessages); @@ -1813,7 +1813,7 @@ nsMsgLocalMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsISupportsArray* if (NS_FAILED(rv)) return OnCopyCompleted(srcSupport, PR_FALSE); - if (!protocolType.EqualsIgnoreCase("mailbox")) + if (!protocolType.LowerCaseEqualsLiteral("mailbox")) { mCopyState->m_dummyEnvelopeNeeded = PR_TRUE; nsParseMailMessageState* parseMsgState = new nsParseMailMessageState(); @@ -1863,7 +1863,7 @@ nsMsgLocalMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsISupportsArray* } PRUint32 numMsgs = 0; mCopyState->m_messages->Count(&numMsgs); - if (numMsgs > 1 && ((protocolType.EqualsIgnoreCase("imap") && !WeAreOffline()) || protocolType.EqualsIgnoreCase("mailbox"))) + if (numMsgs > 1 && ((protocolType.LowerCaseEqualsLiteral("imap") && !WeAreOffline()) || protocolType.LowerCaseEqualsLiteral("mailbox"))) { mCopyState->m_copyingMultipleMessages = PR_TRUE; rv = CopyMessagesTo(mCopyState->m_messages, msgWindow, this, isMove); diff --git a/mailnews/local/src/nsLocalUndoTxn.cpp b/mailnews/local/src/nsLocalUndoTxn.cpp index 5f45ca2145de..bfbf15fb7b9b 100644 --- a/mailnews/local/src/nsLocalUndoTxn.cpp +++ b/mailnews/local/src/nsLocalUndoTxn.cpp @@ -107,7 +107,7 @@ nsLocalMoveCopyMsgTxn::Init(nsIMsgFolder* srcFolder, nsIMsgFolder* dstFolder, rv = srcFolder->GetURI(getter_Copies(uri)); nsCString protocolType(uri); protocolType.SetLength(protocolType.FindChar(':')); - if (protocolType.EqualsIgnoreCase("imap")) + if (protocolType.LowerCaseEqualsLiteral("imap")) { m_srcIsImap4 = PR_TRUE; } diff --git a/mailnews/local/src/nsMovemailService.cpp b/mailnews/local/src/nsMovemailService.cpp index 4f0f28c74383..2b07378c4035 100644 --- a/mailnews/local/src/nsMovemailService.cpp +++ b/mailnews/local/src/nsMovemailService.cpp @@ -396,7 +396,7 @@ nsMovemailService::GetNewMail(nsIMsgWindow *aMsgWindow, // Try and obtain the lock for the spool file if (!ObtainSpoolLock(spoolPath.get(), 5)) { nsAutoString lockFile = NS_ConvertUTF8toUCS2(spoolPath); - lockFile += NS_LITERAL_STRING(".lock"); + lockFile.AppendLiteral(".lock"); const PRUnichar *params[] = { lockFile.get() }; @@ -425,10 +425,10 @@ nsMovemailService::GetNewMail(nsIMsgWindow *aMsgWindow, // 'From' lines delimit messages if (isMore && !PL_strncasecmp(buffer.get(), "From ", 5)) { - buffer = NS_LITERAL_CSTRING("X-Mozilla-Status: 8000" MSG_LINEBREAK); + buffer.AssignLiteral("X-Mozilla-Status: 8000" MSG_LINEBREAK); newMailParser->HandleLine(buffer.BeginWriting(), buffer.Length()); outFileStream << buffer.get(); - buffer = NS_LITERAL_CSTRING("X-Mozilla-Status2: 00000000" MSG_LINEBREAK); + buffer.AssignLiteral("X-Mozilla-Status2: 00000000" MSG_LINEBREAK); newMailParser->HandleLine(buffer.BeginWriting(), buffer.Length()); outFileStream << buffer.get(); } @@ -451,7 +451,7 @@ nsMovemailService::GetNewMail(nsIMsgWindow *aMsgWindow, if (!YieldSpoolLock(spoolPath.get())) { nsAutoString spoolLock = NS_ConvertUTF8toUCS2(spoolPath); - spoolLock += NS_LITERAL_STRING(".lock"); + spoolLock.AppendLiteral(".lock"); const PRUnichar *params[] = { spoolLock.get() }; diff --git a/mailnews/mapi/mapihook/src/msgMapiHook.cpp b/mailnews/mapi/mapihook/src/msgMapiHook.cpp index 518778b96755..982a6f363cc7 100644 --- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp +++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp @@ -504,7 +504,7 @@ nsresult nsMapiHook::PopulateCompFields(lpnsMapiMessage aMessage, nsString Body; Body.AssignWithConversion(aMessage->lpszNoteText); if (Body.Last() != nsCRT::LF) - Body.Append(NS_LITERAL_STRING(CRLF)); + Body.AppendLiteral(CRLF); rv = aCompFields->SetBody(Body) ; } @@ -686,7 +686,7 @@ nsresult nsMapiHook::PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage, rv = ConvertToUnicode(platformCharSet.get(), (char *) aMessage->lpszNoteText, Body); if (NS_FAILED(rv)) return rv ; if (Body.Last() != nsCRT::LF) - Body.Append(NS_LITERAL_STRING(CRLF)); + Body.AppendLiteral(CRLF); rv = aCompFields->SetBody(Body) ; } @@ -735,7 +735,7 @@ nsresult nsMapiHook::PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompField // only 1 file is to be sent, no delim specified if (strDelimChars.IsEmpty()) - strDelimChars.Assign(NS_LITERAL_STRING(";")); + strDelimChars.AssignLiteral(";"); PRInt32 offset = 0 ; PRInt32 FilePathsLen = strFilePaths.Length() ; @@ -785,7 +785,7 @@ nsresult nsMapiHook::PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompField if(NS_FAILED(rv) || leafName.IsEmpty()) return rv ; if (!Subject.IsEmpty()) - Subject.Append(NS_LITERAL_STRING(", ")); + Subject.AppendLiteral(", "); Subject += leafName; // create MsgCompose attachment object diff --git a/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp b/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp index 59d70b9afe2a..abfe9dbe14b1 100644 --- a/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp +++ b/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp @@ -378,7 +378,7 @@ nsresult nsMapiRegistryUtils::CopyMozMapiToWinSysDir() } if (NS_FAILED(rv)) return rv; filePath.Assign(buffer); - filePath.Append(NS_LITERAL_CSTRING("\\Mapi32.dll")); + filePath.AppendLiteral("\\Mapi32.dll"); pCurrentMapiFile->InitWithNativePath(filePath); rv = pCurrentMapiFile->Exists(&bExist); if (NS_SUCCEEDED(rv) && bExist) @@ -386,7 +386,7 @@ nsresult nsMapiRegistryUtils::CopyMozMapiToWinSysDir() rv = pCurrentMapiFile->MoveToNative(nsnull, NS_LITERAL_CSTRING("Mapi32_moz_bak.dll")); if (NS_FAILED(rv)) return rv; nsCAutoString fullFilePath(buffer); - fullFilePath.Append(NS_LITERAL_CSTRING("\\Mapi32_moz_bak.dll")); + fullFilePath.AppendLiteral("\\Mapi32_moz_bak.dll"); rv = SetRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Mozilla\\Desktop", "Mapi_backup_dll", @@ -418,8 +418,8 @@ nsresult nsMapiRegistryUtils::RestoreBackedUpMapiDll() nsCAutoString filePath(buffer); nsCAutoString previousFileName(buffer); - filePath.Append(NS_LITERAL_CSTRING("\\Mapi32.dll")); - previousFileName.Append(NS_LITERAL_CSTRING("\\Mapi32_moz_bak.dll")); + filePath.AppendLiteral("\\Mapi32.dll"); + previousFileName.AppendLiteral("\\Mapi32_moz_bak.dll"); nsCOMPtr pCurrentMapiFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv); if (NS_FAILED(rv) || !pCurrentMapiFile) return NS_ERROR_FAILURE; diff --git a/mailnews/mime/src/mimetpfl.cpp b/mailnews/mime/src/mimetpfl.cpp index d692e3229d1f..bb67ded15a91 100644 --- a/mailnews/mime/src/mimetpfl.cpp +++ b/mailnews/mime/src/mimetpfl.cpp @@ -459,7 +459,7 @@ MimeInlineTextPlainFlowed_parse_line (char *line, PRInt32 length, MimeObject *ob /* If wrap, convert all spaces but the last in a row into nbsp, otherwise all. */, lineResult2); - lineResult2 += NS_LITERAL_STRING("
"); + lineResult2.AppendLiteral("
"); exdata->inflow = PR_FALSE; } // End Fixed line @@ -578,12 +578,12 @@ static void Convert_whitespace(const PRUnichar a_current_char, } while(number_of_nbsp--) { - a_out_string += NS_LITERAL_STRING(" "); + a_out_string.AppendLiteral(" "); } while(number_of_space--) { // a_out_string += ' '; gives error - a_out_string += NS_LITERAL_STRING(" "); + a_out_string.AppendLiteral(" "); } return; diff --git a/mailnews/mime/src/nsStreamConverter.cpp b/mailnews/mime/src/nsStreamConverter.cpp index a15c67834c47..8008cc91c0e8 100644 --- a/mailnews/mime/src/nsStreamConverter.cpp +++ b/mailnews/mime/src/nsStreamConverter.cpp @@ -425,13 +425,13 @@ nsStreamConverter::DetermineOutputFormat(const char *aUrl, nsMimeOutputType *aNe char *nextField = PL_strchr(typeField, '&'); mRealContentType.Assign(typeField, nextField ? nextField - typeField : -1); - if (mRealContentType.EqualsIgnoreCase("message/rfc822")) + if (mRealContentType.LowerCaseEqualsLiteral("message/rfc822")) { mRealContentType = "x-message-display"; mOutputFormat = "text/html"; *aNewType = nsMimeOutput::nsMimeMessageBodyDisplay; } - else if (mRealContentType.EqualsIgnoreCase("x-message-display")) + else if (mRealContentType.LowerCaseEqualsLiteral("x-message-display")) { mRealContentType = ""; mOutputFormat = "text/html"; @@ -709,7 +709,7 @@ NS_IMETHODIMP nsStreamConverter::GetContentType(char **aOutputContentType) // (1) check to see if we have a real content type...use it first... if (!mRealContentType.IsEmpty()) *aOutputContentType = ToNewCString(mRealContentType); - else if (mOutputFormat.EqualsIgnoreCase("raw")) + else if (mOutputFormat.LowerCaseEqualsLiteral("raw")) { *aOutputContentType = (char *) nsMemory::Clone(UNKNOWN_CONTENT_TYPE, sizeof(UNKNOWN_CONTENT_TYPE)); } diff --git a/mailnews/news/src/nsNNTPProtocol.cpp b/mailnews/news/src/nsNNTPProtocol.cpp index d1235ab0bd92..093b91cce559 100644 --- a/mailnews/news/src/nsNNTPProtocol.cpp +++ b/mailnews/news/src/nsNNTPProtocol.cpp @@ -3749,9 +3749,9 @@ nsresult nsNNTPProtocol::GetNewsStringByID(PRInt32 stringID, PRUnichar **aString rv = m_stringBundle->GetStringFromID(stringID, &ptrv); if (NS_FAILED(rv)) { - resultString.Assign(NS_LITERAL_STRING("[StringID")); + resultString.AssignLiteral("[StringID"); resultString.AppendInt(stringID); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); *aString = ToNewUnicode(resultString); } else { @@ -3788,9 +3788,9 @@ nsresult nsNNTPProtocol::GetNewsStringByName(const char *aName, PRUnichar **aStr if (NS_FAILED(rv)) { - resultString.Assign(NS_LITERAL_STRING("[StringName")); + resultString.AssignLiteral("[StringName"); resultString.AppendWithConversion(aName); - resultString.Append(NS_LITERAL_STRING("?]")); + resultString.AppendLiteral("?]"); *aString = ToNewUnicode(resultString); } else @@ -5434,11 +5434,11 @@ NS_IMETHODIMP nsNNTPProtocol::GetContentType(nsACString &aContentType) // otherwise do what we did before... if (m_typeWanted == GROUP_WANTED) - aContentType = NS_LITERAL_CSTRING("x-application-newsgroup"); + aContentType.AssignLiteral("x-application-newsgroup"); else if (m_typeWanted == IDS_WANTED) - aContentType = NS_LITERAL_CSTRING("x-application-newsgroup-listids"); + aContentType.AssignLiteral("x-application-newsgroup-listids"); else - aContentType = NS_LITERAL_CSTRING("message/rfc822"); + aContentType.AssignLiteral("message/rfc822"); return NS_OK; } diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp index b74d27c02f2e..71a6bb846c11 100644 --- a/modules/libjar/nsJAR.cpp +++ b/modules/libjar/nsJAR.cpp @@ -849,31 +849,31 @@ void nsJAR::ReportError(const char* aFilename, PRInt16 errorCode) { //-- Generate error message nsAutoString message; - message.Assign(NS_LITERAL_STRING("Signature Verification Error: the signature on ")); + message.AssignLiteral("Signature Verification Error: the signature on "); if (aFilename) message.AppendWithConversion(aFilename); else - message.Append(NS_LITERAL_STRING("this .jar archive")); - message.Append(NS_LITERAL_STRING(" is invalid because ")); + message.AppendLiteral("this .jar archive"); + message.AppendLiteral(" is invalid because "); switch(errorCode) { case nsIJAR::NOT_SIGNED: - message.Append(NS_LITERAL_STRING("the archive did not contain a valid PKCS7 signature.")); + message.AppendLiteral("the archive did not contain a valid PKCS7 signature."); break; case nsIJAR::INVALID_SIG: message.Append(NS_LITERAL_STRING("the digital signature (*.RSA) file is not a valid signature of the signature instruction file (*.SF).")); break; case nsIJAR::INVALID_UNKNOWN_CA: - message.Append(NS_LITERAL_STRING("the certificate used to sign this file has an unrecognized issuer.")); + message.AppendLiteral("the certificate used to sign this file has an unrecognized issuer."); break; case nsIJAR::INVALID_MANIFEST: message.Append(NS_LITERAL_STRING("the signature instruction file (*.SF) does not contain a valid hash of the MANIFEST.MF file.")); break; case nsIJAR::INVALID_ENTRY: - message.Append(NS_LITERAL_STRING("the MANIFEST.MF file does not contain a valid hash of the file being verified.")); + message.AppendLiteral("the MANIFEST.MF file does not contain a valid hash of the file being verified."); break; default: - message.Append(NS_LITERAL_STRING("of an unknown problem.")); + message.AppendLiteral("of an unknown problem."); } // Report error in JS console diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 05132930d147..2bad746b58dc 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -522,7 +522,7 @@ nsJARChannel::GetContentType(nsACString &result) mimeServ->GetTypeFromExtension(nsDependentCString(ext), mContentType); } if (mContentType.IsEmpty()) - mContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); } result = mContentType; return NS_OK; diff --git a/modules/libjar/nsJARProtocolHandler.cpp b/modules/libjar/nsJARProtocolHandler.cpp index 88a69d523281..3addefd722ca 100644 --- a/modules/libjar/nsJARProtocolHandler.cpp +++ b/modules/libjar/nsJARProtocolHandler.cpp @@ -127,7 +127,7 @@ nsJARProtocolHandler::GetJARCache(nsIZipReaderCache* *result) NS_IMETHODIMP nsJARProtocolHandler::GetScheme(nsACString &result) { - result = NS_LITERAL_CSTRING("jar"); + result.AssignLiteral("jar"); return NS_OK; } diff --git a/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp index 5ed36ba2ea82..dbcf69c6c1af 100644 --- a/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/gtk/nsIconChannel.cpp @@ -118,7 +118,7 @@ nsIconChannel::Init(nsIURI* aURI) { getter_Copies(appName)); } else { NS_WARNING("brand.properties not present, using default application name"); - appName.Assign(NS_LITERAL_STRING("Gecko")); + appName.AssignLiteral("Gecko"); } char* empty[] = { "" }; diff --git a/modules/libpr0n/decoders/icon/mac/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/mac/nsIconChannel.cpp index 7fdf5d86a5cd..a9abf199de31 100644 --- a/modules/libpr0n/decoders/icon/mac/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/mac/nsIconChannel.cpp @@ -535,7 +535,7 @@ NS_IMETHODIMP nsIconChannel::SetLoadFlags(PRUint32 aLoadAttributes) NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING("image/icon"); + aContentType.AssignLiteral("image/icon"); return NS_OK; } @@ -549,7 +549,7 @@ nsIconChannel::SetContentType(const nsACString &aContentType) NS_IMETHODIMP nsIconChannel::GetContentCharset(nsACString &aContentCharset) { - aContentCharset = NS_LITERAL_CSTRING("image/icon"); + aContentCharset.AssignLiteral("image/icon"); return NS_OK; } diff --git a/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp index 436fee89a402..265774cbdf89 100644 --- a/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp @@ -630,7 +630,7 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING("image/icon"); + aContentType.AssignLiteral("image/icon"); return NS_OK; } diff --git a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp index 72bcb7f90def..62653db43f80 100644 --- a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp @@ -357,7 +357,7 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING("image/x-icon"); + aContentType.AssignLiteral("image/x-icon"); return NS_OK; } diff --git a/modules/libpref/src/nsSafeSaveFile.cpp b/modules/libpref/src/nsSafeSaveFile.cpp index aaedfc5aa261..2824dbe5a652 100644 --- a/modules/libpref/src/nsSafeSaveFile.cpp +++ b/modules/libpref/src/nsSafeSaveFile.cpp @@ -99,7 +99,7 @@ nsresult nsSafeSaveFile::OnSaveFinished(PRBool aSaveSucceeded, PRBool aBackupTar PRInt32 pos = backupFilename.RFindChar('.'); if (pos != -1) backupFilename.Truncate(pos); - backupFilename.Append(NS_LITERAL_CSTRING(".bak")); + backupFilename.AppendLiteral(".bak"); // Find a unique name for the backup by using CreateUnique nsCOMPtr uniqueFile; diff --git a/modules/oji/src/nsJVMConfigManagerUnix.cpp b/modules/oji/src/nsJVMConfigManagerUnix.cpp index 2be011569364..11c4c922e981 100644 --- a/modules/oji/src/nsJVMConfigManagerUnix.cpp +++ b/modules/oji/src/nsJVMConfigManagerUnix.cpp @@ -317,7 +317,7 @@ nsJVMConfigManagerUnix::ParseLine(nsAString& aLine) nsAutoString testPathStr(pathStr); if (type.EqualsLiteral("jdk")) - testPathStr.Append(NS_LITERAL_STRING("/jre")); + testPathStr.AppendLiteral("/jre"); testPathStr.Append(mozillaPluginPath); testPath->InitWithPath(testPathStr); @@ -468,9 +468,9 @@ nsJVMConfigManagerUnix::GetNSVersion(nsAString& _retval) // ns7 is for mozilla1.3 or later // ns610 is for earlier version of mozilla. if (version >= 1.3) { - _retval.Assign(NS_LITERAL_STRING("ns7")); + _retval.AssignLiteral("ns7"); } else { - _retval.Assign(NS_LITERAL_STRING("ns610")); + _retval.AssignLiteral("ns610"); } return NS_OK; @@ -567,9 +567,9 @@ nsJVMConfigManagerUnix::AddDirectory(nsAString& aHomeDirName) PRBool exists; testPath->Exists(&exists); if (exists) { - type.Assign(NS_LITERAL_STRING("jdk")); + type.AssignLiteral("jdk"); } else { - type.Assign(NS_LITERAL_STRING("jre")); + type.AssignLiteral("jre"); testPath->InitWithPath(aHomeDirName); } @@ -629,9 +629,9 @@ PRBool nsJVMConfigManagerUnix::TestArch(nsILocalFile* aPluginPath, nsAString& aArch) { #ifdef SPARC - aArch.Assign(NS_LITERAL_STRING("sparc")); + aArch.AssignLiteral("sparc"); #else - aArch.Assign(NS_LITERAL_STRING("i386")); + aArch.AssignLiteral("i386"); #endif return TestExists(aPluginPath, aArch); } @@ -646,7 +646,7 @@ nsJVMConfigManagerUnix::TestNSVersion(nsILocalFile* aArchPath, aNSVersion.Assign(versionStr); #if (NS_COMPILER_GNUC3) - aNSVersion.Append(NS_LITERAL_STRING("-gcc32")); + aNSVersion.AppendLiteral("-gcc32"); #endif return TestExists(aArchPath, aNSVersion); } diff --git a/modules/oji/src/nsJVMManager.cpp b/modules/oji/src/nsJVMManager.cpp index 1c1fa7ce4e43..ca1e23926669 100644 --- a/modules/oji/src/nsJVMManager.cpp +++ b/modules/oji/src/nsJVMManager.cpp @@ -208,7 +208,7 @@ nsJVMManager::ShowJavaConsole(void) nsMemory::Free((void *)messageUni); msg.Append(PRUnichar(' ')); - msg.Append(NS_LITERAL_STRING("application/x-java-vm")); + msg.AppendLiteral("application/x-java-vm"); chrome->SetStatus(nsIWebBrowserChrome::STATUS_SCRIPT, msg.get()); } diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index 0f1c71d37e06..5076ff8acbf7 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -6138,7 +6138,7 @@ nsPluginHostImpl::HandleBadPlugin(PRLibrary* aLibrary, nsIPluginInstance *aInsta nsAutoString msg; msg.AssignWithConversion(pluginname); - msg.Append(NS_LITERAL_STRING("\n\n")); + msg.AppendLiteral("\n\n"); msg.Append(message); PRInt32 buttonPressed; diff --git a/netwerk/base/src/nsStandardURL.cpp b/netwerk/base/src/nsStandardURL.cpp index 4d1d15407604..3b7f6fbe8fb1 100644 --- a/netwerk/base/src/nsStandardURL.cpp +++ b/netwerk/base/src/nsStandardURL.cpp @@ -1012,7 +1012,7 @@ NS_IMETHODIMP nsStandardURL::GetOriginCharset(nsACString &result) { if (mOriginCharset.IsEmpty()) - result = NS_LITERAL_CSTRING("UTF-8"); + result.AssignLiteral("UTF-8"); else result = mOriginCharset; return NS_OK; diff --git a/netwerk/base/src/nsUnicharStreamLoader.cpp b/netwerk/base/src/nsUnicharStreamLoader.cpp index 64048bbe359c..2441acef2265 100644 --- a/netwerk/base/src/nsUnicharStreamLoader.cpp +++ b/netwerk/base/src/nsUnicharStreamLoader.cpp @@ -231,7 +231,7 @@ nsUnicharStreamLoader::WriteSegmentFun(nsIInputStream *aInputStream, if (NS_FAILED(rv) || self->mCharset.IsEmpty()) { // The observer told us nothing useful - self->mCharset = NS_LITERAL_CSTRING("ISO-8859-1"); + self->mCharset.AssignLiteral("ISO-8859-1"); } NS_ASSERTION(IsASCII(self->mCharset), diff --git a/netwerk/cookie/src/nsCookieService.cpp b/netwerk/cookie/src/nsCookieService.cpp index 95d6f72781e8..5359dbf1224f 100644 --- a/netwerk/cookie/src/nsCookieService.cpp +++ b/netwerk/cookie/src/nsCookieService.cpp @@ -623,7 +623,7 @@ nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI, // if we've already added a cookie to the return list, append a "; " so // that subsequent cookies are delimited in the final list. if (!cookieData.IsEmpty()) { - cookieData += NS_LITERAL_CSTRING("; "); + cookieData.AppendLiteral("; "); } if (!cookie->Name().IsEmpty()) { diff --git a/netwerk/protocol/about/src/nsAboutCache.cpp b/netwerk/protocol/about/src/nsAboutCache.cpp index 408935ea1ce7..52ada5cdcda7 100644 --- a/netwerk/protocol/about/src/nsAboutCache.cpp +++ b/netwerk/protocol/about/src/nsAboutCache.cpp @@ -240,11 +240,11 @@ nsAboutCache::VisitEntry(const char *deviceID, // Generate a about:cache-entry URL for this entry... nsCAutoString url; - url += NS_LITERAL_CSTRING("about:cache-entry?client="); + url.AppendLiteral("about:cache-entry?client="); url += clientID; - url += NS_LITERAL_CSTRING("&sb="); + url.AppendLiteral("&sb="); url += streamBased ? "1" : "0"; - url += NS_LITERAL_CSTRING("&key="); + url.AppendLiteral("&key="); char* escapedKey = nsEscapeHTML(key); url += escapedKey; // key diff --git a/netwerk/protocol/data/src/nsDataChannel.cpp b/netwerk/protocol/data/src/nsDataChannel.cpp index 093732da3ce2..c80557635069 100644 --- a/netwerk/protocol/data/src/nsDataChannel.cpp +++ b/netwerk/protocol/data/src/nsDataChannel.cpp @@ -121,8 +121,8 @@ nsDataChannel::ParseData() { if (comma == buffer) { // nothing but data - mContentType = NS_LITERAL_CSTRING("text/plain"); - mContentCharset = NS_LITERAL_CSTRING("US-ASCII"); + mContentType.AssignLiteral("text/plain"); + mContentCharset.AssignLiteral("US-ASCII"); } else { // everything else is content type char *semiColon = (char *) strchr(buffer, ';'); @@ -131,7 +131,7 @@ nsDataChannel::ParseData() { if (semiColon == buffer || base64 == buffer) { // there is no content type, but there are other parameters - mContentType = NS_LITERAL_CSTRING("text/plain"); + mContentType.AssignLiteral("text/plain"); } else { mContentType = buffer; ToLowerCase(mContentType); diff --git a/netwerk/protocol/file/src/nsFileChannel.cpp b/netwerk/protocol/file/src/nsFileChannel.cpp index e0aeb872c200..1d0acf150582 100644 --- a/netwerk/protocol/file/src/nsFileChannel.cpp +++ b/netwerk/protocol/file/src/nsFileChannel.cpp @@ -286,9 +286,9 @@ nsFileChannel::GetContentType(nsACString &aContentType) if (mContentType.IsEmpty()) { if (mIsDir) { if (mListFormat == FORMAT_HTML) - mContentType = NS_LITERAL_CSTRING(TEXT_HTML); + mContentType.AssignLiteral(TEXT_HTML); else - mContentType = NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT); + mContentType.AssignLiteral(APPLICATION_HTTP_INDEX_FORMAT); } else { // Get content type from file extension nsCOMPtr file; @@ -300,7 +300,7 @@ nsFileChannel::GetContentType(nsACString &aContentType) mime->GetTypeFromFile(file, mContentType); if (mContentType.IsEmpty()) - mContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); } } diff --git a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp index e374f8ca6ad3..419a2fd5e488 100644 --- a/netwerk/protocol/file/src/nsFileProtocolHandler.cpp +++ b/netwerk/protocol/file/src/nsFileProtocolHandler.cpp @@ -68,7 +68,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS3(nsFileProtocolHandler, NS_IMETHODIMP nsFileProtocolHandler::GetScheme(nsACString &result) { - result = NS_LITERAL_CSTRING("file"); + result.AssignLiteral("file"); return NS_OK; } diff --git a/netwerk/protocol/ftp/src/nsFTPChannel.cpp b/netwerk/protocol/ftp/src/nsFTPChannel.cpp index c280cc2b0229..a593a427665e 100644 --- a/netwerk/protocol/ftp/src/nsFTPChannel.cpp +++ b/netwerk/protocol/ftp/src/nsFTPChannel.cpp @@ -411,7 +411,7 @@ nsFTPChannel::GetContentType(nsACString &aContentType) nsAutoLock lock(mLock); if (mContentType.IsEmpty()) { - aContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + aContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); } else { aContentType = mContentType; } diff --git a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp index 338ffba195e0..132c1c186ea2 100644 --- a/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp +++ b/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp @@ -1402,17 +1402,17 @@ nsFtpState::SetContentType() switch (mListFormat) { case nsIDirectoryListing::FORMAT_RAW: { - contentType = NS_LITERAL_CSTRING("text/ftp-dir-"); + contentType.AssignLiteral("text/ftp-dir-"); } break; default: NS_WARNING("Unknown directory type"); // fall through case nsIDirectoryListing::FORMAT_HTML: - contentType = NS_LITERAL_CSTRING(TEXT_HTML); + contentType.AssignLiteral(TEXT_HTML); break; case nsIDirectoryListing::FORMAT_HTTP_INDEX: - contentType = NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT); + contentType.AssignLiteral(APPLICATION_HTTP_INDEX_FORMAT); break; } diff --git a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp index b02840969c17..72f3683fee01 100644 --- a/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp +++ b/netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp @@ -165,7 +165,7 @@ nsFtpProtocolHandler::Init() NS_IMETHODIMP nsFtpProtocolHandler::GetScheme(nsACString &result) { - result = NS_LITERAL_CSTRING("ftp"); + result.AssignLiteral("ftp"); return NS_OK; } diff --git a/netwerk/protocol/gopher/src/nsGopherChannel.cpp b/netwerk/protocol/gopher/src/nsGopherChannel.cpp index cde9898f0faa..165204e53d40 100644 --- a/netwerk/protocol/gopher/src/nsGopherChannel.cpp +++ b/netwerk/protocol/gopher/src/nsGopherChannel.cpp @@ -351,67 +351,67 @@ nsGopherChannel::GetContentType(nsACString &aContentType) switch(mType) { case '0': case 'h': - aContentType = NS_LITERAL_CSTRING(TEXT_HTML); + aContentType.AssignLiteral(TEXT_HTML); break; case '1': switch (mListFormat) { case nsIDirectoryListing::FORMAT_RAW: - aContentType = NS_LITERAL_CSTRING("text/gopher-dir"); + aContentType.AssignLiteral("text/gopher-dir"); break; default: NS_WARNING("Unknown directory type"); // fall through case nsIDirectoryListing::FORMAT_HTML: - aContentType = NS_LITERAL_CSTRING(TEXT_HTML); + aContentType.AssignLiteral(TEXT_HTML); break; case nsIDirectoryListing::FORMAT_HTTP_INDEX: - aContentType = NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT); + aContentType.AssignLiteral(APPLICATION_HTTP_INDEX_FORMAT); break; } break; case '2': // CSO search - unhandled, should not be selectable - aContentType = NS_LITERAL_CSTRING(TEXT_HTML); + aContentType.AssignLiteral(TEXT_HTML); break; case '3': // "Error" - should not be selectable - aContentType = NS_LITERAL_CSTRING(TEXT_HTML); + aContentType.AssignLiteral(TEXT_HTML); break; case '4': // "BinHexed Macintosh file" - aContentType = NS_LITERAL_CSTRING(APPLICATION_BINHEX); + aContentType.AssignLiteral(APPLICATION_BINHEX); break; case '5': // "DOS binary archive of some sort" - is the mime-type correct? - aContentType = NS_LITERAL_CSTRING(APPLICATION_OCTET_STREAM); + aContentType.AssignLiteral(APPLICATION_OCTET_STREAM); break; case '6': - aContentType = NS_LITERAL_CSTRING(APPLICATION_UUENCODE); + aContentType.AssignLiteral(APPLICATION_UUENCODE); break; case '7': // search - returns a directory listing - aContentType = NS_LITERAL_CSTRING(APPLICATION_HTTP_INDEX_FORMAT); + aContentType.AssignLiteral(APPLICATION_HTTP_INDEX_FORMAT); break; case '8': // telnet - type doesn't make sense - aContentType = NS_LITERAL_CSTRING(TEXT_PLAIN); + aContentType.AssignLiteral(TEXT_PLAIN); break; case '9': // "Binary file!" - aContentType = NS_LITERAL_CSTRING(APPLICATION_OCTET_STREAM); + aContentType.AssignLiteral(APPLICATION_OCTET_STREAM); break; case 'g': - aContentType = NS_LITERAL_CSTRING(IMAGE_GIF); + aContentType.AssignLiteral(IMAGE_GIF); break; case 'i': // info line- should not be selectable - aContentType = NS_LITERAL_CSTRING(TEXT_HTML); + aContentType.AssignLiteral(TEXT_HTML); break; case 'I': - aContentType = NS_LITERAL_CSTRING(IMAGE_GIF); + aContentType.AssignLiteral(IMAGE_GIF); break; case 'T': // tn3270 - type doesn't make sense - aContentType = NS_LITERAL_CSTRING(TEXT_PLAIN); + aContentType.AssignLiteral(TEXT_PLAIN); break; default: if (!mContentTypeHint.IsEmpty()) { aContentType = mContentTypeHint; } else { NS_WARNING("Unknown gopher type"); - aContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + aContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); } break; } @@ -640,7 +640,7 @@ nsGopherChannel::SendRequest() getter_Copies(promptTitle)); if (NS_FAILED(rv) || !mStringBundle) - promptTitle.Assign(NS_LITERAL_STRING("Search")); + promptTitle.AssignLiteral("Search"); if (mStringBundle) @@ -648,7 +648,7 @@ nsGopherChannel::SendRequest() getter_Copies(promptText)); if (NS_FAILED(rv) || !mStringBundle) - promptText.Assign(NS_LITERAL_STRING("Enter a search term:")); + promptText.AssignLiteral("Enter a search term:"); nsXPIDLString search; diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp index fc6bb1966f41..25ef25e2898c 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.cpp +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -2169,7 +2169,7 @@ nsHttpChannel::GetCredentialsForChallenge(const char *challenge, host = mConnectionInfo->ProxyHost(); port = mConnectionInfo->ProxyPort(); ident = &mProxyIdent; - scheme = NS_LITERAL_CSTRING("http"); + scheme.AssignLiteral("http"); } else { host = mConnectionInfo->Host(); @@ -2409,7 +2409,7 @@ nsHttpChannel::PromptForIdentity(const char *scheme, key.AssignWithConversion(host); key.Append(PRUnichar(':')); key.AppendInt(port); - key.AppendWithConversion(" ("); + key.AppendLiteral(" ("); key.AppendWithConversion(realm); key.Append(PRUnichar(')')); @@ -2451,7 +2451,7 @@ nsHttpChannel::PromptForIdentity(const char *scheme, // prepend "scheme://" displayHost nsAutoString schemeU; schemeU.AssignWithConversion(scheme); - schemeU.Append(NS_LITERAL_STRING("://")); + schemeU.AppendLiteral("://"); displayHost.Insert(schemeU, 0); const PRUnichar *strings[] = { realmU.get(), displayHost.get() }; @@ -2901,7 +2901,7 @@ nsHttpChannel::GetContentType(nsACString &value) } - value = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + value.AssignLiteral(UNKNOWN_CONTENT_TYPE); return NS_OK; } @@ -4082,7 +4082,7 @@ nsHttpChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("gzip"), start, end)) { - aNextEncoding = NS_LITERAL_CSTRING(APPLICATION_GZIP); + aNextEncoding.AssignLiteral(APPLICATION_GZIP); haveType = PR_TRUE; } @@ -4091,7 +4091,7 @@ nsHttpChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("compress"), start, end)) { - aNextEncoding = NS_LITERAL_CSTRING(APPLICATION_COMPRESS); + aNextEncoding.AssignLiteral(APPLICATION_COMPRESS); haveType = PR_TRUE; } @@ -4102,7 +4102,7 @@ nsHttpChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding) if (CaseInsensitiveFindInReadable(NS_LITERAL_CSTRING("deflate"), start, end)) { - aNextEncoding = NS_LITERAL_CSTRING(APPLICATION_ZIP); + aNextEncoding.AssignLiteral(APPLICATION_ZIP); haveType = PR_TRUE; } } diff --git a/netwerk/protocol/http/src/nsHttpDigestAuth.cpp b/netwerk/protocol/http/src/nsHttpDigestAuth.cpp index bd078a9b6a89..ad05ac1e6eaf 100644 --- a/netwerk/protocol/http/src/nsHttpDigestAuth.cpp +++ b/netwerk/protocol/http/src/nsHttpDigestAuth.cpp @@ -125,7 +125,7 @@ nsHttpDigestAuth::GetMethodAndPath(nsIHttpChannel *httpChannel, // is HTTPS, then we are really using a CONNECT method. // if (isSecure && isProxyAuth) { - httpMethod = NS_LITERAL_CSTRING("CONNECT"); + httpMethod.AssignLiteral("CONNECT"); // // generate hostname:port string. (unfortunately uri->GetHostPort // leaves out the port if it matches the default value, so we can't @@ -340,11 +340,11 @@ nsHttpDigestAuth::GenerateCredentials(nsIHttpChannel *httpChannel, nsCAutoString authString("Digest "); authString += "username=\""; authString += cUser; - authString += NS_LITERAL_CSTRING("\", realm=\""); + authString.AppendLiteral("\", realm=\""); authString += realm; - authString += NS_LITERAL_CSTRING("\", nonce=\""); + authString.AppendLiteral("\", nonce=\""); authString += nonce; - authString += NS_LITERAL_CSTRING("\", uri=\""); + authString.AppendLiteral("\", uri=\""); authString += path; if (algorithm & ALGO_SPECIFIED) { authString += "\", algorithm="; @@ -428,9 +428,9 @@ nsHttpDigestAuth::CalculateResponse(const char * ha1_digest, contents.Append(cnonce); contents.Append(':'); if (qop & QOP_AUTH_INT) - contents.Append(NS_LITERAL_CSTRING("auth-int:")); + contents.AppendLiteral("auth-int:"); else - contents.Append(NS_LITERAL_CSTRING("auth:")); + contents.AppendLiteral("auth:"); } contents.Append(ha2_digest, EXPANDED_DIGEST_LENGTH); diff --git a/netwerk/protocol/http/src/nsHttpHandler.cpp b/netwerk/protocol/http/src/nsHttpHandler.cpp index b820f93c5b7b..74680621b4ef 100644 --- a/netwerk/protocol/http/src/nsHttpHandler.cpp +++ b/netwerk/protocol/http/src/nsHttpHandler.cpp @@ -219,7 +219,7 @@ nsHttpHandler::Init() PrefsChanged(prefBranch, nsnull); } - mMisc = NS_LITERAL_CSTRING("rv:" MOZILLA_VERSION); + mMisc.AssignLiteral("rv:" MOZILLA_VERSION); #if DEBUG // dump user agent prefs @@ -1268,7 +1268,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS5(nsHttpHandler, NS_IMETHODIMP nsHttpHandler::GetScheme(nsACString &aScheme) { - aScheme = NS_LITERAL_CSTRING("http"); + aScheme.AssignLiteral("http"); return NS_OK; } @@ -1618,7 +1618,7 @@ nsHttpsHandler::Init() NS_IMETHODIMP nsHttpsHandler::GetScheme(nsACString &aScheme) { - aScheme = NS_LITERAL_CSTRING("https"); + aScheme.AssignLiteral("https"); return NS_OK; } diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/netwerk/protocol/http/src/nsHttpResponseHead.cpp index caba7012c781..1762e49cc5d1 100644 --- a/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -84,11 +84,11 @@ nsHttpResponseHead::Flatten(nsACString &buf, PRBool pruneTransients) if (mVersion == NS_HTTP_VERSION_0_9) return; - buf.Append(NS_LITERAL_CSTRING("HTTP/")); + buf.AppendLiteral("HTTP/"); if (mVersion == NS_HTTP_VERSION_1_1) - buf.Append(NS_LITERAL_CSTRING("1.1 ")); + buf.AppendLiteral("1.1 "); else - buf.Append(NS_LITERAL_CSTRING("1.0 ")); + buf.AppendLiteral("1.0 "); buf.Append(nsPrintfCString("%u", PRUintn(mStatus)) + NS_LITERAL_CSTRING(" ") + @@ -174,7 +174,7 @@ nsHttpResponseHead::ParseStatusLine(char *line) if ((mVersion == NS_HTTP_VERSION_0_9) || !(line = PL_strchr(line, ' '))) { mStatus = 200; - mStatusText = NS_LITERAL_CSTRING("OK"); + mStatusText.AssignLiteral("OK"); } else { // Status-Code @@ -187,7 +187,7 @@ nsHttpResponseHead::ParseStatusLine(char *line) // Reason-Phrase is whatever is remaining of the line if (!(line = PL_strchr(line, ' '))) { LOG(("mal-formed response status line; assuming statusText = 'OK'\n")); - mStatusText = NS_LITERAL_CSTRING("OK"); + mStatusText.AssignLiteral("OK"); } else mStatusText = ++line; diff --git a/netwerk/protocol/jar/src/nsJARChannel.cpp b/netwerk/protocol/jar/src/nsJARChannel.cpp index 05132930d147..2bad746b58dc 100644 --- a/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -522,7 +522,7 @@ nsJARChannel::GetContentType(nsACString &result) mimeServ->GetTypeFromExtension(nsDependentCString(ext), mContentType); } if (mContentType.IsEmpty()) - mContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); } result = mContentType; return NS_OK; diff --git a/netwerk/protocol/jar/src/nsJARProtocolHandler.cpp b/netwerk/protocol/jar/src/nsJARProtocolHandler.cpp index 88a69d523281..3addefd722ca 100644 --- a/netwerk/protocol/jar/src/nsJARProtocolHandler.cpp +++ b/netwerk/protocol/jar/src/nsJARProtocolHandler.cpp @@ -127,7 +127,7 @@ nsJARProtocolHandler::GetJARCache(nsIZipReaderCache* *result) NS_IMETHODIMP nsJARProtocolHandler::GetScheme(nsACString &result) { - result = NS_LITERAL_CSTRING("jar"); + result.AssignLiteral("jar"); return NS_OK; } diff --git a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp index a8fecae9e737..fe20da1681be 100644 --- a/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp +++ b/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp @@ -67,13 +67,13 @@ mozTXTToHTMLConv::EscapeChar(const PRUnichar ch, nsString& aStringToAppendTo) switch (ch) { case '<': - aStringToAppendTo.Append(NS_LITERAL_STRING("<")); + aStringToAppendTo.AppendLiteral("<"); break; case '>': - aStringToAppendTo.Append(NS_LITERAL_STRING(">")); + aStringToAppendTo.AppendLiteral(">"); break; case '&': - aStringToAppendTo.Append(NS_LITERAL_STRING("&")); + aStringToAppendTo.AppendLiteral("&"); break; default: aStringToAppendTo += ch; @@ -173,7 +173,7 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL(const PRUnichar * aInString, PRInt32 aI nsDependentString inString(aInString, aInLength); if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign.... { - aOutString.Assign(NS_LITERAL_STRING("mailto:")); + aOutString.AssignLiteral("mailto:"); aOutString += aInString; } } @@ -182,12 +182,12 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL(const PRUnichar * aInString, PRInt32 aI if (ItMatchesDelimited(aInString, aInLength, NS_LITERAL_STRING("www.").get(), 4, LT_IGNORE, LT_IGNORE)) { - aOutString.Assign(NS_LITERAL_STRING("http://")); + aOutString.AssignLiteral("http://"); aOutString += aInString; } else if (ItMatchesDelimited(aInString,aInLength, NS_LITERAL_STRING("ftp.").get(), 4, LT_IGNORE, LT_IGNORE)) { - aOutString.Assign(NS_LITERAL_STRING("ftp://")); + aOutString.AssignLiteral("ftp://"); aOutString += aInString; } } @@ -433,28 +433,28 @@ mozTXTToHTMLConv::CheckURLAndCreateHTML( // Real work if (NS_SUCCEEDED(rv) && uri) { - outputHTML.Assign(NS_LITERAL_STRING("
")); + outputHTML.AppendLiteral("\">"); outputHTML += desc; - outputHTML.Append(NS_LITERAL_STRING("")); + outputHTML.AppendLiteral(""); return PR_TRUE; } else @@ -663,13 +663,13 @@ mozTXTToHTMLConv::StructPhraseHit(const PRUnichar * aInString, PRInt32 aInString ) { openTags++; - aOutString.Append(NS_LITERAL_STRING("<")); + aOutString.AppendLiteral("<"); aOutString.AppendWithConversion(tagHTML); aOutString.Append(PRUnichar(' ')); aOutString.AppendWithConversion(attributeHTML); - aOutString.Append(NS_LITERAL_STRING(">")); + aOutString.AppendLiteral(">"); aOutString.Append(tagTXT); - aOutString.Append(NS_LITERAL_STRING("")); + aOutString.AppendLiteral(""); return PR_TRUE; } @@ -678,9 +678,9 @@ mozTXTToHTMLConv::StructPhraseHit(const PRUnichar * aInString, PRInt32 aInString && ItMatchesDelimited(aInString, aInStringLength, tagTXT, aTagTXTLen, LT_ALPHA, LT_DELIMITER)) { openTags--; - aOutString.Append(NS_LITERAL_STRING("")); + aOutString.AppendLiteral(""); aOutString.Append(tagTXT); - aOutString.Append(NS_LITERAL_STRING("')); return PR_TRUE; @@ -733,11 +733,11 @@ mozTXTToHTMLConv::SmilyHit(const PRUnichar * aInString, PRInt32 aLength, PRBool outputHTML.Append(PRUnichar(' ')); } - outputHTML += NS_LITERAL_STRING(" "); // "> + outputHTML.AppendLiteral("\"> "); // "> AppendASCIItoUTF16(tagTXT, outputHTML); // alt text - outputHTML += NS_LITERAL_STRING(" "); // + outputHTML.AppendLiteral(" "); // glyphTextLen = (col0 ? 0 : 1) + tagLen; return PR_TRUE; } @@ -900,7 +900,7 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo } if (text0 == '\f') { - aOutputString.Append(NS_LITERAL_STRING("")); + aOutputString.AppendLiteral(""); glyphTextLen = 1; MOZ_TIMER_STOP(mGlyphHitTimer); return PR_TRUE; @@ -911,7 +911,7 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo NS_LITERAL_STRING(" +/-").get(), 4, LT_IGNORE, LT_IGNORE)) { - aOutputString.Append(NS_LITERAL_STRING(" ±")); + aOutputString.AppendLiteral(" ±"); glyphTextLen = 4; MOZ_TIMER_STOP(mGlyphHitTimer); return PR_TRUE; @@ -920,7 +920,7 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo NS_LITERAL_STRING("+/-").get(), 3, LT_IGNORE, LT_IGNORE)) { - aOutputString.Append(NS_LITERAL_STRING("±")); + aOutputString.AppendLiteral("±"); glyphTextLen = 3; MOZ_TIMER_STOP(mGlyphHitTimer); return PR_TRUE; @@ -960,11 +960,11 @@ mozTXTToHTMLConv::GlyphHit(const PRUnichar * aInString, PRInt32 aInLength, PRBoo outputHTML.Truncate(); outputHTML += text0; - outputHTML.Append(NS_LITERAL_STRING("")); + outputHTML.AppendLiteral(""); aOutputString.Append(outputHTML); aOutputString.Append(&aInString[2], delimPos - 2); - aOutputString.Append(NS_LITERAL_STRING("")); + aOutputString.AppendLiteral(""); glyphTextLen = delimPos /* - 1 + 1 */ ; MOZ_TIMER_STOP(mGlyphHitTimer); diff --git a/netwerk/streamconv/converters/nsDirIndexParser.cpp b/netwerk/streamconv/converters/nsDirIndexParser.cpp index 6efd2b82bb2d..5a436611fb2f 100644 --- a/netwerk/streamconv/converters/nsDirIndexParser.cpp +++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp @@ -224,7 +224,7 @@ nsDirIndexParser::ParseFormat(const char* aFormatStr) { name.SetLength(nsUnescapeCount(name.BeginWriting())); // All tokens are case-insensitive - http://www.mozilla.org/projects/netlib/dirindexformat.html - if (name.EqualsIgnoreCase("description")) + if (name.LowerCaseEqualsLiteral("description")) mHasDescription = PR_TRUE; for (Field* i = gFieldTable; i->mName; ++i) { diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp index b4428c8bb412..6846201960eb 100644 --- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp +++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp @@ -71,7 +71,7 @@ static void ConvertNonAsciiToNCR(const nsAString& in, nsAFlatString& out) if (*start < 128) { out.Append(*start++); } else { - out.Append(NS_LITERAL_STRING("&#x")); + out.AppendLiteral("&#x"); nsAutoString hex; hex.AppendInt(*start++, 16); out.Append(hex); @@ -175,7 +175,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { nsCAutoString path; rv = uri->GetPath(path); if (NS_FAILED(rv)) return rv; - if (baseUri.Last() != '/' && !path.EqualsIgnoreCase("/%2F")) { + if (baseUri.Last() != '/' && !path.LowerCaseEqualsLiteral("/%2f")) { baseUri.Append('/'); path.Append('/'); uri->SetPath(path); @@ -196,11 +196,11 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { if (NS_FAILED(rv)) return rv; rv = newUri->GetAsciiSpec(titleUri); if (NS_FAILED(rv)) return rv; - if (titleUri.Last() != '/' && !path.EqualsIgnoreCase("/%2F")) + if (titleUri.Last() != '/' && !path.LowerCaseEqualsLiteral("/%2f")) titleUri.Append('/'); } - if (!path.Equals("//") && !path.EqualsIgnoreCase("/%2F")) { + if (!path.Equals("//") && !path.LowerCaseEqualsLiteral("/%2f")) { rv = uri->Resolve(NS_LITERAL_CSTRING(".."),parentStr); if (NS_FAILED(rv)) return rv; } @@ -257,7 +257,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { } nsString buffer; - buffer.Assign(NS_LITERAL_STRING("\n")); + buffer.AppendLiteral("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>"); nsXPIDLString title; @@ -312,9 +312,9 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { ConvertNonAsciiToNCR(title, strNCR); buffer.Append(strNCR); - buffer.Append(NS_LITERAL_STRING("\n")); + buffer.AppendLiteral("\"/>\n"); buffer.Append(NS_LITERAL_STRING("\n")); - buffer.Append(NS_LITERAL_STRING("\n\n

")); + buffer.AppendLiteral("\n\n

"); const PRUnichar* formatHeading[] = { htmlEscSpec.get() @@ -338,9 +338,9 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { ConvertNonAsciiToNCR(title, strNCR); buffer.Append(strNCR); - buffer.Append(NS_LITERAL_STRING("

\n
\n")); + buffer.AppendLiteral("\n
\n"); - //buffer.Append(NS_LITERAL_STRING("\n")); + //buffer.AppendLiteral("\n"); if (!parentStr.IsEmpty()) { nsXPIDLString parentText; @@ -349,7 +349,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { if (NS_FAILED(rv)) return rv; ConvertNonAsciiToNCR(parentText, strNCR); - buffer.Append(NS_LITERAL_STRING("
NameSizeLast modified
NameSizeLast modified
") + strNCR + @@ -372,7 +372,7 @@ nsIndexedToHTML::OnStopRequest(nsIRequest* request, nsISupports *aContext, nsresult aStatus) { nsresult rv = NS_OK; nsString buffer; - buffer.Assign(NS_LITERAL_STRING("

\n")); + buffer.AssignLiteral("
\n"); rv = FormatInputStream(request, aContext, buffer); if (NS_FAILED(rv)) return rv; @@ -476,15 +476,15 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, return NS_ERROR_NULL_POINTER; nsString pushBuffer; - pushBuffer.Append(NS_LITERAL_STRING("\n \n GetType(&type); if (type == nsIDirIndex::TYPE_SYMLINK) { - pushBuffer.Append(NS_LITERAL_STRING(" class=\"symlink\"")); + pushBuffer.AppendLiteral(" class=\"symlink\""); } - pushBuffer.Append(NS_LITERAL_STRING(" href=\"")); + pushBuffer.AppendLiteral(" href=\""); nsXPIDLCString loc; aIndex->GetLocation(getter_Copies(loc)); @@ -526,19 +526,19 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, AppendUTF8toUTF16(escapeBuf, pushBuffer); - pushBuffer.Append(NS_LITERAL_STRING("\">\"Directory:")); + pushBuffer.AppendLiteral("\"/>"); nsXPIDLString tmp; aIndex->GetDescription(getter_Copies(tmp)); @@ -546,7 +546,7 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, pushBuffer.Append(escaped); nsMemory::Free(escaped); - pushBuffer.Append(NS_LITERAL_STRING("\n ")); + pushBuffer.AppendLiteral("\n "); PRInt64 size; aIndex->GetSize(&size); @@ -559,13 +559,13 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, pushBuffer.Append(sizeString); } - pushBuffer.Append(NS_LITERAL_STRING("\n ")); + pushBuffer.AppendLiteral("\n "); PRTime t; aIndex->GetLastModified(&t); if (t == -1) { - pushBuffer.Append(NS_LITERAL_STRING("\n ")); + pushBuffer.AppendLiteral("\n "); } else { nsAutoString formatted; nsAutoString strNCR; // use NCR to show date in any doc charset @@ -576,7 +576,7 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, formatted); ConvertNonAsciiToNCR(formatted, strNCR); pushBuffer.Append(strNCR); - pushBuffer.Append(NS_LITERAL_STRING("\n ")); + pushBuffer.AppendLiteral("\n "); mDateTime->FormatPRTime(nsnull, kDateFormatNone, kTimeFormatSeconds, @@ -586,12 +586,12 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, pushBuffer.Append(strNCR); } - pushBuffer.Append(NS_LITERAL_STRING("\n\n")); + pushBuffer.AppendLiteral("\n\n"); // Split this up to avoid slow layout performance with large tables // - bug 85381 if (++mRowCount > ROWS_PER_TABLE) { - pushBuffer.Append(NS_LITERAL_STRING("\n\n")); + pushBuffer.AppendLiteral("
\n\n"); mRowCount = 0; } @@ -628,7 +628,7 @@ void nsIndexedToHTML::FormatSizeString(PRInt64 inSize, nsString& outSizeString) // round up to the nearest Kilobyte PRInt64 upperSize = (size + nsInt64(1023)) / nsInt64(1024); outSizeString.AppendInt(upperSize); - outSizeString.Append(NS_LITERAL_STRING(" KB")); + outSizeString.AppendLiteral(" KB"); } } diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index c3c615c9cd38..25ca44177cb2 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -756,7 +756,7 @@ nsMultiMixedConv::SendStart(nsIChannel *aChannel) { nsresult rv = NS_OK; if (mContentType.IsEmpty()) - mContentType = NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE); + mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE); // if we already have an mPartChannel, that means we never sent a Stop() // before starting up another "part." that would be bad. @@ -921,20 +921,20 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr, headerVal.CompressWhitespace(); // examine header - if (headerStr.EqualsIgnoreCase("content-type")) { + if (headerStr.LowerCaseEqualsLiteral("content-type")) { mContentType = headerVal; - } else if (headerStr.EqualsIgnoreCase("content-length")) { + } else if (headerStr.LowerCaseEqualsLiteral("content-length")) { mContentLength = atoi(headerVal.get()); - } else if (headerStr.EqualsIgnoreCase("content-disposition")) { + } else if (headerStr.LowerCaseEqualsLiteral("content-disposition")) { mContentDisposition = headerVal; - } else if (headerStr.EqualsIgnoreCase("set-cookie")) { + } else if (headerStr.LowerCaseEqualsLiteral("set-cookie")) { nsCOMPtr httpInternal = do_QueryInterface(aChannel); if (httpInternal) { httpInternal->SetCookie(headerVal.get()); } - } else if (headerStr.EqualsIgnoreCase("content-range") || - headerStr.EqualsIgnoreCase("range") ) { + } else if (headerStr.LowerCaseEqualsLiteral("content-range") || + headerStr.LowerCaseEqualsLiteral("range") ) { // something like: Content-range: bytes 7000-7999/8000 char* tmpPtr; diff --git a/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp b/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp index fb8a7f52fcd0..c197d6ebbd07 100644 --- a/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp +++ b/netwerk/streamconv/converters/nsTXTToHTMLConv.cpp @@ -71,11 +71,11 @@ nsTXTToHTMLConv::AsyncConvertData(const PRUnichar *aFromType, // nsIRequestObserver methods NS_IMETHODIMP nsTXTToHTMLConv::OnStartRequest(nsIRequest* request, nsISupports *aContext) { - mBuffer.Assign(NS_LITERAL_STRING("\n")); + mBuffer.AssignLiteral("<html>\n<head><title>"); mBuffer.Append(mPageTitle); - mBuffer.Append(NS_LITERAL_STRING("\n\n")); + mBuffer.AppendLiteral("\n\n"); if (mPreFormatHTML) { // Use
 tags
-      mBuffer.Append(NS_LITERAL_STRING("
\n"));
+      mBuffer.AppendLiteral("
\n");
     }
 
     // Push mBuffer to the listener now, so the initial HTML will not
@@ -111,9 +111,9 @@ nsTXTToHTMLConv::OnStopRequest(nsIRequest* request, nsISupports *aContext,
         (void)CatHTML(0, mBuffer.Length());
     }
     if (mPreFormatHTML) {
-      mBuffer.Append(NS_LITERAL_STRING("
\n")); + mBuffer.AppendLiteral("
\n"); } - mBuffer.Append(NS_LITERAL_STRING("\n")); + mBuffer.AppendLiteral("\n"); nsCOMPtr inputData; @@ -229,14 +229,14 @@ nsTXTToHTMLConv::Init() { convToken *token = new convToken; if (!token) return NS_ERROR_OUT_OF_MEMORY; token->prepend = PR_TRUE; - token->token.Assign(NS_LITERAL_STRING("http://")); // XXX need to iterate through all protos + token->token.AssignLiteral("http://"); // XXX need to iterate through all protos mTokens.AppendElement(token); token = new convToken; if (!token) return NS_ERROR_OUT_OF_MEMORY; token->prepend = PR_TRUE; token->token.Assign(PRUnichar('@')); - token->modText.Assign(NS_LITERAL_STRING("mailto:")); + token->modText.AssignLiteral("mailto:"); mTokens.AppendElement(token); return rv; diff --git a/netwerk/test/TestFileTransport.cpp b/netwerk/test/TestFileTransport.cpp index 65b23f68c76d..d4cceeb2641f 100644 --- a/netwerk/test/TestFileTransport.cpp +++ b/netwerk/test/TestFileTransport.cpp @@ -161,7 +161,7 @@ public: nsCAutoString name; rv = file->GetNativeLeafName(name); if (NS_FAILED(rv)) return rv; - name += NS_LITERAL_CSTRING(".bak"); + name.AppendLiteral(".bak"); rv = file->SetNativeLeafName(name); if (NS_FAILED(rv)) return rv; rv = NS_NewLocalFileOutputStream(getter_AddRefs(mOut), @@ -250,7 +250,7 @@ TestAsyncWrite(const char* fileName, PRUint32 offset, PRInt32 length) if (NS_FAILED(rv)) return rv; nsCAutoString outFile(fileName); - outFile += NS_LITERAL_CSTRING(".out"); + outFile.AppendLiteral(".out"); nsITransport* fileTrans; nsCOMPtr file; rv = NS_NewNativeLocalFile(outFile, PR_FALSE, getter_AddRefs(file)); diff --git a/netwerk/test/TestPageLoad.cpp b/netwerk/test/TestPageLoad.cpp index ed7d7af47c9c..4fb1307491d1 100644 --- a/netwerk/test/TestPageLoad.cpp +++ b/netwerk/test/TestPageLoad.cpp @@ -273,7 +273,7 @@ MyNotifications::OnProgress(nsIRequest *req, nsISupports *ctx, int getStrLine(const char *src, char *str, int ind, int max) { char c = src[ind]; int i=0; - globalStream.Assign(NS_LITERAL_STRING("\0")); + globalStream.AssignLiteral("\0"); while(c!='\n' && c!='\0' && iProvideContent(theFormType,theContent,theAttribute); @@ -2204,7 +2204,7 @@ nsresult CNavDTD::HandleEntityToken(CToken* aToken) { //if you're here we have a bogus entity. //convert it into a text token. nsAutoString entityName; - entityName.Assign(NS_LITERAL_STRING("&")); + entityName.AssignLiteral("&"); entityName.Append(theStr); //should append the entity name; fix bug 51161. theToken = mTokenAllocator->CreateTokenOfType(eToken_text,eHTMLTag_text,entityName); #ifdef DEBUG diff --git a/parser/htmlparser/src/COtherDTD.cpp b/parser/htmlparser/src/COtherDTD.cpp index 62c593d40dbd..69361102d67a 100644 --- a/parser/htmlparser/src/COtherDTD.cpp +++ b/parser/htmlparser/src/COtherDTD.cpp @@ -567,11 +567,11 @@ nsresult COtherDTD::DidHandleStartTag(nsIParserNode& aNode,eHTMLTags aChildTag){ PRInt32 theIndex=0; for(theIndex=0;theIndexCreateTokenOfType(eToken_text,eHTMLTag_text,entityName); #ifdef DEBUG diff --git a/parser/htmlparser/src/nsDTDUtils.cpp b/parser/htmlparser/src/nsDTDUtils.cpp index 92bb8a765318..150268b5d4ba 100644 --- a/parser/htmlparser/src/nsDTDUtils.cpp +++ b/parser/htmlparser/src/nsDTDUtils.cpp @@ -878,7 +878,7 @@ PRInt32 nsDTDContext::IncrementCounter(eHTMLTags aTag,nsIParserNode& aNode,nsStr const nsAString& theKey=aNode.GetKeyAt(theIndex); const nsAString& theValue=aNode.GetValueAt(theIndex); - if(theKey.Equals(NS_LITERAL_STRING("name"), nsCaseInsensitiveStringComparator())){ + if(theKey.LowerCaseEqualsLiteral("name")){ theEntity=GetEntity(theValue); if(!theEntity) { theEntity=RegisterEntity(theValue,theValue); @@ -886,10 +886,10 @@ PRInt32 nsDTDContext::IncrementCounter(eHTMLTags aTag,nsIParserNode& aNode,nsStr } aTag=eHTMLTag_userdefined; } - else if(theKey.Equals(NS_LITERAL_STRING("noincr"), nsCaseInsensitiveStringComparator())){ + else if(theKey.LowerCaseEqualsLiteral("noincr")){ theIncrValue=0; } - else if(theKey.Equals(NS_LITERAL_STRING("format"), nsCaseInsensitiveStringComparator())){ + else if(theKey.LowerCaseEqualsLiteral("format")){ nsAString::const_iterator start; PRUnichar theChar=*theValue.BeginReading(start); @@ -908,7 +908,7 @@ PRInt32 nsDTDContext::IncrementCounter(eHTMLTags aTag,nsIParserNode& aNode,nsStr } //determine numbering style } - else if(theKey.Equals(NS_LITERAL_STRING("value"), nsCaseInsensitiveStringComparator())){ + else if(theKey.LowerCaseEqualsLiteral("value")){ PRInt32 err=0; theNewValue=atoi(NS_LossyConvertUCS2toASCII(theValue).get()); if(!err) { diff --git a/parser/htmlparser/src/nsHTMLTokens.cpp b/parser/htmlparser/src/nsHTMLTokens.cpp index 4294df9b203e..5a636649c514 100644 --- a/parser/htmlparser/src/nsHTMLTokens.cpp +++ b/parser/htmlparser/src/nsHTMLTokens.cpp @@ -376,7 +376,7 @@ void CEndToken::GetSource(nsString& anOutputString){ * @return nada */ void CEndToken::AppendSourceTo(nsAString& anOutputString){ - anOutputString.Append(NS_LITERAL_STRING("= 127)) { - aResult.Append(NS_LITERAL_STRING("&#")); + aResult.AppendLiteral("&#"); aResult.AppendInt(PRInt32(ch), 10); aResult.Append(PRUnichar(';')); } diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index 143e6947f429..28192fce8e0b 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -294,7 +294,7 @@ nsParser::nsParser() { } #endif - mCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + mCharset.AssignLiteral("ISO-8859-1"); mParserContext=0; mStreamStatus=0; mCharsetSource=kCharsetUninitialized; @@ -1680,12 +1680,12 @@ nsParser::ParseFragment(const nsAString& aSourceBuffer, PRUint32 theIndex = 0; while (theIndex++ < theCount){ - theContext.Append(NS_LITERAL_STRING("<")); + theContext.AppendLiteral("<"); theContext.Append((PRUnichar*)aTagStack.ElementAt(theCount - theIndex)); - theContext.Append(NS_LITERAL_STRING(">")); + theContext.AppendLiteral(">"); } - theContext.Append(NS_LITERAL_STRING("")); //XXXHack! I'll make this better later. + theContext.AppendLiteral(""); //XXXHack! I'll make this better later. //now it's time to try to build the model from this fragment @@ -2452,12 +2452,12 @@ nsresult nsParser::OnStopRequest(nsIRequest *request, nsISupports* aContext, //What we'll do (for now at least) is construct a blank HTML document. if (!mParserContext->mMimeType.EqualsLiteral(kPlainTextContentType)) { - temp.Assign(NS_LITERAL_STRING("")); + temp.AssignLiteral(""); } // XXX: until bug #108067 has been fixed we must ensure that *something* // is in the scanner! so, for now just put in a single space. else { - temp.Assign(NS_LITERAL_STRING(" ")); + temp.AssignLiteral(" "); } mParserContext->mScanner->Append(temp); result=ResumeParse(PR_TRUE,PR_TRUE); diff --git a/parser/htmlparser/src/nsScanner.cpp b/parser/htmlparser/src/nsScanner.cpp index 39958e389163..dbfa194f5c44 100644 --- a/parser/htmlparser/src/nsScanner.cpp +++ b/parser/htmlparser/src/nsScanner.cpp @@ -209,7 +209,7 @@ nsresult nsScanner::SetDocumentCharset(const nsACString& aCharset , PRInt32 aSou if(NS_FAILED(res) && (kCharsetUninitialized == mCharsetSource) ) { // failed - unknown alias , fallback to ISO-8859-1 - charsetName.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + charsetName.AssignLiteral("ISO-8859-1"); } mCharset = charsetName; mCharsetSource = aSource; diff --git a/parser/htmlparser/src/nsViewSourceHTML.cpp b/parser/htmlparser/src/nsViewSourceHTML.cpp index b16c8e8fd1a0..b050f73df9a6 100644 --- a/parser/htmlparser/src/nsViewSourceHTML.cpp +++ b/parser/htmlparser/src/nsViewSourceHTML.cpp @@ -531,7 +531,7 @@ NS_IMETHODIMP CViewSourceHTML::BuildModel(nsIParser* aParser,nsITokenizer* aToke if (StringBeginsWith(mFilename, NS_LITERAL_STRING("data:")) && mFilename.Length() > 50) { nsAutoString dataFilename(Substring(mFilename, 0, 50)); - dataFilename.Append(NS_LITERAL_STRING("...")); + dataFilename.AppendLiteral("..."); mSink->SetTitle(dataFilename); } else { mSink->SetTitle(mFilename); @@ -654,7 +654,7 @@ nsresult CViewSourceHTML::GenerateSummary() { if(mErrorCount && mTagCount) { - mErrors.Append(NS_LITERAL_STRING("\n\n ")); + mErrors.AppendLiteral("\n\n "); mErrors.AppendInt(mErrorCount); mErrors.Append(NS_LITERAL_STRING(" error(s) detected -- see highlighted portions.\n")); @@ -1109,9 +1109,9 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) { case eToken_cdatasection: { nsAutoString theStr; - theStr.Assign(NS_LITERAL_STRING("GetStringValue()); - theStr.Append(NS_LITERAL_STRING(">")); + theStr.AppendLiteral(">"); result=WriteTag(mCDATATag,theStr,0,PR_TRUE); } break; @@ -1119,9 +1119,9 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) { case eToken_markupDecl: { nsAutoString theStr; - theStr.Assign(NS_LITERAL_STRING("GetStringValue()); - theStr.Append(NS_LITERAL_STRING(">")); + theStr.AppendLiteral(">"); result=WriteTag(mMarkupDeclaration,theStr,0,PR_TRUE); } break; @@ -1186,7 +1186,7 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) { { nsAutoString theStr; theStr.Assign(aToken->GetStringValue()); - if(!theStr.Equals(NS_LITERAL_STRING("XI"), nsCaseInsensitiveStringComparator())) { + if(!theStr.LowerCaseEqualsLiteral("xi")) { PRUnichar theChar=theStr.CharAt(0); if((nsCRT::IsAsciiDigit(theChar)) || ('X'==theChar) || ('x'==theChar)){ theStr.Assign(NS_LITERAL_STRING("#") + theStr); diff --git a/profile/pref-migrator/src/nsPrefMigration.cpp b/profile/pref-migrator/src/nsPrefMigration.cpp index 74fe36c71b23..49f1167d8ff1 100644 --- a/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/profile/pref-migrator/src/nsPrefMigration.cpp @@ -2526,7 +2526,7 @@ nsPrefConverter::GetPlatformCharset(nsCString& aCharset) rv = platformCharset->GetCharset(kPlatformCharsetSel_4xPrefsJS, aCharset); } if (NS_FAILED(rv)) { - aCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); // use ISO-8859-1 in case of any error + aCharset.AssignLiteral("ISO-8859-1"); // use ISO-8859-1 in case of any error } return rv; diff --git a/profile/src/nsProfileAccess.cpp b/profile/src/nsProfileAccess.cpp index d1a6bd481342..f6f27f57ee9b 100644 --- a/profile/src/nsProfileAccess.cpp +++ b/profile/src/nsProfileAccess.cpp @@ -162,7 +162,7 @@ GetPlatformCharset(nsCString& aCharset) rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName, aCharset); } if (NS_FAILED(rv)) { - aCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); // use ISO-8859-1 in case of any error + aCharset.AssignLiteral("ISO-8859-1"); // use ISO-8859-1 in case of any error } return rv; } diff --git a/rdf/base/src/nsRDFXMLSerializer.cpp b/rdf/base/src/nsRDFXMLSerializer.cpp index 8f1a3d67aefc..bf1e3fab4d80 100644 --- a/rdf/base/src/nsRDFXMLSerializer.cpp +++ b/rdf/base/src/nsRDFXMLSerializer.cpp @@ -256,7 +256,7 @@ nsRDFXMLSerializer::MakeQName(nsIRDFResource* aResource, // Just generate a random prefix static PRInt32 gPrefixID = 0; - aNameSpacePrefix = NS_LITERAL_STRING("NS"); + aNameSpacePrefix.AssignLiteral("NS"); aNameSpacePrefix.AppendInt(++gPrefixID, 10); return PR_FALSE; } @@ -805,13 +805,13 @@ nsRDFXMLSerializer::SerializeContainer(nsIOutputStream* aStream, // appropriate tag-open sequence if (IsA(mDataSource, aContainer, kRDF_Bag)) { - tag = NS_LITERAL_STRING("RDF:Bag"); + tag.AssignLiteral("RDF:Bag"); } else if (IsA(mDataSource, aContainer, kRDF_Seq)) { - tag = NS_LITERAL_STRING("RDF:Seq"); + tag.AssignLiteral("RDF:Seq"); } else if (IsA(mDataSource, aContainer, kRDF_Alt)) { - tag = NS_LITERAL_STRING("RDF:Alt"); + tag.AssignLiteral("RDF:Alt"); } else { NS_ASSERTION(PR_FALSE, "huh? this is _not_ a container."); diff --git a/rdf/chrome/src/nsChromeProtocolHandler.cpp b/rdf/chrome/src/nsChromeProtocolHandler.cpp index 8021e12a8668..20d676f9b171 100644 --- a/rdf/chrome/src/nsChromeProtocolHandler.cpp +++ b/rdf/chrome/src/nsChromeProtocolHandler.cpp @@ -348,7 +348,7 @@ nsCachedChromeChannel::SetNotificationCallbacks(nsIInterfaceRequestor * aNotific NS_IMETHODIMP nsCachedChromeChannel::GetContentType(nsACString &aContentType) { - aContentType = NS_LITERAL_CSTRING("mozilla.application/cached-xul"); + aContentType.AssignLiteral("mozilla.application/cached-xul"); return NS_OK; } diff --git a/rdf/chrome/src/nsChromeRegistry.cpp b/rdf/chrome/src/nsChromeRegistry.cpp index b7acb4708c6f..7414cdb050d5 100644 --- a/rdf/chrome/src/nsChromeRegistry.cpp +++ b/rdf/chrome/src/nsChromeRegistry.cpp @@ -2322,8 +2322,8 @@ nsChromeRegistry::InstallProvider(const nsACString& aProviderType, // Get the literal for our loc type. nsAutoString locstr; if (aUseProfile) - locstr.Assign(NS_LITERAL_STRING("profile")); - else locstr.Assign(NS_LITERAL_STRING("install")); + locstr.AssignLiteral("profile"); + else locstr.AssignLiteral("install"); nsCOMPtr locLiteral; rv = mRDFService->GetLiteral(locstr.get(), getter_AddRefs(locLiteral)); if (NS_FAILED(rv)) return rv; diff --git a/rdf/datasource/src/nsFileSystemDataSource.cpp b/rdf/datasource/src/nsFileSystemDataSource.cpp index 3396259be1c6..56cc7b5c5b35 100644 --- a/rdf/datasource/src/nsFileSystemDataSource.cpp +++ b/rdf/datasource/src/nsFileSystemDataSource.cpp @@ -1286,7 +1286,7 @@ FileSystemDataSource::isValidFolder(nsIRDFResource *source) // An empty folder, or a folder that contains just "desktop.ini", // is considered to be a IE Favorite; otherwise, its a folder - if (!name.EqualsIgnoreCase("desktop.ini")) + if (!name.LowerCaseEqualsLiteral("desktop.ini")) { isValid = PR_TRUE; break; @@ -1603,8 +1603,8 @@ FileSystemDataSource::GetName(nsIRDFResource *source, nsIRDFLiteral **aResult) { nsAutoString extension; name.Right(extension, 4); - if (extension.EqualsIgnoreCase(".url") || - extension.EqualsIgnoreCase(".lnk")) + if (extension.LowerCaseEqualsLiteral(".url") || + extension.LowerCaseEqualsLiteral(".lnk")) { name.Truncate(nameLen - 4); } @@ -1708,14 +1708,14 @@ FileSystemDataSource::getIEFavoriteURL(nsIRDFResource *source, nsString aFileURL { if (isValidFolder(source)) return(NS_RDF_NO_VALUE); - aFileURL += NS_LITERAL_STRING("desktop.ini"); + aFileURL.AppendLiteral("desktop.ini"); } else if (aFileURL.Length() > 4) { nsAutoString extension; aFileURL.Right(extension, 4); - if (!extension.EqualsIgnoreCase(".url")) + if (!extension.LowerCaseEqualsLiteral(".url")) { return(NS_RDF_NO_VALUE); } diff --git a/security/manager/ssl/src/nsCrypto.cpp b/security/manager/ssl/src/nsCrypto.cpp index c8bf6d7feaf1..fac9105cbf6e 100644 --- a/security/manager/ssl/src/nsCrypto.cpp +++ b/security/manager/ssl/src/nsCrypto.cpp @@ -2225,7 +2225,7 @@ nsCrypto::SignText(const nsAString& aStringToSign, const nsAString& aCaOption, } if (!certList || CERT_LIST_EMPTY(certList)) { - aResult.Append(NS_LITERAL_STRING("error:noMatchingCert")); + aResult.AppendLiteral("error:noMatchingCert"); return NS_OK; } @@ -2394,7 +2394,7 @@ nsCrypto::SignText(const nsAString& aStringToSign, const nsAString& aCaOption, } if (canceled) { - aResult.Append(NS_LITERAL_STRING("error:userCancel")); + aResult.AppendLiteral("error:userCancel"); return NS_OK; } @@ -2411,7 +2411,7 @@ nsCrypto::SignText(const nsAString& aStringToSign, const nsAString& aCaOption, // XXX Doing what nsFormSubmission::GetEncoder does (see // http://bugzilla.mozilla.org/show_bug.cgi?id=81203). if (charset.EqualsLiteral("ISO-8859-1")) { - charset.Assign(NS_LITERAL_CSTRING("windows-1252")); + charset.AssignLiteral("windows-1252"); } nsCOMPtr encoder = diff --git a/security/manager/ssl/src/nsKeygenHandler.cpp b/security/manager/ssl/src/nsKeygenHandler.cpp index d3884d7bccf9..ed6e05f0038a 100644 --- a/security/manager/ssl/src/nsKeygenHandler.cpp +++ b/security/manager/ssl/src/nsKeygenHandler.cpp @@ -417,10 +417,10 @@ nsKeygenFormProcessor::GetPublicKey(nsAString& aValue, nsAString& aChallenge, } // Set the keygen mechanism - if (aKeyType.IsEmpty() || aKeyType.EqualsIgnoreCase("rsa")) { + if (aKeyType.IsEmpty() || aKeyType.LowerCaseEqualsLiteral("rsa")) { type = rsaKey; keyGenMechanism = CKM_RSA_PKCS_KEY_PAIR_GEN; - } else if (aKeyType.EqualsIgnoreCase("dsa")) { + } else if (aKeyType.LowerCaseEqualsLiteral("dsa")) { char * end; pqgString = ToNewCString(aPqg); type = dsaKey; @@ -618,7 +618,7 @@ nsKeygenFormProcessor::ProcessValue(nsIDOMHTMLElement *aElement, res = selectElement->GetAttribute(NS_LITERAL_STRING("keytype"), keyTypeValue); if (NS_FAILED(res) || keyTypeValue.IsEmpty()) { // If this field is not present, we default to rsa. - keyTypeValue.Assign(NS_LITERAL_STRING("rsa")); + keyTypeValue.AssignLiteral("rsa"); } res = selectElement->GetAttribute(NS_LITERAL_STRING("challenge"), challengeValue); rv = GetPublicKey(aValue, challengeValue, keyTypeValue, @@ -639,7 +639,7 @@ NS_METHOD nsKeygenFormProcessor::ProvideContent(const nsString& aFormType, nsString *str = new nsString(choice->name); aContent.AppendElement(str); } - aAttribute.Assign(NS_LITERAL_STRING("-mozilla-keygen")); + aAttribute.AssignLiteral("-mozilla-keygen"); } return NS_OK; } diff --git a/security/manager/ssl/src/nsNSSCertHelper.cpp b/security/manager/ssl/src/nsNSSCertHelper.cpp index 4eebc49bdabc..e2f1ff7b0c8f 100644 --- a/security/manager/ssl/src/nsNSSCertHelper.cpp +++ b/security/manager/ssl/src/nsNSSCertHelper.cpp @@ -668,7 +668,7 @@ ProcessTime(PRTime dispTime, const PRUnichar *displayName, &explodedTime, tempString); text.Append(tempString); - text.Append(NS_LITERAL_STRING("\n(")); + text.AppendLiteral("\n("); PRExplodedTime explodedTimeGMT; PR_ExplodeTime(dispTime, PR_GMTParameters, &explodedTimeGMT); diff --git a/security/manager/ssl/src/nsNSSCertificate.cpp b/security/manager/ssl/src/nsNSSCertificate.cpp index 656261be788d..11c1c3e0ab82 100644 --- a/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/security/manager/ssl/src/nsNSSCertificate.cpp @@ -248,14 +248,14 @@ nsNSSCertificate::FormatUIStrings(const nsAutoString &nickname, nsAutoString &ni } if (NS_SUCCEEDED(x509Proxy->GetSerialNumber(temp1)) && !temp1.IsEmpty()) { - details.Append(NS_LITERAL_STRING(" ")); + details.AppendLiteral(" "); if (NS_SUCCEEDED(nssComponent->GetPIPNSSBundleString("CertDumpSerialNo", info))) { details.Append(info); - details.Append(NS_LITERAL_STRING(": ")); + details.AppendLiteral(": "); } details.Append(temp1); - nickWithSerial.Append(NS_LITERAL_STRING(" [")); + nickWithSerial.AppendLiteral(" ["); nickWithSerial.Append(temp1); nickWithSerial.Append(PRUnichar(']')); @@ -276,7 +276,7 @@ nsNSSCertificate::FormatUIStrings(const nsAutoString &nickname, nsAutoString &ni } if (validity) { - details.Append(NS_LITERAL_STRING(" ")); + details.AppendLiteral(" "); if (NS_SUCCEEDED(nssComponent->GetPIPNSSBundleString("CertInfoValid", info))) { details.Append(info); } @@ -305,10 +305,10 @@ nsNSSCertificate::FormatUIStrings(const nsAutoString &nickname, nsAutoString &ni PRUint32 tempInt = 0; if (NS_SUCCEEDED(x509Proxy->GetUsagesString(PR_FALSE, &tempInt, temp1)) && !temp1.IsEmpty()) { - details.Append(NS_LITERAL_STRING(" ")); + details.AppendLiteral(" "); if (NS_SUCCEEDED(nssComponent->GetPIPNSSBundleString("CertInfoPurposes", info))) { details.Append(info); - details.Append(NS_LITERAL_STRING(": ")); + details.AppendLiteral(": "); } details.Append(temp1); details.Append(PRUnichar('\n')); @@ -1061,7 +1061,7 @@ nsNSSCertificate::GetUsagesString(PRBool ignoreOcsp, rv = uah.GetUsagesArray(suffix, ignoreOcsp, max_usages, _verified, &tmpCount, tmpUsages); _usages.Truncate(); for (PRUint32 i=0; i0) _usages.Append(NS_LITERAL_STRING(",")); + if (i>0) _usages.AppendLiteral(","); _usages.Append(tmpUsages[i]); nsMemory::Free(tmpUsages[i]); } diff --git a/security/manager/ssl/src/nsPK11TokenDB.cpp b/security/manager/ssl/src/nsPK11TokenDB.cpp index 0221ac7ed8f1..8f189a03f512 100644 --- a/security/manager/ssl/src/nsPK11TokenDB.cpp +++ b/security/manager/ssl/src/nsPK11TokenDB.cpp @@ -88,11 +88,11 @@ nsPK11Token::nsPK11Token(PK11SlotInfo *slot) // Set the Hardware Version field mTokenHWVersion.AppendInt(tok_info.hardwareVersion.major); - mTokenHWVersion.Append(NS_LITERAL_STRING(".")); + mTokenHWVersion.AppendLiteral("."); mTokenHWVersion.AppendInt(tok_info.hardwareVersion.minor); // Set the Firmware Version field mTokenFWVersion.AppendInt(tok_info.firmwareVersion.major); - mTokenFWVersion.Append(NS_LITERAL_STRING(".")); + mTokenFWVersion.AppendLiteral("."); mTokenFWVersion.AppendInt(tok_info.firmwareVersion.minor); // Set the Serial Number field const char *ccSerial = (const char*)tok_info.serialNumber; diff --git a/security/manager/ssl/src/nsPKCS11Slot.cpp b/security/manager/ssl/src/nsPKCS11Slot.cpp index b4363692eb08..16bf479d358f 100644 --- a/security/manager/ssl/src/nsPKCS11Slot.cpp +++ b/security/manager/ssl/src/nsPKCS11Slot.cpp @@ -79,11 +79,11 @@ nsPKCS11Slot::nsPKCS11Slot(PK11SlotInfo *slot) mSlotManID.Trim(" ", PR_FALSE, PR_TRUE); // Set the Hardware Version field mSlotHWVersion.AppendInt(slot_info.hardwareVersion.major); - mSlotHWVersion.Append(NS_LITERAL_STRING(".")); + mSlotHWVersion.AppendLiteral("."); mSlotHWVersion.AppendInt(slot_info.hardwareVersion.minor); // Set the Firmware Version field mSlotFWVersion.AppendInt(slot_info.firmwareVersion.major); - mSlotFWVersion.Append(NS_LITERAL_STRING(".")); + mSlotFWVersion.AppendLiteral("."); mSlotFWVersion.AppendInt(slot_info.firmwareVersion.minor); } diff --git a/security/manager/ssl/src/nsPKCS12Blob.cpp b/security/manager/ssl/src/nsPKCS12Blob.cpp index 8102310a1b22..94e8affdfdd5 100644 --- a/security/manager/ssl/src/nsPKCS12Blob.cpp +++ b/security/manager/ssl/src/nsPKCS12Blob.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: nsPKCS12Blob.cpp,v 1.40 2004/04/27 23:04:34 gerv%gerv.net Exp $ */ +/* $Id: nsPKCS12Blob.cpp,v 1.41 2004/06/17 00:13:16 roc+%cs.cmu.edu Exp $ */ #include "prmem.h" #include "prprf.h" @@ -407,7 +407,7 @@ nsPKCS12Blob::ExportToFile(nsILocalFile *file, // We're going to add the .p12 extension to the file name just like // Communicator used to. We create a new nsILocalFile and initialize // it with the new patch. - filePath.Append(NS_LITERAL_STRING(".p12")); + filePath.AppendLiteral(".p12"); localFileRef = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv); if (NS_FAILED(rv)) goto finish; localFileRef->InitWithPath(filePath); diff --git a/toolkit/components/passwordmgr/base/nsPasswordManager.cpp b/toolkit/components/passwordmgr/base/nsPasswordManager.cpp index f9c711822031..b9895d721a89 100644 --- a/toolkit/components/passwordmgr/base/nsPasswordManager.cpp +++ b/toolkit/components/passwordmgr/base/nsPasswordManager.cpp @@ -1033,13 +1033,13 @@ nsPasswordManager::Notify(nsIContent* aFormNode, userFieldElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete); - if (autocomplete.EqualsIgnoreCase("off")) + if (autocomplete.LowerCaseEqualsLiteral("off")) return NS_OK; } nsCOMPtr formDOMEl = do_QueryInterface(aFormNode); formDOMEl->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete); - if (autocomplete.EqualsIgnoreCase("off")) + if (autocomplete.LowerCaseEqualsLiteral("off")) return NS_OK; nsCOMPtr passFieldElement = do_QueryInterface(passFields.ObjectAt(0)); @@ -1876,7 +1876,7 @@ nsPasswordManager::GetPasswordRealm(nsIURI* aURI, nsACString& aRealm) aURI->GetScheme(buffer); aRealm.Append(buffer); - aRealm.Append(NS_LITERAL_CSTRING("://")); + aRealm.AppendLiteral("://"); aURI->GetHostPort(buffer); if (buffer.IsEmpty()) { diff --git a/toolkit/components/satchel/src/nsFormFillController.cpp b/toolkit/components/satchel/src/nsFormFillController.cpp index 71305970e581..ca8fba2cd5a1 100644 --- a/toolkit/components/satchel/src/nsFormFillController.cpp +++ b/toolkit/components/satchel/src/nsFormFillController.cpp @@ -514,14 +514,14 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent) nsAutoString autocomplete; input->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete); if (type.EqualsLiteral("text") && - !autocomplete.EqualsIgnoreCase("off")) { + !autocomplete.LowerCaseEqualsLiteral("off")) { nsCOMPtr form; input->GetForm(getter_AddRefs(form)); if (form) form->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete); - if (!form || !autocomplete.EqualsIgnoreCase("off")) + if (!form || !autocomplete.LowerCaseEqualsLiteral("off")) StartControllingInput(input); } } diff --git a/toolkit/components/satchel/src/nsFormHistory.cpp b/toolkit/components/satchel/src/nsFormHistory.cpp index b11b4a9bc90d..e42ada2b2d03 100644 --- a/toolkit/components/satchel/src/nsFormHistory.cpp +++ b/toolkit/components/satchel/src/nsFormHistory.cpp @@ -442,9 +442,9 @@ nsFormHistory::OpenDatabase() /* // TESTING: Add a row to the database nsAutoString foopy; - foopy.AssignWithConversion("foopy"); + foopy.AssignLiteral("foopy"); nsAutoString oogly; - oogly.AssignWithConversion("oogly"); + oogly.AssignLiteral("oogly"); AppendRow(foopy, oogly, nsnull); Flush(); */ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index d9df6970d72e..17c5ede656e1 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1260,7 +1260,7 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp) if (obsService) { - nsAutoString userMessage; userMessage.AssignWithConversion("Creating first window..."); + nsAutoString userMessage; userMessage.AssignLiteral("Creating first window..."); obsService->NotifyObservers(nsnull, "startup_user_notifcations", userMessage.get()); } diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 64c9b1369841..1e1e473d2833 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -88,7 +88,7 @@ void GetURIStringFromRequest(nsIRequest* request, nsACString &name) if (request) request->GetName(name); else - name = NS_LITERAL_CSTRING("???"); + name.AssignLiteral("???"); } #endif /* DEBUG */ diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp index c2afb5c58ada..52fe1b27d314 100644 --- a/uriloader/base/nsURILoader.cpp +++ b/uriloader/base/nsURILoader.cpp @@ -422,7 +422,7 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports * // RFC 2183, section 2.8 says that an unknown disposition // value should be treated as "attachment" if (NS_FAILED(rv) || - (!dispToken.EqualsIgnoreCase("inline") && + (!dispToken.LowerCaseEqualsLiteral("inline") && // Broken sites just send // Content-Disposition: filename="file" // without a disposition token... screen those out. diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 0f93db0667c4..f3f193f330ce 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -245,7 +245,7 @@ static PRBool GetFilenameAndExtensionFromChannel(nsIChannel* aChannel, // RFC 2183, section 2.8 says that an unknown disposition // value should be treated as "attachment" if (NS_FAILED(rv) || - (!dispToken.EqualsIgnoreCase("inline") && + (!dispToken.LowerCaseEqualsLiteral("inline") && // Broken sites just send // Content-Disposition: filename="file" // without a disposition token... screen those out. @@ -1528,23 +1528,23 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ { case NS_ERROR_OUT_OF_MEMORY: // No memory - msgId = NS_LITERAL_STRING("noMemory"); + msgId.AssignLiteral("noMemory"); break; case NS_ERROR_FILE_DISK_FULL: case NS_ERROR_FILE_NO_DEVICE_SPACE: // Out of space on target volume. - msgId = NS_LITERAL_STRING("diskFull"); + msgId.AssignLiteral("diskFull"); break; case NS_ERROR_FILE_READ_ONLY: // Attempt to write to read/only file. - msgId = NS_LITERAL_STRING("readOnly"); + msgId.AssignLiteral("readOnly"); break; case NS_ERROR_FILE_ACCESS_DENIED: // Attempt to write without sufficient permissions. - msgId = NS_LITERAL_STRING("accessError"); + msgId.AssignLiteral("accessError"); break; case NS_ERROR_FILE_NOT_FOUND: @@ -1552,7 +1552,7 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ case NS_ERROR_FILE_UNRECOGNIZED_PATH: // Helper app not found, let's verify this happened on launch if (type == kLaunchError) { - msgId = NS_LITERAL_STRING("helperAppNotFound"); + msgId.AssignLiteral("helperAppNotFound"); break; } // fall through @@ -1562,13 +1562,13 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ switch(type) { case kReadError: - msgId = NS_LITERAL_STRING("readError"); + msgId.AssignLiteral("readError"); break; case kWriteError: - msgId = NS_LITERAL_STRING("writeError"); + msgId.AssignLiteral("writeError"); break; case kLaunchError: - msgId = NS_LITERAL_STRING("launchError"); + msgId.AssignLiteral("launchError"); break; } break; @@ -2008,7 +2008,7 @@ NS_IMETHODIMP nsExternalAppHandler::SaveToDisk(nsIFile * aNewFileLocation, PRBoo // Get the old leaf name and append .part to it nsCAutoString name; mFinalFileDestination->GetNativeLeafName(name); - name.Append(NS_LITERAL_CSTRING(".part")); + name.AppendLiteral(".part"); movedFile->SetNativeLeafName(name); nsCOMPtr dir; diff --git a/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index a289653c9b7e..3a6d28372323 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -845,9 +845,9 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID) { PRIntn ix = aID - VIEWER_DEMO0; nsAutoString url; url.AssignWithConversion(SAMPLES_BASE_URL); - url.Append(NS_LITERAL_STRING("/test")); + url.AppendLiteral("/test"); url.AppendInt(ix, 10); - url.Append(NS_LITERAL_STRING(".html")); + url.AppendLiteral(".html"); nsCOMPtr webNav(do_QueryInterface(mWebBrowser)); webNav->LoadURI(url.get(), nsIWebNavigation::LOAD_FLAGS_NONE, nsnull, nsnull, nsnull); } @@ -856,7 +856,7 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID) case VIEWER_XPTOOLKITTOOLBAR1: { nsAutoString url; url.AssignWithConversion(SAMPLES_BASE_URL); - url.Append(NS_LITERAL_STRING("/toolbarTest1.xul")); + url.AppendLiteral("/toolbarTest1.xul"); nsCOMPtr webNav(do_QueryInterface(mWebBrowser)); webNav->LoadURI(url.get(), nsIWebNavigation::LOAD_FLAGS_NONE, nsnull, nsnull, nsnull); break; @@ -864,7 +864,7 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID) case VIEWER_XPTOOLKITTREE1: { nsAutoString url; url.AssignWithConversion(SAMPLES_BASE_URL); - url.Append(NS_LITERAL_STRING("/treeTest1.xul")); + url.AppendLiteral("/treeTest1.xul"); nsCOMPtr webNav(do_QueryInterface(mWebBrowser)); webNav->LoadURI(url.get(), nsIWebNavigation::LOAD_FLAGS_NONE, nsnull, nsnull, nsnull); break; @@ -1259,7 +1259,7 @@ nsBrowserWindow::nsBrowserWindow() gTitleSuffix = GetTitleSuffix(); #endif if ( (gTitleSuffix = new nsString) != 0 ) - gTitleSuffix->Assign(NS_LITERAL_STRING(" - Raptor")); + gTitleSuffix->AssignLiteral(" - Raptor"); } AddBrowser(this); } @@ -2031,10 +2031,10 @@ nsBrowserWindow::OnProgress(nsIRequest* request, nsISupports *ctxt, aURL->GetSpec(str); AppendUTF8toUTF16(str, url); } - url.Append(NS_LITERAL_STRING(": progress ")); + url.AppendLiteral(": progress "); url.AppendInt(aProgress, 10); if (0 != aProgressMax) { - url.Append(NS_LITERAL_STRING(" (out of ")); + url.AppendLiteral(" (out of "); url.AppendInt(aProgressMax, 10); url.Append(NS_LITERAL_STRING(")")); } diff --git a/webshell/tests/viewer/nsEditorMode.cpp b/webshell/tests/viewer/nsEditorMode.cpp index 27240f66f1bc..402482e573bf 100644 --- a/webshell/tests/viewer/nsEditorMode.cpp +++ b/webshell/tests/viewer/nsEditorMode.cpp @@ -106,13 +106,13 @@ static nsresult PrintEditorOutput(nsIEditor* editor, PRInt32 aCommandID) switch (aCommandID) { case VIEWER_DISPLAYTEXT: - formatString.Assign(NS_LITERAL_STRING("text/plain")); + formatString.AssignLiteral("text/plain"); flags = nsIDocumentEncoder::OutputFormatted; editor->OutputToString(formatString, flags, outString); break; case VIEWER_DISPLAYHTML: - formatString.Assign(NS_LITERAL_STRING("text/html")); + formatString.AssignLiteral("text/html"); editor->OutputToString(formatString, flags, outString); break; } diff --git a/webshell/tests/viewer/nsViewerApp.cpp b/webshell/tests/viewer/nsViewerApp.cpp index 56adaa6b36b5..f7c0fb2a2fce 100644 --- a/webshell/tests/viewer/nsViewerApp.cpp +++ b/webshell/tests/viewer/nsViewerApp.cpp @@ -1389,7 +1389,7 @@ PRBool CreateSiteDialog(nsIWidget * aParent) //mSiteDialog->SetClientData(this); nsAutoString titleStr(NS_LITERAL_STRING("Top ")); titleStr.AppendInt(gTop100LastPointer); - titleStr.Append(NS_LITERAL_STRING(" Sites")); + titleStr.AppendLiteral(" Sites"); mSiteDialog->SetTitle(titleStr); nscoord w = 65; diff --git a/webshell/tests/viewer/nsWebBrowserChrome.cpp b/webshell/tests/viewer/nsWebBrowserChrome.cpp index d0c0d976945e..93075b447a29 100644 --- a/webshell/tests/viewer/nsWebBrowserChrome.cpp +++ b/webshell/tests/viewer/nsWebBrowserChrome.cpp @@ -377,7 +377,7 @@ NS_IMETHODIMP nsWebBrowserChrome::SetTitle(const PRUnichar* aTitle) nsAutoString newTitle(aTitle); - newTitle.Append(NS_LITERAL_STRING(" - Raptor")); + newTitle.AppendLiteral(" - Raptor"); mBrowserWindow->SetTitle(newTitle.get()); return NS_OK; @@ -401,13 +401,13 @@ nsWebBrowserChrome::OnProgressChange(nsIWebProgress* aProgress, nsAutoString buf; PRUint32 size; - buf.Append(NS_LITERAL_STRING("Loaded ")); + buf.AppendLiteral("Loaded "); buf.AppendInt(mCurrent); - buf.Append(NS_LITERAL_STRING(" of ")); + buf.AppendLiteral(" of "); buf.AppendInt(mTotal); - buf.Append(NS_LITERAL_STRING(" items. (")); + buf.AppendLiteral(" items. ("); buf.AppendInt(mProgress); - buf.Append(NS_LITERAL_STRING(" bytes of ")); + buf.AppendLiteral(" bytes of "); buf.AppendInt(mMaxProgress); buf.Append(NS_LITERAL_STRING(" bytes)")); @@ -440,13 +440,13 @@ nsWebBrowserChrome::OnStateChange(nsIWebProgress* aProgress, nsAutoString buf; PRUint32 size; - buf.Append(NS_LITERAL_STRING("Loaded ")); + buf.AppendLiteral("Loaded "); buf.AppendInt(mCurrent); - buf.Append(NS_LITERAL_STRING(" of ")); + buf.AppendLiteral(" of "); buf.AppendInt(mTotal); - buf.Append(NS_LITERAL_STRING(" items. (")); + buf.AppendLiteral(" items. ("); buf.AppendInt(mProgress); - buf.Append(NS_LITERAL_STRING(" bytes of ")); + buf.AppendLiteral(" bytes of "); buf.AppendInt(mMaxProgress); buf.Append(NS_LITERAL_STRING(" bytes)")); @@ -576,7 +576,7 @@ mCurrent=mTotal=mProgress=mMaxProgress=0; uri->GetSpec(uriString); NS_ConvertUTF8toUCS2 url(uriString); - url.Append(NS_LITERAL_STRING(": start")); + url.AppendLiteral(": start"); PRUint32 size; mBrowserWindow->mStatus->SetText(url,size); } @@ -628,7 +628,7 @@ void nsWebBrowserChrome::OnLoadFinished(nsIRequest* aRequest, { // PRUint32 size; - msg.Append(NS_LITERAL_STRING(" done.")); + msg.AppendLiteral(" done."); /// mBrowserWindow->mStatus->SetText(msg, size); } diff --git a/webshell/tests/viewer/nsWebCrawler.cpp b/webshell/tests/viewer/nsWebCrawler.cpp index 3f481448df8b..7a3f3c694eb6 100644 --- a/webshell/tests/viewer/nsWebCrawler.cpp +++ b/webshell/tests/viewer/nsWebCrawler.cpp @@ -934,7 +934,7 @@ OpenRegressionFile(const nsString& aBaseName, const nsString& aOutputName) { nsAutoString a; a.Append(aBaseName); - a.Append(NS_LITERAL_STRING("/")); + a.AppendLiteral("/"); a.Append(aOutputName); char* fn = ToNewCString(a); FILE* fp = fopen(fn, "r"); diff --git a/webshell/tests/viewer/os2/nsTextWidget.cpp b/webshell/tests/viewer/os2/nsTextWidget.cpp index 3b2d7b76cca1..3665ccdd5047 100644 --- a/webshell/tests/viewer/os2/nsTextWidget.cpp +++ b/webshell/tests/viewer/os2/nsTextWidget.cpp @@ -313,7 +313,7 @@ NS_METHOD nsTextWidget::Paint(nsIRenderingContext& aRenderingContext, nsString astricks; PRUint32 i; for (i=0;iGetCharset(kPlatformCharsetSel_Menu, platformCharset); if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); // get the decoder nsCOMPtr ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv); @@ -973,7 +973,7 @@ void nsClipboard::SelectionGetCB(GtkWidget *widget, if (NS_SUCCEEDED(rv)) rv = platformCharsetService->GetCharset(kPlatformCharsetSel_Menu, platformCharset); if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); // get the encoder nsCOMPtr ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv); @@ -1512,7 +1512,7 @@ void GetHTMLCharset(char* data, PRInt32 dataLength, nsACString& str) // if detect "FFFE" or "FEFF", assume utf-16 PRUnichar* beginChar = (PRUnichar*)data; if ((beginChar[0] == 0xFFFE) || (beginChar[0] == 0xFEFF)) { - str.Assign(NS_LITERAL_CSTRING("UTF-16")); + str.AssignLiteral("UTF-16"); return; } // no "FFFE" and "FEFF", assume ASCII first to find "charset" info @@ -1558,6 +1558,6 @@ void GetHTMLCharset(char* data, PRInt32 dataLength, nsACString& str) // TODO: it may also be "text/html" without "charset". // can't distinguish between them. Sochoose OLD-MOZILLA here to // make compitable with old-version mozilla - str.Assign(NS_LITERAL_CSTRING("OLD-MOZILLA")); + str.AssignLiteral("OLD-MOZILLA"); } diff --git a/widget/src/gtk/nsGtkIMEHelper.cpp b/widget/src/gtk/nsGtkIMEHelper.cpp index e7087ab3cb8b..64cf535e79b1 100644 --- a/widget/src/gtk/nsGtkIMEHelper.cpp +++ b/widget/src/gtk/nsGtkIMEHelper.cpp @@ -134,7 +134,7 @@ void nsGtkIMEHelper::SetupUnicodeDecoder() charset.Truncate(); result = platform->GetCharset(kPlatformCharsetSel_Menu, charset); if (NS_FAILED(result) || charset.IsEmpty()) { - charset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); // default + charset.AssignLiteral("ISO-8859-1"); // default } nsICharsetConverterManager* manager = nsnull; nsresult res = nsServiceManager:: diff --git a/widget/src/gtk/nsWindow.cpp b/widget/src/gtk/nsWindow.cpp index a56b1d8e61f6..6a17af9d7d0f 100644 --- a/widget/src/gtk/nsWindow.cpp +++ b/widget/src/gtk/nsWindow.cpp @@ -2276,7 +2276,7 @@ NS_IMETHODIMP nsWindow::SetTitle(const nsAString& aTitle) // This is broken, it's just a random guess if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); // get the encoder nsCOMPtr ccm = diff --git a/widget/src/gtk2/nsClipboard.cpp b/widget/src/gtk2/nsClipboard.cpp index f3fde5ad0fdc..d0031429fc76 100644 --- a/widget/src/gtk2/nsClipboard.cpp +++ b/widget/src/gtk2/nsClipboard.cpp @@ -689,7 +689,7 @@ void GetHTMLCharset(guchar * data, PRInt32 dataLength, nsCString& str) // if detect "FFFE" or "FEFF", assume UTF-16 PRUnichar* beginChar = (PRUnichar*)data; if ((beginChar[0] == 0xFFFE) || (beginChar[0] == 0xFEFF)) { - str.Assign(NS_LITERAL_CSTRING("UTF-16")); + str.AssignLiteral("UTF-16"); return; } // no "FFFE" and "FEFF", assume ASCII first to find "charset" info @@ -726,7 +726,7 @@ void GetHTMLCharset(guchar * data, PRInt32 dataLength, nsCString& str) #endif return; } - str.Assign(NS_LITERAL_CSTRING("UNKNOWN")); + str.AssignLiteral("UNKNOWN"); } static void diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp index ce2db97a2a82..9745368be3b7 100644 --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -943,7 +943,7 @@ nsWindow::SetIcon(const nsAString& aIconSpec) // Now take input path... nsAutoString iconSpec(aIconSpec); // ...append ".xpm" to it - iconSpec.Append(NS_LITERAL_STRING(".xpm")); + iconSpec.AppendLiteral(".xpm"); // ...and figure out where /chrome/... is within that // (and skip the "resource:///chrome" part). @@ -2621,7 +2621,7 @@ nsWindow::SetDefaultIcon(void) nsAutoString defaultPath; chromeDir->GetPath(defaultPath); - defaultPath.Append(NS_LITERAL_STRING("/icons/default/default.xpm")); + defaultPath.AppendLiteral("/icons/default/default.xpm"); nsCOMPtr defaultPathConverter; rv = NS_NewLocalFile(defaultPath, PR_TRUE, diff --git a/widget/src/mac/nsMacControl.cpp b/widget/src/mac/nsMacControl.cpp index 1423e9636cdf..ea13bc6234a1 100644 --- a/widget/src/mac/nsMacControl.cpp +++ b/widget/src/mac/nsMacControl.cpp @@ -616,7 +616,7 @@ void nsMacControl::GetFileSystemCharset(nsCString & fileSystemCharset) NS_ASSERTION(NS_SUCCEEDED(rv), "error getting platform charset"); if (NS_FAILED(rv)) - aCharset.Assign(NS_LITERAL_CSTRING("x-mac-roman")); + aCharset.AssignLiteral("x-mac-roman"); } fileSystemCharset = aCharset; } diff --git a/widget/src/mac/nsMenuItem.cpp b/widget/src/mac/nsMenuItem.cpp index 9044017d5591..9a61b0e784f4 100644 --- a/widget/src/mac/nsMenuItem.cpp +++ b/widget/src/mac/nsMenuItem.cpp @@ -71,7 +71,7 @@ nsMenuItem::nsMenuItem() { mMenuParent = nsnull; mIsSeparator = PR_FALSE; - mKeyEquivalent.Assign(NS_LITERAL_STRING(" ")); + mKeyEquivalent.AssignLiteral(" "); mEnabled = PR_TRUE; mIsChecked = PR_FALSE; mMenuType = eRegular; diff --git a/widget/src/mac/nsMenuItemX.cpp b/widget/src/mac/nsMenuItemX.cpp index 4fb565b95954..93909a2a8891 100644 --- a/widget/src/mac/nsMenuItemX.cpp +++ b/widget/src/mac/nsMenuItemX.cpp @@ -70,7 +70,7 @@ nsMenuItemX::nsMenuItemX() { mMenuParent = nsnull; mIsSeparator = PR_FALSE; - mKeyEquivalent.Assign(NS_LITERAL_STRING(" ")); + mKeyEquivalent.AssignLiteral(" "); mEnabled = PR_TRUE; mIsChecked = PR_FALSE; mMenuType = eRegular; diff --git a/widget/src/os2/nsDragService.cpp b/widget/src/os2/nsDragService.cpp index 5a507f7d3406..c00aef868a35 100644 --- a/widget/src/os2/nsDragService.cpp +++ b/widget/src/os2/nsDragService.cpp @@ -600,7 +600,7 @@ nsresult nsDragService::GetUrlAndTitle(nsISupports *aGenericData, urlObj->GetHost(strTitle); urlObj->GetFileName(strFile); if (!strFile.IsEmpty()) { - strTitle.Append(NS_LITERAL_CSTRING("/")); + strTitle.AppendLiteral("/"); strTitle.Append(strFile); } else { diff --git a/widget/src/os2/nsFilePicker.cpp b/widget/src/os2/nsFilePicker.cpp index d7fc8097eb96..a3a447bf4a74 100644 --- a/widget/src/os2/nsFilePicker.cpp +++ b/widget/src/os2/nsFilePicker.cpp @@ -549,7 +549,7 @@ void nsFilePicker::GetFileSystemCharset(nsCString & fileSystemCharset) NS_ASSERTION(NS_SUCCEEDED(rv), "error getting platform charset"); if (NS_FAILED(rv)) - aCharset.Assign(NS_LITERAL_CSTRING("IBM850")); + aCharset.AssignLiteral("IBM850"); } fileSystemCharset = aCharset; } diff --git a/widget/src/windows/nsFilePicker.cpp b/widget/src/windows/nsFilePicker.cpp index 30d084c868ef..eaaf14b6737a 100644 --- a/widget/src/windows/nsFilePicker.cpp +++ b/widget/src/windows/nsFilePicker.cpp @@ -210,9 +210,9 @@ NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal) // Should we test for ".cgi", ".asp", ".jsp" and other // "generated" html pages? - if ( ext.EqualsIgnoreCase(".htm") || - ext.EqualsIgnoreCase(".html") || - ext.EqualsIgnoreCase(".shtml") ) { + if ( ext.LowerCaseEqualsLiteral(".htm") || + ext.LowerCaseEqualsLiteral(".html") || + ext.LowerCaseEqualsLiteral(".shtml") ) { // This is supposed to append ".htm" if user doesn't supply an extension //XXX Actually, behavior is sort of weird: // often appends ".html" even if you have an extension @@ -531,13 +531,13 @@ nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) mFilterList.Append(PRUnichar('\0')); if (aFilter.EqualsLiteral("..apps")) - mFilterList.Append(NS_LITERAL_STRING("*.exe;*.com")); + mFilterList.AppendLiteral("*.exe;*.com"); else { nsAutoString filter(aFilter); filter.StripWhitespace(); if (filter.EqualsLiteral("*")) - filter.Append(NS_LITERAL_STRING(".*")); + filter.AppendLiteral(".*"); mFilterList.Append(filter); } diff --git a/widget/src/xlib/nsButton.cpp b/widget/src/xlib/nsButton.cpp index 78f578cceccb..000ad2908600 100644 --- a/widget/src/xlib/nsButton.cpp +++ b/widget/src/xlib/nsButton.cpp @@ -39,7 +39,7 @@ nsButton::nsButton() : nsWidget() { - mName.Assign(NS_LITERAL_STRING("nsButton")); + mName.AssignLiteral("nsButton"); } nsButton::~nsButton() diff --git a/widget/src/xlib/nsTextWidget.cpp b/widget/src/xlib/nsTextWidget.cpp index 7f82e2e211a2..f5600c36b416 100644 --- a/widget/src/xlib/nsTextWidget.cpp +++ b/widget/src/xlib/nsTextWidget.cpp @@ -39,7 +39,7 @@ nsTextWidget::nsTextWidget() : nsTextHelper() { - mName.Assign(NS_LITERAL_STRING("nsTextWidget")); + mName.AssignLiteral("nsTextWidget"); } nsTextWidget::~nsTextWidget() diff --git a/widget/src/xlib/nsWidget.cpp b/widget/src/xlib/nsWidget.cpp index 2d6e9ca8cb53..1a6bcac2c437 100644 --- a/widget/src/xlib/nsWidget.cpp +++ b/widget/src/xlib/nsWidget.cpp @@ -132,7 +132,7 @@ nsWidget::nsWidget() // : nsBaseWidget() mBackground = NS_RGB(192, 192, 192); mBorderPixel = xxlib_rgb_xpixel_from_rgb(mXlibRgbHandle, mBorderRGB); mParentWidget = nsnull; - mName.Assign(NS_LITERAL_STRING("unnamed")); + mName.AssignLiteral("unnamed"); mIsShown = PR_FALSE; mIsToplevel = PR_FALSE; mVisibility = VisibilityFullyObscured; // this is an X constant. diff --git a/widget/src/xlib/nsWindow.cpp b/widget/src/xlib/nsWindow.cpp index 67895dc1c199..f8576633d39a 100644 --- a/widget/src/xlib/nsWindow.cpp +++ b/widget/src/xlib/nsWindow.cpp @@ -204,7 +204,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsWindow, nsWidget) nsWindow::nsWindow() : nsWidget() { - mName.Assign(NS_LITERAL_STRING("nsWindow")); + mName.AssignLiteral("nsWindow"); mBackground = NS_RGB(255, 255, 255); mBackgroundPixel = xxlib_rgb_xpixel_from_rgb(mXlibRgbHandle, mBackground); mBorderRGB = NS_RGB(255,255,255); @@ -741,7 +741,7 @@ NS_IMETHODIMP nsWindow::SetTitle(const nsAString& aTitle) rv = platformCharsetService->GetCharset(kPlatformCharsetSel_Menu, platformCharset); if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); /* get the encoder */ nsCOMPtr ccm = @@ -797,7 +797,7 @@ NS_IMETHODIMP nsWindow::SetTitle(const nsAString& aTitle) ChildWindow::ChildWindow(): nsWindow() { - mName.Assign(NS_LITERAL_STRING("nsChildWindow")); + mName.AssignLiteral("nsChildWindow"); } diff --git a/widget/src/xpwidgets/nsHTMLFormatConverter.cpp b/widget/src/xpwidgets/nsHTMLFormatConverter.cpp index 95ea9efbebb3..c1598f2afd06 100644 --- a/widget/src/xpwidgets/nsHTMLFormatConverter.cpp +++ b/widget/src/xpwidgets/nsHTMLFormatConverter.cpp @@ -329,9 +329,9 @@ NS_IMETHODIMP nsHTMLFormatConverter::ConvertFromHTMLToAOLMail(const nsAutoString & aFromStr, nsAutoString & aToStr) { - aToStr.Assign(NS_LITERAL_STRING("")); + aToStr.AssignLiteral(""); aToStr.Append(aFromStr); - aToStr.Append(NS_LITERAL_STRING("")); + aToStr.AppendLiteral(""); return NS_OK; } diff --git a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp index bfed03909d67..dd8e6dac4e25 100644 --- a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp +++ b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp @@ -173,7 +173,7 @@ nsPrimitiveHelpers :: ConvertUnicodeToPlatformPlainText ( PRUnichar* inUnicode, if (NS_SUCCEEDED(rv)) rv = platformCharsetService->GetCharset(kPlatformCharsetSel_PlainTextInClipboard, platformCharset); if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); // use transliterate to convert things like smart quotes to normal quotes for plain text @@ -221,7 +221,7 @@ nsPrimitiveHelpers :: ConvertPlatformPlainTextToUnicode ( const char* inText, PR if (NS_SUCCEEDED(rv)) rv = platformCharsetService->GetCharset(kPlatformCharsetSel_PlainTextInClipboard, platformCharset); if (NS_FAILED(rv)) - platformCharset.Assign(NS_LITERAL_CSTRING("ISO-8859-1")); + platformCharset.AssignLiteral("ISO-8859-1"); // get the decoder nsCOMPtr ccm = diff --git a/xpcom/components/nsNativeComponentLoader.cpp b/xpcom/components/nsNativeComponentLoader.cpp index 113469d83fbc..c31ac55bade9 100644 --- a/xpcom/components/nsNativeComponentLoader.cpp +++ b/xpcom/components/nsNativeComponentLoader.cpp @@ -1086,7 +1086,7 @@ nsNativeComponentLoader::AddDependentLibrary(nsIFile* aFile, const char* libName manager->GetOptionalData(aFile, nsnull, getter_Copies(data)); if (!data.IsEmpty()) - data.Append(NS_LITERAL_CSTRING(" ")); + data.AppendLiteral(" "); data.Append(nsDependentCString(libName)); diff --git a/xpcom/components/xcDll.cpp b/xpcom/components/xcDll.cpp index 8362694b89ab..489cb8e1dc2c 100644 --- a/xpcom/components/xcDll.cpp +++ b/xpcom/components/xcDll.cpp @@ -103,7 +103,7 @@ nsDll::GetDisplayPath(nsACString& aLeafName) m_dllSpec->GetNativeLeafName(aLeafName); if (aLeafName.IsEmpty()) - aLeafName.Assign(NS_LITERAL_CSTRING("unknown!")); + aLeafName.AssignLiteral("unknown!"); } PRBool diff --git a/xpcom/ds/nsDoubleHashtable.h b/xpcom/ds/nsDoubleHashtable.h index 95eeb555b8b4..27bf4ce53cd0 100644 --- a/xpcom/ds/nsDoubleHashtable.h +++ b/xpcom/ds/nsDoubleHashtable.h @@ -106,8 +106,8 @@ * // Put an entry * DictionaryEntry* a = d.AddEntry(NS_LITERAL_STRING("doomed")); * if (!a) return 1; - * a->mDefinition = NS_LITERAL_STRING("The state you get in when a Mozilla release is pending"); - * a->mPronunciation = NS_LITERAL_STRING("doom-d"); + * a->mDefinition.AssignLiteral("The state you get in when a Mozilla release is pending"); + * a->mPronunciation.AssignLiteral("doom-d"); * * // Get the entry * DictionaryEntry* b = d.GetEntry(NS_LITERAL_STRING("doomed")); diff --git a/xpcom/ds/nsTextFormatter.cpp b/xpcom/ds/nsTextFormatter.cpp index 8d99ca75df22..a5f2dde0ad5a 100644 --- a/xpcom/ds/nsTextFormatter.cpp +++ b/xpcom/ds/nsTextFormatter.cpp @@ -983,10 +983,10 @@ static int dosprintf(SprintfState *ss, const PRUnichar *fmt, va_list ap) const PRUnichar *fmt0; nsAutoString hex; - hex.Assign(NS_LITERAL_STRING("0123456789abcdef")); + hex.AssignLiteral("0123456789abcdef"); nsAutoString HEX; - HEX.Assign(NS_LITERAL_STRING("0123456789ABCDEF")); + HEX.AssignLiteral("0123456789ABCDEF"); const PRUnichar *hexp; int rv, i; diff --git a/xpcom/io/nsLocalFileCommon.cpp b/xpcom/io/nsLocalFileCommon.cpp index d0cecdc93355..63f21f32f5cc 100644 --- a/xpcom/io/nsLocalFileCommon.cpp +++ b/xpcom/io/nsLocalFileCommon.cpp @@ -211,7 +211,7 @@ nsLocalFile::GetRelativeDescriptor(nsILocalFile *fromFile, nsACString& _retval) PRInt32 branchIndex = nodeIndex; for (nodeIndex = branchIndex; nodeIndex < fromNodeCnt; nodeIndex++) - _retval.Append(NS_LITERAL_CSTRING("../")); + _retval.AppendLiteral("../"); for (nodeIndex = branchIndex; nodeIndex < thisNodeCnt; nodeIndex++) { NS_ConvertUCS2toUTF8 nodeStr(thisNodes[nodeIndex]); #ifdef XP_MAC diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 956099a865bf..131ae5828e53 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -1782,7 +1782,7 @@ nsLocalFile::GetParent(nsIFile * *aParent) if (offset > 0) parentPath.Truncate(offset); else - parentPath = NS_LITERAL_CSTRING("\\\\."); + parentPath.AssignLiteral("\\\\."); nsCOMPtr localFile; nsresult rv = NS_NewNativeLocalFile(parentPath, mFollowSymlinks, getter_AddRefs(localFile)); diff --git a/xpcom/sample/nsSample.cpp b/xpcom/sample/nsSample.cpp index d0732c7cdeb3..ac3d8449b4e4 100644 --- a/xpcom/sample/nsSample.cpp +++ b/xpcom/sample/nsSample.cpp @@ -171,7 +171,7 @@ nsSampleImpl::WriteValue(const char* aPrefix) nsEmbedCString foopy2; GetStringValue(foopy2); - //foopy2.Append(NS_LITERAL_CSTRING("foopy")); + //foopy2.AppendLiteral("foopy"); const char* f2 = foopy2.get(); PRUint32 l2 = foopy2.Length(); diff --git a/xpcom/tests/TestStrings.cpp b/xpcom/tests/TestStrings.cpp index f01dbcde267e..71e8aa067ec0 100644 --- a/xpcom/tests/TestStrings.cpp +++ b/xpcom/tests/TestStrings.cpp @@ -270,7 +270,7 @@ PRBool test_replace_substr_2() { const char *oldName = nsnull; const char *newName = "user"; - nsString acctName = NS_LITERAL_STRING("forums.foo.com"); + nsString acctName; acctName.AssignLiteral("forums.foo.com"); nsAutoString newAcctName, oldVal, newVal; oldVal.AssignWithConversion(oldName); newVal.AssignWithConversion(newName); @@ -301,7 +301,7 @@ PRBool test_strip_ws() PRBool test_equals_ic() { nsCString s; - PRBool r = s.EqualsIgnoreCase("view-source"); + PRBool r = s.LowerCaseEqualsLiteral("view-source"); if (r) printf("[r=%d]\n", r); return !r; @@ -424,9 +424,9 @@ PRBool test_xpidl_string() PRBool test_empty_assign() { nsCString a; - a = NS_LITERAL_CSTRING(""); + a.AssignLiteral(""); - a += NS_LITERAL_CSTRING(""); + a.AppendLiteral(""); nsCString b; b.SetCapacity(0); diff --git a/xpfe/appshell/src/nsChromeTreeOwner.cpp b/xpfe/appshell/src/nsChromeTreeOwner.cpp index 5fb5c9b4496d..bf0e5cb3bbb8 100644 --- a/xpfe/appshell/src/nsChromeTreeOwner.cpp +++ b/xpfe/appshell/src/nsChromeTreeOwner.cpp @@ -178,11 +178,11 @@ NS_IMETHODIMP nsChromeTreeOwner::FindItemWithName(const PRUnichar* aName, /* Special Cases */ if(name.IsEmpty()) return NS_OK; - if(name.EqualsIgnoreCase("_blank")) + if(name.LowerCaseEqualsLiteral("_blank")) return NS_OK; // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details - if(name.EqualsIgnoreCase("_content") || name.EqualsLiteral("_main")) + if(name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main")) { fIs_Content = PR_TRUE; mXULWindow->GetPrimaryContentShell(aFoundItem); diff --git a/xpfe/appshell/src/nsContentTreeOwner.cpp b/xpfe/appshell/src/nsContentTreeOwner.cpp index 04e9c6fab27e..ec0e6a2e9355 100644 --- a/xpfe/appshell/src/nsContentTreeOwner.cpp +++ b/xpfe/appshell/src/nsContentTreeOwner.cpp @@ -181,11 +181,11 @@ NS_IMETHODIMP nsContentTreeOwner::FindItemWithName(const PRUnichar* aName, /* Special Cases */ if(name.IsEmpty()) return NS_OK; - if(name.EqualsIgnoreCase("_blank")) + if(name.LowerCaseEqualsLiteral("_blank")) return NS_OK; // _main is an IE target which should be case-insensitive but isn't // see bug 217886 for details - if(name.EqualsIgnoreCase("_content") || name.EqualsLiteral("_main")) + if(name.LowerCaseEqualsLiteral("_content") || name.EqualsLiteral("_main")) { fIs_Content = PR_TRUE; mXULWindow->GetPrimaryContentShell(aFoundItem); @@ -278,7 +278,7 @@ nsContentTreeOwner::SetPersistence(PRBool aPersistPosition, persistString.Cut(index, 7); saveString = PR_TRUE; } else if (aPersistPosition && index < 0) { - persistString.Append(NS_LITERAL_STRING(" screenX")); + persistString.AppendLiteral(" screenX"); saveString = PR_TRUE; } // Set Y @@ -287,7 +287,7 @@ nsContentTreeOwner::SetPersistence(PRBool aPersistPosition, persistString.Cut(index, 7); saveString = PR_TRUE; } else if (aPersistPosition && index < 0) { - persistString.Append(NS_LITERAL_STRING(" screenY")); + persistString.AppendLiteral(" screenY"); saveString = PR_TRUE; } // Set CX @@ -296,7 +296,7 @@ nsContentTreeOwner::SetPersistence(PRBool aPersistPosition, persistString.Cut(index, 5); saveString = PR_TRUE; } else if (aPersistSize && index < 0) { - persistString.Append(NS_LITERAL_STRING(" width")); + persistString.AppendLiteral(" width"); saveString = PR_TRUE; } // Set CY @@ -305,7 +305,7 @@ nsContentTreeOwner::SetPersistence(PRBool aPersistPosition, persistString.Cut(index, 6); saveString = PR_TRUE; } else if (aPersistSize && index < 0) { - persistString.Append(NS_LITERAL_STRING(" height")); + persistString.AppendLiteral(" height"); saveString = PR_TRUE; } // Set SizeMode @@ -314,7 +314,7 @@ nsContentTreeOwner::SetPersistence(PRBool aPersistPosition, persistString.Cut(index, 8); saveString = PR_TRUE; } else if (aPersistSizeMode && (index < 0)) { - persistString.Append(NS_LITERAL_STRING(" sizemode")); + persistString.AppendLiteral(" sizemode"); saveString = PR_TRUE; } @@ -680,22 +680,22 @@ NS_IMETHODIMP nsContentTreeOwner::ApplyChromeFlags() nsAutoString newvalue; if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_MENUBAR)) - newvalue.Append(NS_LITERAL_STRING("menubar ")); + newvalue.AppendLiteral("menubar "); if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_TOOLBAR)) - newvalue.Append(NS_LITERAL_STRING("toolbar ")); + newvalue.AppendLiteral("toolbar "); if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_LOCATIONBAR)) - newvalue.Append(NS_LITERAL_STRING("location ")); + newvalue.AppendLiteral("location "); if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_PERSONAL_TOOLBAR)) - newvalue.Append(NS_LITERAL_STRING("directories ")); + newvalue.AppendLiteral("directories "); if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_STATUSBAR)) - newvalue.Append(NS_LITERAL_STRING("status ")); + newvalue.AppendLiteral("status "); if (! (mChromeFlags & nsIWebBrowserChrome::CHROME_EXTRA)) - newvalue.Append(NS_LITERAL_STRING("extrachrome")); + newvalue.AppendLiteral("extrachrome"); // Get the old value, to avoid useless style reflows if we're just diff --git a/xpfe/appshell/src/nsXULWindow.cpp b/xpfe/appshell/src/nsXULWindow.cpp index 3faad0bf2a38..519ae7d323dd 100644 --- a/xpfe/appshell/src/nsXULWindow.cpp +++ b/xpfe/appshell/src/nsXULWindow.cpp @@ -997,7 +997,7 @@ nsresult nsXULWindow::LoadChromeHidingFromXUL() nsAutoString attr; nsresult rv = windowElement->GetAttribute(NS_LITERAL_STRING("hidechrome"), attr); - if (NS_SUCCEEDED(rv) && attr.EqualsIgnoreCase("true")) { + if (NS_SUCCEEDED(rv) && attr.LowerCaseEqualsLiteral("true")) { mWindow->HideWindowChrome(PR_TRUE); } @@ -1366,7 +1366,7 @@ NS_IMETHODIMP nsXULWindow::LoadWindowClassFromXUL() mContentTreeOwner-> GetPersistence(&persistPosition, &persistSize, &persistSizeMode) ) && !persistPosition && !persistSize && !persistSizeMode) - windowClass.Append(NS_LITERAL_STRING("-jsSpamPopupCrap")); + windowClass.AppendLiteral("-jsSpamPopupCrap"); char *windowClass_cstr = ToNewCString(windowClass); mWindow->SetWindowClass(windowClass_cstr); @@ -1420,19 +1420,19 @@ NS_IMETHODIMP nsXULWindow::LoadIconFromXUL() // Whew. Now get "list-style-image" property value. nsAutoString windowIcon; - windowIcon.Assign(NS_LITERAL_STRING("-moz-window-icon")); + windowIcon.AssignLiteral("-moz-window-icon"); nsAutoString icon; cssDecl->GetPropertyValue(windowIcon, icon); #endif nsAutoString icon; - icon.Assign(NS_LITERAL_STRING("resource:///chrome/icons/default/")); + icon.AssignLiteral("resource:///chrome/icons/default/"); nsAutoString id; windowElement->GetAttribute(NS_LITERAL_STRING("id"), id); if (id.IsEmpty()) { - id.Assign(NS_LITERAL_STRING("default")); + id.AssignLiteral("default"); } icon.Append(id); diff --git a/xpfe/bootstrap/nsAppRunner.cpp b/xpfe/bootstrap/nsAppRunner.cpp index 004daf213445..3e00a003c01d 100644 --- a/xpfe/bootstrap/nsAppRunner.cpp +++ b/xpfe/bootstrap/nsAppRunner.cpp @@ -1275,7 +1275,7 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp ) if (obsService) { - nsAutoString userMessage; userMessage.AssignWithConversion("Creating first window..."); + nsAutoString userMessage; userMessage.AssignLiteral("Creating first window..."); obsService->NotifyObservers(nsnull, "startup_user_notifcations", userMessage.get()); } diff --git a/xpfe/bootstrap/nsNativeAppSupportWin.cpp b/xpfe/bootstrap/nsNativeAppSupportWin.cpp index b639dcda8055..671c978e55fb 100644 --- a/xpfe/bootstrap/nsNativeAppSupportWin.cpp +++ b/xpfe/bootstrap/nsNativeAppSupportWin.cpp @@ -2408,22 +2408,22 @@ nsNativeAppSupportWin::SetupSysTrayIcon() { } if ( exitText.IsEmpty() ) - exitText = NS_LITERAL_STRING( "E&xit Mozilla" ); + exitText.AssignLiteral( "E&xit Mozilla" ); if ( disableText.IsEmpty() ) - disableText = NS_LITERAL_STRING( "&Disable Quick Launch" ); + disableText.AssignLiteral( "&Disable Quick Launch" ); if ( navigatorText.IsEmpty() ) - navigatorText = NS_LITERAL_STRING( "&Navigator" ); + navigatorText.AssignLiteral( "&Navigator" ); if ( editorText.IsEmpty() ) - editorText = NS_LITERAL_STRING( "&Composer" ); + editorText.AssignLiteral( "&Composer" ); if ( isMail ) { if ( mailText.IsEmpty() ) - mailText = NS_LITERAL_STRING( "&Mail && Newsgroups" ); + mailText.AssignLiteral( "&Mail && Newsgroups" ); if ( addressbookText.IsEmpty() ) - addressbookText = NS_LITERAL_STRING( "&Address Book" ); + addressbookText.AssignLiteral( "&Address Book" ); } // Create menu and add item. mTrayIconMenu = ::CreatePopupMenu(); diff --git a/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/xpfe/components/bookmarks/src/nsBookmarksService.cpp index 72f8442ea03f..fe788841498f 100644 --- a/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -951,22 +951,22 @@ BookmarkParser::Unescape(nsString &text) while((offset = text.FindChar((PRUnichar('&')), offset)) >= 0) { - if (Substring(text, offset, 4).Equals(NS_LITERAL_STRING("<"), nsCaseInsensitiveStringComparator())) + if (Substring(text, offset, 4).LowerCaseEqualsLiteral("<")) { text.Cut(offset, 4); text.Insert(PRUnichar('<'), offset); } - else if (Substring(text, offset, 4).Equals(NS_LITERAL_STRING(">"), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 4).LowerCaseEqualsLiteral(">")) { text.Cut(offset, 4); text.Insert(PRUnichar('>'), offset); } - else if (Substring(text, offset, 5).Equals(NS_LITERAL_STRING("&"), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 5).LowerCaseEqualsLiteral("&")) { text.Cut(offset, 5); text.Insert(PRUnichar('&'), offset); } - else if (Substring(text, offset, 6).Equals(NS_LITERAL_STRING("""), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 6).LowerCaseEqualsLiteral(""")) { text.Cut(offset, 6); text.Insert(PRUnichar('\"'), offset); @@ -1001,7 +1001,7 @@ BookmarkParser::ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder) aLine.Mid(httpEquiv, start, end - start); // if HTTP-EQUIV isn't "Content-Type", just ignore the META tag - if (!httpEquiv.EqualsIgnoreCase("Content-Type")) + if (!httpEquiv.LowerCaseEqualsLiteral("content-type")) return NS_OK; // get the CONTENT attribute @@ -1718,7 +1718,7 @@ nsBookmarksService::Init() getter_Copies(mPersonalToolbarName)); if (NS_FAILED(rv) || mPersonalToolbarName.IsEmpty()) { // no preference, so fallback to a well-known name - mPersonalToolbarName.Assign(NS_LITERAL_STRING("Personal Toolbar Folder")); + mPersonalToolbarName.AssignLiteral("Personal Toolbar Folder"); } } } @@ -1758,7 +1758,7 @@ nsBookmarksService::Init() rv = mBundle->GetStringFromName(NS_LITERAL_STRING("bookmarks_default_root").get(), getter_Copies(mBookmarksRootName)); if (NS_FAILED(rv) || mBookmarksRootName.IsEmpty()) { - mBookmarksRootName.Assign(NS_LITERAL_STRING("Bookmarks")); + mBookmarksRootName.AssignLiteral("Bookmarks"); } } @@ -2392,7 +2392,7 @@ nsBookmarksService::OnStopRequest(nsIRequest* request, nsISupports *ctxt, { nsAutoString promptStr; getLocaleString("WebPageUpdated", promptStr); - if (!promptStr.IsEmpty()) promptStr.Append(NS_LITERAL_STRING("\n\n")); + if (!promptStr.IsEmpty()) promptStr.AppendLiteral("\n\n"); nsCOMPtr nameNode; if (NS_SUCCEEDED(mInner->GetTarget(busyResource, kNC_Name, @@ -2408,12 +2408,12 @@ nsBookmarksService::OnStopRequest(nsIRequest* request, nsISupports *ctxt, nsAutoString info; getLocaleString("WebPageTitle", info); promptStr += info; - promptStr.Append(NS_LITERAL_STRING(" ")); + promptStr.AppendLiteral(" "); promptStr += nameUni; - promptStr.Append(NS_LITERAL_STRING("\n")); + promptStr.AppendLiteral("\n"); getLocaleString("WebPageURL", info); promptStr += info; - promptStr.Append(NS_LITERAL_STRING(" ")); + promptStr.AppendLiteral(" "); } } } @@ -2423,7 +2423,7 @@ nsBookmarksService::OnStopRequest(nsIRequest* request, nsISupports *ctxt, getLocaleString("WebPageAskDisplay", temp); if (!temp.IsEmpty()) { - promptStr.Append(NS_LITERAL_STRING("\n\n")); + promptStr.AppendLiteral("\n\n"); promptStr += temp; } diff --git a/xpfe/components/download-manager/src/nsDownloadManager.cpp b/xpfe/components/download-manager/src/nsDownloadManager.cpp index 18482cbc31b3..9fc859aae76d 100644 --- a/xpfe/components/download-manager/src/nsDownloadManager.cpp +++ b/xpfe/components/download-manager/src/nsDownloadManager.cpp @@ -328,9 +328,9 @@ nsDownloadManager::AssertProgressInfoFor(const nsACString& aTargetPath) // update progress mode nsAutoString progressMode; if (state == DOWNLOADING) - progressMode.Assign(NS_LITERAL_STRING("normal")); + progressMode.AssignLiteral("normal"); else - progressMode.Assign(NS_LITERAL_STRING("none")); + progressMode.AssignLiteral("none"); gRDFService->GetLiteral(progressMode.get(), getter_AddRefs(literal)); @@ -354,15 +354,15 @@ nsDownloadManager::AssertProgressInfoFor(const nsACString& aTargetPath) nsAutoString strKey; if (state == NOTSTARTED) - strKey.Assign(NS_LITERAL_STRING("notStarted")); + strKey.AssignLiteral("notStarted"); else if (state == DOWNLOADING) - strKey.Assign(NS_LITERAL_STRING("downloading")); + strKey.AssignLiteral("downloading"); else if (state == FINISHED) - strKey.Assign(NS_LITERAL_STRING("finished")); + strKey.AssignLiteral("finished"); else if (state == FAILED) - strKey.Assign(NS_LITERAL_STRING("failed")); + strKey.AssignLiteral("failed"); else if (state == CANCELED) - strKey.Assign(NS_LITERAL_STRING("canceled")); + strKey.AssignLiteral("canceled"); nsXPIDLString value; rv = mBundle->GetStringFromName(strKey.get(), getter_Copies(value)); diff --git a/xpfe/components/intl/nsCharsetMenu.cpp b/xpfe/components/intl/nsCharsetMenu.cpp index 40b9df8d56b6..37745895a869 100644 --- a/xpfe/components/intl/nsCharsetMenu.cpp +++ b/xpfe/components/intl/nsCharsetMenu.cpp @@ -1542,7 +1542,7 @@ nsresult nsCharsetMenu::AddFromStringToMenu( nsresult nsCharsetMenu::AddSeparatorToContainer(nsIRDFContainer * aContainer) { nsCAutoString str; - str.Assign(NS_LITERAL_CSTRING("----")); + str.AssignLiteral("----"); // hack to generate unique id's for separators static PRInt32 u = 0; diff --git a/xpfe/components/related/src/nsRelatedLinksHandler.cpp b/xpfe/components/related/src/nsRelatedLinksHandler.cpp index af148adc90c7..48279b98bb82 100644 --- a/xpfe/components/related/src/nsRelatedLinksHandler.cpp +++ b/xpfe/components/related/src/nsRelatedLinksHandler.cpp @@ -561,22 +561,22 @@ RelatedLinksStreamListener::Unescape(nsString &text) while((offset = text.FindChar((PRUnichar('&')), offset)) >= 0) { - if (Substring(text, offset, 4).Equals(NS_LITERAL_STRING("<"), nsCaseInsensitiveStringComparator())) + if (Substring(text, offset, 4).LowerCaseEqualsLiteral("<")) { text.Cut(offset, 4); text.Insert(PRUnichar('<'), offset); } - else if (Substring(text, offset, 4).Equals(NS_LITERAL_STRING(">"), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 4).LowerCaseEqualsLiteral(">")) { text.Cut(offset, 4); text.Insert(PRUnichar('>'), offset); } - else if (Substring(text, offset, 5).Equals(NS_LITERAL_STRING("&"), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 5).LowerCaseEqualsLiteral("&")) { text.Cut(offset, 5); text.Insert(PRUnichar('&'), offset); } - else if (Substring(text, offset, 6).Equals(NS_LITERAL_STRING("""), nsCaseInsensitiveStringComparator())) + else if (Substring(text, offset, 6).LowerCaseEqualsLiteral(""")) { text.Cut(offset, 6); text.Insert(PRUnichar('\"'), offset); @@ -655,7 +655,7 @@ RelatedLinksHandlerImpl::Init() else { // no preference, so fallback to a well-known URL - mRLServerURL->Assign(NS_LITERAL_STRING("http://www-rl.netscape.com/wtgn?")); + mRLServerURL->AssignLiteral("http://www-rl.netscape.com/wtgn?"); } } } diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index 2591c40c14bb..affe929e1013 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -1156,15 +1156,15 @@ InternetSearchDataSource::GetTarget(nsIRDFResource *source, nsAutoString name; if (source == kNC_SearchCommand_AddToBookmarks) - name = NS_LITERAL_STRING("addtobookmarks"); + name.AssignLiteral("addtobookmarks"); else if (source == kNC_SearchCommand_AddQueryToBookmarks) - name = NS_LITERAL_STRING("addquerytobookmarks"); + name.AssignLiteral("addquerytobookmarks"); else if (source == kNC_SearchCommand_FilterResult) - name = NS_LITERAL_STRING("excludeurl"); + name.AssignLiteral("excludeurl"); else if (source == kNC_SearchCommand_FilterSite) - name = NS_LITERAL_STRING("excludedomain"); + name.AssignLiteral("excludedomain"); else if (source == kNC_SearchCommand_ClearFilters) - name = NS_LITERAL_STRING("clearfilters"); + name.AssignLiteral("clearfilters"); rv = bundle->GetStringFromName(name.get(), getter_Copies(valUni)); if (NS_SUCCEEDED(rv) && valUni && *valUni) { @@ -2626,7 +2626,7 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI, if (input.IsEmpty()) return(NS_ERROR_UNEXPECTED); // we can only handle HTTP GET - if (!method.EqualsIgnoreCase("get")) return(NS_ERROR_UNEXPECTED); + if (!method.LowerCaseEqualsLiteral("get")) return(NS_ERROR_UNEXPECTED); // HTTP Get method support action += NS_LITERAL_STRING("?") + input; @@ -3144,7 +3144,7 @@ InternetSearchDataSource::BeginSearchRequest(nsIRDFResource *source, PRBool doNe if (!attrib.IsEmpty() && !value.IsEmpty()) { - if (attrib.EqualsIgnoreCase("engine")) + if (attrib.LowerCaseEqualsLiteral("engine")) { if ((value.Find(kEngineProtocol) == 0) || (value.Find(kURINC_SearchCategoryEnginePrefix) == 0)) @@ -3156,7 +3156,7 @@ InternetSearchDataSource::BeginSearchRequest(nsIRDFResource *source, PRBool doNe } } } - else if (attrib.EqualsIgnoreCase("text")) + else if (attrib.LowerCaseEqualsLiteral("text")) { text = value; } @@ -3462,14 +3462,14 @@ InternetSearchDataSource::updateDataHintsInGraph(nsIRDFResource *engine, const P // if we have a ".hqx" extension, strip it off nsAutoString extension; updateStr.Right(extension, 4); - if (extension.EqualsIgnoreCase(".hqx")) + if (extension.LowerCaseEqualsLiteral(".hqx")) { updateStr.Truncate(updateStr.Length() - 4); } // now, either way, ensure that we have a ".src" file updateStr.Right(extension, 4); - if (!extension.EqualsIgnoreCase(".src")) + if (!extension.LowerCaseEqualsLiteral(".src")) { // and if we don't, toss it updateStr.Truncate(); @@ -3640,7 +3640,7 @@ InternetSearchDataSource::MapEncoding(const nsString &numericEncoding, stringEncoding = defCharset; else // make "ISO-8859-1" as the default (not "UTF-8") - stringEncoding.Assign(NS_LITERAL_STRING("ISO-8859-1")); + stringEncoding.AssignLiteral("ISO-8859-1"); return(NS_OK); } @@ -3821,7 +3821,7 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin if (!fullURL.IsEmpty()) { action.Assign(fullURL); - methodStr.Assign(NS_LITERAL_STRING("get")); + methodStr.AssignLiteral("get"); } else { @@ -3892,7 +3892,7 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin } } - if (fullURL.IsEmpty() && methodStr.EqualsIgnoreCase("get")) + if (fullURL.IsEmpty() && methodStr.LowerCaseEqualsLiteral("get")) { if (NS_FAILED(rv = GetInputs(dataUni, userVar, textTemp, input, 0, 0, 0))) return(rv); if (input.IsEmpty()) return(NS_ERROR_UNEXPECTED); @@ -3926,7 +3926,7 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin // get it just from the cache if we can (do not validate) channel->SetLoadFlags(nsIRequest::LOAD_FROM_CACHE); - if (methodStr.EqualsIgnoreCase("post")) + if (methodStr.LowerCaseEqualsLiteral("post")) { nsCOMPtr httpChannel (do_QueryInterface(channel)); if (httpChannel) @@ -4042,7 +4042,7 @@ InternetSearchDataSource::SaveEngineInfoIntoGraph(nsIFile *file, nsIFile *icon, if ((extensionOffset = basename.RFindChar(PRUnichar('.'))) > 0) { basename.Truncate(extensionOffset); - basename.Append(NS_LITERAL_STRING(".src")); + basename.AppendLiteral(".src"); } nsCAutoString filePath; @@ -4059,7 +4059,7 @@ InternetSearchDataSource::SaveEngineInfoIntoGraph(nsIFile *file, nsIFile *icon, if ((extensionOffset = searchURL.RFindChar(PRUnichar('.'))) > 0) { searchURL.Truncate(extensionOffset); - searchURL.Append(NS_LITERAL_STRING(".src")); + searchURL.AppendLiteral(".src"); } if (NS_FAILED(rv = gRDFService->GetUnicodeResource(searchURL, @@ -4101,7 +4101,7 @@ InternetSearchDataSource::SaveEngineInfoIntoGraph(nsIFile *file, nsIFile *icon, nsCAutoString fileURL; if (NS_FAILED(rv = NS_GetURLSpecFromFile(file,fileURL))) return(rv); - iconURL.Assign(NS_LITERAL_STRING("moz-icon:")); + iconURL.AssignLiteral("moz-icon:"); iconURL.Append(NS_ConvertUTF8toUCS2(fileURL)); } #endif @@ -4284,7 +4284,7 @@ InternetSearchDataSource::GetSearchEngineList(nsIFile *searchDir, // check the extension (must be ".src") nsAutoString extension; - if ((uri.Right(extension, 4) != 4) || (!extension.EqualsIgnoreCase(".src"))) + if ((uri.Right(extension, 4) != 4) || (!extension.LowerCaseEqualsLiteral(".src"))) { continue; } @@ -4434,7 +4434,7 @@ InternetSearchDataSource::GetData(const PRUnichar *dataUni, const char *sectionT PRBool inSection = PR_FALSE; nsAutoString section; - section.Assign(NS_LITERAL_STRING("<")); + section.AssignLiteral("<"); section.AppendWithConversion(sectionToFind); while(!buffer.IsEmpty()) @@ -4677,10 +4677,10 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &userVar, { if (!input.IsEmpty()) { - input.Append(NS_LITERAL_STRING("&")); + input.AppendLiteral("&"); } input += nameAttrib; - input.Append(NS_LITERAL_STRING("=")); + input.AppendLiteral("="); if (!inDirInput) input += valueAttrib; else @@ -5216,7 +5216,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, nsAutoString nameStartStr, nameEndStr; nsAutoString emailStartStr, emailEndStr; nsAutoString browserResultTypeStr; - browserResultTypeStr.Assign(NS_LITERAL_STRING("result")); // default to "result" + browserResultTypeStr.AssignLiteral("result"); // default to "result" // use a nsDependentString so that "htmlPage" data isn't copied nsDependentString htmlResults(htmlPage, htmlPageSize); @@ -5233,7 +5233,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, GetData(dataUni, "interpret", interpretSectionNum, "bannerStart", bannerStartStr); GetData(dataUni, "interpret", interpretSectionNum, "bannerEnd", bannerEndStr); GetData(dataUni, "interpret", interpretSectionNum, "skiplocal", skiplocalStr); - skipLocalFlag = (skiplocalStr.EqualsIgnoreCase("true")) ? PR_TRUE : PR_FALSE; + skipLocalFlag = (skiplocalStr.LowerCaseEqualsLiteral("true")) ? PR_TRUE : PR_FALSE; // shopping channel support GetData(dataUni, "interpret", interpretSectionNum, "priceStart", priceStartStr); @@ -5255,7 +5255,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, GetData(dataUni, "interpret", interpretSectionNum, "browserResultType", browserResultTypeStr); if (browserResultTypeStr.IsEmpty()) { - browserResultTypeStr.Assign(NS_LITERAL_STRING("result")); // default to "result" + browserResultTypeStr.AssignLiteral("result"); // default to "result" } } @@ -5321,7 +5321,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, // if resultItemStartStr is not specified, try making it just be "HREF=" if (resultItemStartStr.IsEmpty()) { - resultItemStartStr.Assign(NS_LITERAL_STRING("HREF=")); + resultItemStartStr.AssignLiteral("HREF="); trimItemStart = PR_FALSE; } @@ -5799,7 +5799,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, } if (relItem.IsEmpty()) { - relItem.Assign(NS_LITERAL_STRING("-")); + relItem.AssignLiteral("-"); } const PRUnichar *relItemUni = relItem.get(); @@ -5822,7 +5822,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, // left-pad with "0"s and set special sorting value nsAutoString zero; - zero.Assign(NS_LITERAL_STRING("000")); + zero.AssignLiteral("000"); if (relItem.Length() < 3) { relItem.Insert(zero.get(), 0, zero.Length() - relItem.Length()); @@ -5830,7 +5830,7 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, } else { - relItem.Assign(NS_LITERAL_STRING("000")); + relItem.AssignLiteral("000"); } const PRUnichar *relSortUni = relItem.get(); @@ -5875,10 +5875,10 @@ InternetSearchDataSource::ParseHTML(nsIURI *aURL, nsIRDFResource *mParent, // if no branding icon, use some default icons nsAutoString iconChromeDefault; - if (browserResultTypeStr.EqualsIgnoreCase("category")) - iconChromeDefault.Assign(NS_LITERAL_STRING("chrome://communicator/skin/search/category.gif")); - else if ((browserResultTypeStr.EqualsIgnoreCase("result")) && (!engineIconNode)) - iconChromeDefault.Assign(NS_LITERAL_STRING("chrome://communicator/skin/search/result.gif")); + if (browserResultTypeStr.LowerCaseEqualsLiteral("category")) + iconChromeDefault.AssignLiteral("chrome://communicator/skin/search/category.gif"); + else if ((browserResultTypeStr.LowerCaseEqualsLiteral("result")) && (!engineIconNode)) + iconChromeDefault.AssignLiteral("chrome://communicator/skin/search/result.gif"); if (!iconChromeDefault.IsEmpty()) { @@ -6029,106 +6029,106 @@ InternetSearchDataSource::ConvertEntities(nsString &nameStr, PRBool removeHTMLFl nameStr.Cut(ampOffset, semiOffset-ampOffset+1); PRUnichar entityChar = 0; - if (entityStr.EqualsIgnoreCase(""")) entityChar = PRUnichar('\"'); - else if (entityStr.EqualsIgnoreCase("&")) entityChar = PRUnichar('&'); - else if (entityStr.EqualsIgnoreCase(" ")) entityChar = PRUnichar(' '); - else if (entityStr.EqualsIgnoreCase("<")) entityChar = PRUnichar('<'); - else if (entityStr.EqualsIgnoreCase(">")) entityChar = PRUnichar('>'); - else if (entityStr.EqualsIgnoreCase("¡")) entityChar = PRUnichar(161); - else if (entityStr.EqualsIgnoreCase("¢")) entityChar = PRUnichar(162); - else if (entityStr.EqualsIgnoreCase("£")) entityChar = PRUnichar(163); - else if (entityStr.EqualsIgnoreCase("¤")) entityChar = PRUnichar(164); - else if (entityStr.EqualsIgnoreCase("¥")) entityChar = PRUnichar(165); - else if (entityStr.EqualsIgnoreCase("¦")) entityChar = PRUnichar(166); - else if (entityStr.EqualsIgnoreCase("§")) entityChar = PRUnichar(167); - else if (entityStr.EqualsIgnoreCase("¨")) entityChar = PRUnichar(168); - else if (entityStr.EqualsIgnoreCase("©")) entityChar = PRUnichar(169); - else if (entityStr.EqualsIgnoreCase("ª")) entityChar = PRUnichar(170); - else if (entityStr.EqualsIgnoreCase("«")) entityChar = PRUnichar(171); - else if (entityStr.EqualsIgnoreCase("¬")) entityChar = PRUnichar(172); - else if (entityStr.EqualsIgnoreCase("­")) entityChar = PRUnichar(173); - else if (entityStr.EqualsIgnoreCase("®")) entityChar = PRUnichar(174); - else if (entityStr.EqualsIgnoreCase("¯")) entityChar = PRUnichar(175); - else if (entityStr.EqualsIgnoreCase("°")) entityChar = PRUnichar(176); - else if (entityStr.EqualsIgnoreCase("±")) entityChar = PRUnichar(177); - else if (entityStr.EqualsIgnoreCase("²")) entityChar = PRUnichar(178); - else if (entityStr.EqualsIgnoreCase("³")) entityChar = PRUnichar(179); - else if (entityStr.EqualsIgnoreCase("´")) entityChar = PRUnichar(180); - else if (entityStr.EqualsIgnoreCase("µ")) entityChar = PRUnichar(181); - else if (entityStr.EqualsIgnoreCase("¶")) entityChar = PRUnichar(182); - else if (entityStr.EqualsIgnoreCase("·")) entityChar = PRUnichar(183); - else if (entityStr.EqualsIgnoreCase("¸")) entityChar = PRUnichar(184); - else if (entityStr.EqualsIgnoreCase("¹")) entityChar = PRUnichar(185); - else if (entityStr.EqualsIgnoreCase("º")) entityChar = PRUnichar(186); - else if (entityStr.EqualsIgnoreCase("»")) entityChar = PRUnichar(187); - else if (entityStr.EqualsIgnoreCase("¼")) entityChar = PRUnichar(188); - else if (entityStr.EqualsIgnoreCase("½")) entityChar = PRUnichar(189); - else if (entityStr.EqualsIgnoreCase("¾")) entityChar = PRUnichar(190); - else if (entityStr.EqualsIgnoreCase("¿")) entityChar = PRUnichar(191); - else if (entityStr.EqualsIgnoreCase("À")) entityChar = PRUnichar(192); - else if (entityStr.EqualsIgnoreCase("Á")) entityChar = PRUnichar(193); - else if (entityStr.EqualsIgnoreCase("Â")) entityChar = PRUnichar(194); - else if (entityStr.EqualsIgnoreCase("Ã")) entityChar = PRUnichar(195); - else if (entityStr.EqualsIgnoreCase("Ä")) entityChar = PRUnichar(196); - else if (entityStr.EqualsIgnoreCase("Å")) entityChar = PRUnichar(197); - else if (entityStr.EqualsIgnoreCase("Æ")) entityChar = PRUnichar(198); - else if (entityStr.EqualsIgnoreCase("Ç")) entityChar = PRUnichar(199); - else if (entityStr.EqualsIgnoreCase("È")) entityChar = PRUnichar(200); - else if (entityStr.EqualsIgnoreCase("É")) entityChar = PRUnichar(201); - else if (entityStr.EqualsIgnoreCase("Ê")) entityChar = PRUnichar(202); - else if (entityStr.EqualsIgnoreCase("Ë")) entityChar = PRUnichar(203); - else if (entityStr.EqualsIgnoreCase("Ì")) entityChar = PRUnichar(204); - else if (entityStr.EqualsIgnoreCase("Í")) entityChar = PRUnichar(205); - else if (entityStr.EqualsIgnoreCase("Î")) entityChar = PRUnichar(206); - else if (entityStr.EqualsIgnoreCase("Ï")) entityChar = PRUnichar(207); - else if (entityStr.EqualsIgnoreCase("Ð")) entityChar = PRUnichar(208); - else if (entityStr.EqualsIgnoreCase("Ñ")) entityChar = PRUnichar(209); - else if (entityStr.EqualsIgnoreCase("Ò")) entityChar = PRUnichar(210); - else if (entityStr.EqualsIgnoreCase("Ó")) entityChar = PRUnichar(211); - else if (entityStr.EqualsIgnoreCase("Ô")) entityChar = PRUnichar(212); - else if (entityStr.EqualsIgnoreCase("Õ")) entityChar = PRUnichar(213); - else if (entityStr.EqualsIgnoreCase("Ö")) entityChar = PRUnichar(214); - else if (entityStr.EqualsIgnoreCase("×")) entityChar = PRUnichar(215); - else if (entityStr.EqualsIgnoreCase("Ø")) entityChar = PRUnichar(216); - else if (entityStr.EqualsIgnoreCase("Ù")) entityChar = PRUnichar(217); - else if (entityStr.EqualsIgnoreCase("Ú")) entityChar = PRUnichar(218); - else if (entityStr.EqualsIgnoreCase("Û")) entityChar = PRUnichar(219); - else if (entityStr.EqualsIgnoreCase("Ü")) entityChar = PRUnichar(220); - else if (entityStr.EqualsIgnoreCase("Ý")) entityChar = PRUnichar(221); - else if (entityStr.EqualsIgnoreCase("Þ")) entityChar = PRUnichar(222); - else if (entityStr.EqualsIgnoreCase("ß")) entityChar = PRUnichar(223); - else if (entityStr.EqualsIgnoreCase("à")) entityChar = PRUnichar(224); - else if (entityStr.EqualsIgnoreCase("á")) entityChar = PRUnichar(225); - else if (entityStr.EqualsIgnoreCase("â")) entityChar = PRUnichar(226); - else if (entityStr.EqualsIgnoreCase("ã")) entityChar = PRUnichar(227); - else if (entityStr.EqualsIgnoreCase("ä")) entityChar = PRUnichar(228); - else if (entityStr.EqualsIgnoreCase("å")) entityChar = PRUnichar(229); - else if (entityStr.EqualsIgnoreCase("æ")) entityChar = PRUnichar(230); - else if (entityStr.EqualsIgnoreCase("ç")) entityChar = PRUnichar(231); - else if (entityStr.EqualsIgnoreCase("è")) entityChar = PRUnichar(232); - else if (entityStr.EqualsIgnoreCase("é")) entityChar = PRUnichar(233); - else if (entityStr.EqualsIgnoreCase("ê")) entityChar = PRUnichar(234); - else if (entityStr.EqualsIgnoreCase("ë")) entityChar = PRUnichar(235); - else if (entityStr.EqualsIgnoreCase("ì")) entityChar = PRUnichar(236); - else if (entityStr.EqualsIgnoreCase("í")) entityChar = PRUnichar(237); - else if (entityStr.EqualsIgnoreCase("î")) entityChar = PRUnichar(238); - else if (entityStr.EqualsIgnoreCase("ï")) entityChar = PRUnichar(239); - else if (entityStr.EqualsIgnoreCase("ð")) entityChar = PRUnichar(240); - else if (entityStr.EqualsIgnoreCase("ñ")) entityChar = PRUnichar(241); - else if (entityStr.EqualsIgnoreCase("ò")) entityChar = PRUnichar(242); - else if (entityStr.EqualsIgnoreCase("ó")) entityChar = PRUnichar(243); - else if (entityStr.EqualsIgnoreCase("ô")) entityChar = PRUnichar(244); - else if (entityStr.EqualsIgnoreCase("õ")) entityChar = PRUnichar(245); - else if (entityStr.EqualsIgnoreCase("ö")) entityChar = PRUnichar(246); - else if (entityStr.EqualsIgnoreCase("÷")) entityChar = PRUnichar(247); - else if (entityStr.EqualsIgnoreCase("ø")) entityChar = PRUnichar(248); - else if (entityStr.EqualsIgnoreCase("ù")) entityChar = PRUnichar(249); - else if (entityStr.EqualsIgnoreCase("ú")) entityChar = PRUnichar(250); - else if (entityStr.EqualsIgnoreCase("û")) entityChar = PRUnichar(251); - else if (entityStr.EqualsIgnoreCase("ü")) entityChar = PRUnichar(252); - else if (entityStr.EqualsIgnoreCase("ý")) entityChar = PRUnichar(253); - else if (entityStr.EqualsIgnoreCase("þ")) entityChar = PRUnichar(254); - else if (entityStr.EqualsIgnoreCase("ÿ")) entityChar = PRUnichar(255); + if (entityStr.LowerCaseEqualsLiteral(""")) entityChar = PRUnichar('\"'); + else if (entityStr.LowerCaseEqualsLiteral("&")) entityChar = PRUnichar('&'); + else if (entityStr.LowerCaseEqualsLiteral(" ")) entityChar = PRUnichar(' '); + else if (entityStr.LowerCaseEqualsLiteral("<")) entityChar = PRUnichar('<'); + else if (entityStr.LowerCaseEqualsLiteral(">")) entityChar = PRUnichar('>'); + else if (entityStr.LowerCaseEqualsLiteral("¡")) entityChar = PRUnichar(161); + else if (entityStr.LowerCaseEqualsLiteral("¢")) entityChar = PRUnichar(162); + else if (entityStr.LowerCaseEqualsLiteral("£")) entityChar = PRUnichar(163); + else if (entityStr.LowerCaseEqualsLiteral("¤")) entityChar = PRUnichar(164); + else if (entityStr.LowerCaseEqualsLiteral("¥")) entityChar = PRUnichar(165); + else if (entityStr.LowerCaseEqualsLiteral("¦")) entityChar = PRUnichar(166); + else if (entityStr.LowerCaseEqualsLiteral("§")) entityChar = PRUnichar(167); + else if (entityStr.LowerCaseEqualsLiteral("¨")) entityChar = PRUnichar(168); + else if (entityStr.LowerCaseEqualsLiteral("©")) entityChar = PRUnichar(169); + else if (entityStr.LowerCaseEqualsLiteral("ª")) entityChar = PRUnichar(170); + else if (entityStr.LowerCaseEqualsLiteral("«")) entityChar = PRUnichar(171); + else if (entityStr.LowerCaseEqualsLiteral("¬")) entityChar = PRUnichar(172); + else if (entityStr.LowerCaseEqualsLiteral("­")) entityChar = PRUnichar(173); + else if (entityStr.LowerCaseEqualsLiteral("®")) entityChar = PRUnichar(174); + else if (entityStr.LowerCaseEqualsLiteral("¯")) entityChar = PRUnichar(175); + else if (entityStr.LowerCaseEqualsLiteral("°")) entityChar = PRUnichar(176); + else if (entityStr.LowerCaseEqualsLiteral("±")) entityChar = PRUnichar(177); + else if (entityStr.LowerCaseEqualsLiteral("²")) entityChar = PRUnichar(178); + else if (entityStr.LowerCaseEqualsLiteral("³")) entityChar = PRUnichar(179); + else if (entityStr.LowerCaseEqualsLiteral("´")) entityChar = PRUnichar(180); + else if (entityStr.LowerCaseEqualsLiteral("µ")) entityChar = PRUnichar(181); + else if (entityStr.LowerCaseEqualsLiteral("¶")) entityChar = PRUnichar(182); + else if (entityStr.LowerCaseEqualsLiteral("·")) entityChar = PRUnichar(183); + else if (entityStr.LowerCaseEqualsLiteral("¸")) entityChar = PRUnichar(184); + else if (entityStr.LowerCaseEqualsLiteral("¹")) entityChar = PRUnichar(185); + else if (entityStr.LowerCaseEqualsLiteral("º")) entityChar = PRUnichar(186); + else if (entityStr.LowerCaseEqualsLiteral("»")) entityChar = PRUnichar(187); + else if (entityStr.LowerCaseEqualsLiteral("¼")) entityChar = PRUnichar(188); + else if (entityStr.LowerCaseEqualsLiteral("½")) entityChar = PRUnichar(189); + else if (entityStr.LowerCaseEqualsLiteral("¾")) entityChar = PRUnichar(190); + else if (entityStr.LowerCaseEqualsLiteral("¿")) entityChar = PRUnichar(191); + else if (entityStr.LowerCaseEqualsLiteral("à")) entityChar = PRUnichar(192); + else if (entityStr.LowerCaseEqualsLiteral("á")) entityChar = PRUnichar(193); + else if (entityStr.LowerCaseEqualsLiteral("â")) entityChar = PRUnichar(194); + else if (entityStr.LowerCaseEqualsLiteral("ã")) entityChar = PRUnichar(195); + else if (entityStr.LowerCaseEqualsLiteral("ä")) entityChar = PRUnichar(196); + else if (entityStr.LowerCaseEqualsLiteral("å")) entityChar = PRUnichar(197); + else if (entityStr.LowerCaseEqualsLiteral("æ")) entityChar = PRUnichar(198); + else if (entityStr.LowerCaseEqualsLiteral("ç")) entityChar = PRUnichar(199); + else if (entityStr.LowerCaseEqualsLiteral("è")) entityChar = PRUnichar(200); + else if (entityStr.LowerCaseEqualsLiteral("é")) entityChar = PRUnichar(201); + else if (entityStr.LowerCaseEqualsLiteral("ê")) entityChar = PRUnichar(202); + else if (entityStr.LowerCaseEqualsLiteral("ë")) entityChar = PRUnichar(203); + else if (entityStr.LowerCaseEqualsLiteral("ì")) entityChar = PRUnichar(204); + else if (entityStr.LowerCaseEqualsLiteral("í")) entityChar = PRUnichar(205); + else if (entityStr.LowerCaseEqualsLiteral("î")) entityChar = PRUnichar(206); + else if (entityStr.LowerCaseEqualsLiteral("ï")) entityChar = PRUnichar(207); + else if (entityStr.LowerCaseEqualsLiteral("ð")) entityChar = PRUnichar(208); + else if (entityStr.LowerCaseEqualsLiteral("ñ")) entityChar = PRUnichar(209); + else if (entityStr.LowerCaseEqualsLiteral("ò")) entityChar = PRUnichar(210); + else if (entityStr.LowerCaseEqualsLiteral("ó")) entityChar = PRUnichar(211); + else if (entityStr.LowerCaseEqualsLiteral("ô")) entityChar = PRUnichar(212); + else if (entityStr.LowerCaseEqualsLiteral("õ")) entityChar = PRUnichar(213); + else if (entityStr.LowerCaseEqualsLiteral("ö")) entityChar = PRUnichar(214); + else if (entityStr.LowerCaseEqualsLiteral("×")) entityChar = PRUnichar(215); + else if (entityStr.LowerCaseEqualsLiteral("ø")) entityChar = PRUnichar(216); + else if (entityStr.LowerCaseEqualsLiteral("ù")) entityChar = PRUnichar(217); + else if (entityStr.LowerCaseEqualsLiteral("ú")) entityChar = PRUnichar(218); + else if (entityStr.LowerCaseEqualsLiteral("û")) entityChar = PRUnichar(219); + else if (entityStr.LowerCaseEqualsLiteral("ü")) entityChar = PRUnichar(220); + else if (entityStr.LowerCaseEqualsLiteral("ý")) entityChar = PRUnichar(221); + else if (entityStr.LowerCaseEqualsLiteral("þ")) entityChar = PRUnichar(222); + else if (entityStr.LowerCaseEqualsLiteral("ß")) entityChar = PRUnichar(223); + else if (entityStr.LowerCaseEqualsLiteral("à")) entityChar = PRUnichar(224); + else if (entityStr.LowerCaseEqualsLiteral("á")) entityChar = PRUnichar(225); + else if (entityStr.LowerCaseEqualsLiteral("â")) entityChar = PRUnichar(226); + else if (entityStr.LowerCaseEqualsLiteral("ã")) entityChar = PRUnichar(227); + else if (entityStr.LowerCaseEqualsLiteral("ä")) entityChar = PRUnichar(228); + else if (entityStr.LowerCaseEqualsLiteral("å")) entityChar = PRUnichar(229); + else if (entityStr.LowerCaseEqualsLiteral("æ")) entityChar = PRUnichar(230); + else if (entityStr.LowerCaseEqualsLiteral("ç")) entityChar = PRUnichar(231); + else if (entityStr.LowerCaseEqualsLiteral("è")) entityChar = PRUnichar(232); + else if (entityStr.LowerCaseEqualsLiteral("é")) entityChar = PRUnichar(233); + else if (entityStr.LowerCaseEqualsLiteral("ê")) entityChar = PRUnichar(234); + else if (entityStr.LowerCaseEqualsLiteral("ë")) entityChar = PRUnichar(235); + else if (entityStr.LowerCaseEqualsLiteral("ì")) entityChar = PRUnichar(236); + else if (entityStr.LowerCaseEqualsLiteral("í")) entityChar = PRUnichar(237); + else if (entityStr.LowerCaseEqualsLiteral("î")) entityChar = PRUnichar(238); + else if (entityStr.LowerCaseEqualsLiteral("ï")) entityChar = PRUnichar(239); + else if (entityStr.LowerCaseEqualsLiteral("ð")) entityChar = PRUnichar(240); + else if (entityStr.LowerCaseEqualsLiteral("ñ")) entityChar = PRUnichar(241); + else if (entityStr.LowerCaseEqualsLiteral("ò")) entityChar = PRUnichar(242); + else if (entityStr.LowerCaseEqualsLiteral("ó")) entityChar = PRUnichar(243); + else if (entityStr.LowerCaseEqualsLiteral("ô")) entityChar = PRUnichar(244); + else if (entityStr.LowerCaseEqualsLiteral("õ")) entityChar = PRUnichar(245); + else if (entityStr.LowerCaseEqualsLiteral("ö")) entityChar = PRUnichar(246); + else if (entityStr.LowerCaseEqualsLiteral("÷")) entityChar = PRUnichar(247); + else if (entityStr.LowerCaseEqualsLiteral("ø")) entityChar = PRUnichar(248); + else if (entityStr.LowerCaseEqualsLiteral("ù")) entityChar = PRUnichar(249); + else if (entityStr.LowerCaseEqualsLiteral("ú")) entityChar = PRUnichar(250); + else if (entityStr.LowerCaseEqualsLiteral("û")) entityChar = PRUnichar(251); + else if (entityStr.LowerCaseEqualsLiteral("ü")) entityChar = PRUnichar(252); + else if (entityStr.LowerCaseEqualsLiteral("ý")) entityChar = PRUnichar(253); + else if (entityStr.LowerCaseEqualsLiteral("þ")) entityChar = PRUnichar(254); + else if (entityStr.LowerCaseEqualsLiteral("ÿ")) entityChar = PRUnichar(255); startOffset = ampOffset; if (entityChar != 0) diff --git a/xpfe/components/xremote/src/XRemoteService.cpp b/xpfe/components/xremote/src/XRemoteService.cpp index 3d27e78a39cf..068571cb550d 100644 --- a/xpfe/components/xremote/src/XRemoteService.cpp +++ b/xpfe/components/xremote/src/XRemoteService.cpp @@ -192,7 +192,7 @@ XRemoteService::ParseCommand(nsIWidget *aWidget, nsCString lastArgument; FindLastInList(argument, lastArgument, &index); - if (lastArgument.EqualsIgnoreCase("noraise")) { + if (lastArgument.LowerCaseEqualsLiteral("noraise")) { argument.Truncate(index); raiseWindow = PR_FALSE; } @@ -253,7 +253,7 @@ XRemoteService::ParseCommand(nsIWidget *aWidget, // check to see if it has a type on it index = 0; FindLastInList(argument, lastArgument, &index); - if (lastArgument.EqualsIgnoreCase("html")) { + if (lastArgument.LowerCaseEqualsLiteral("html")) { argument.Truncate(index); rv = NS_ERROR_NOT_IMPLEMENTED; } @@ -691,7 +691,7 @@ XRemoteService::MayOpenURL(const nsCString &aURL) // empty URLs will be treated as about:blank by OpenURL if (aURL.IsEmpty()) { - scheme = NS_LITERAL_CSTRING("about"); + scheme.AssignLiteral("about"); } else { nsCOMPtr fixup = do_GetService(NS_URIFIXUP_CONTRACTID); @@ -733,9 +733,9 @@ XRemoteService::OpenURL(nsCString &aArgument, PRUint32 index = 0; FindLastInList(aArgument, lastArgument, &index); - newTab = lastArgument.EqualsIgnoreCase("new-tab"); + newTab = lastArgument.LowerCaseEqualsLiteral("new-tab"); - if (newTab || lastArgument.EqualsIgnoreCase("new-window")) { + if (newTab || lastArgument.LowerCaseEqualsLiteral("new-window")) { aArgument.Truncate(index); // only open new windows if it's OK to do so if (!newTab && aOpenBrowser) @@ -743,7 +743,7 @@ XRemoteService::OpenURL(nsCString &aArgument, // recheck for a possible noraise argument since it might have // been before the new-window argument FindLastInList(aArgument, lastArgument, &index); - if (lastArgument.EqualsIgnoreCase("noraise")) + if (lastArgument.LowerCaseEqualsLiteral("noraise")) aArgument.Truncate(index); } @@ -960,7 +960,7 @@ XRemoteService::XfeDoCommand(nsCString &aArgument, arg->SetData(NS_ConvertUTF8toUCS2(restArgument)); // someone requested opening mail/news - if (aArgument.EqualsIgnoreCase("openinbox")) { + if (aArgument.LowerCaseEqualsLiteral("openinbox")) { // check to see if it's already running nsCOMPtr domWindow; @@ -991,7 +991,7 @@ XRemoteService::XfeDoCommand(nsCString &aArgument, } // open a new browser window - else if (aArgument.EqualsIgnoreCase("openbrowser")) { + else if (aArgument.LowerCaseEqualsLiteral("openbrowser")) { nsXPIDLCString browserLocation; GetBrowserLocation(getter_Copies(browserLocation)); if (!browserLocation) @@ -1003,7 +1003,7 @@ XRemoteService::XfeDoCommand(nsCString &aArgument, } // open a new compose window - else if (aArgument.EqualsIgnoreCase("composemessage")) { + else if (aArgument.LowerCaseEqualsLiteral("composemessage")) { /* * Here we change to OpenChromeWindow instead of OpenURL so as to * pass argument values to the compose window, especially attachments diff --git a/xpinstall/src/ScheduledTasks.cpp b/xpinstall/src/ScheduledTasks.cpp index 69be0de4adfb..7c884794cf53 100644 --- a/xpinstall/src/ScheduledTasks.cpp +++ b/xpinstall/src/ScheduledTasks.cpp @@ -292,7 +292,7 @@ PRInt32 ReplaceFileNow(nsIFile* aReplacementFile, nsIFile* aDoomedFile ) // We found the extension; doomedLeafname.Truncate(extpos + 1); //strip off the old extension } - doomedLeafname.Append(NS_LITERAL_STRING("old")); + doomedLeafname.AppendLiteral("old"); //Now reset the doomedLeafname tmpLocalFile->SetLeafName(doomedLeafname); diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index 8d07a7e00307..52be8fab4466 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -454,7 +454,7 @@ nsInstall::AddDirectory(const nsString& aRegName, if (!subdirectory.IsEmpty()) { - subdirectory.Append(NS_LITERAL_STRING("/")); + subdirectory.AppendLiteral("/"); } @@ -480,7 +480,7 @@ nsInstall::AddDirectory(const nsString& aRegName, nsString *thisPath = (nsString *)paths->ElementAt(i); nsString newJarSource = aJarSource; - newJarSource.Append(NS_LITERAL_STRING("/")); + newJarSource.AppendLiteral("/"); newJarSource += *thisPath; nsString newSubDir; @@ -616,7 +616,7 @@ nsInstall::AddSubcomponent(const nsString& aRegName, } if (qualifiedVersion.IsEmpty()) - qualifiedVersion.Assign(NS_LITERAL_STRING("0.0.0.0")); + qualifiedVersion.AssignLiteral("0.0.0.0"); if ( aRegName.IsEmpty() ) @@ -2434,11 +2434,11 @@ nsInstall::CurrentUserNode(nsString& userRegNode) prefBranch->GetCharPref("profile.name", getter_Copies(profname)); } - userRegNode.Assign(NS_LITERAL_STRING("/Netscape/Users/")); + userRegNode.AssignLiteral("/Netscape/Users/"); if ( !profname.IsEmpty() ) { userRegNode.AppendWithConversion(profname); - userRegNode.Append(NS_LITERAL_STRING("/")); + userRegNode.AppendLiteral("/"); } } @@ -2652,7 +2652,7 @@ nsInstall::ExtractFileFromJar(const nsString& aJarfile, nsIFile* aSuggestedName, // We found the extension; newLeafName.Truncate(extpos + 1); //strip off the old extension } - newLeafName.Append(NS_LITERAL_STRING("new")); + newLeafName.AppendLiteral("new"); //Now reset the leafname tempFile->SetLeafName(newLeafName); diff --git a/xpinstall/src/nsJSFile.cpp b/xpinstall/src/nsJSFile.cpp index b96a5bfa41d0..bf8ad123f729 100644 --- a/xpinstall/src/nsJSFile.cpp +++ b/xpinstall/src/nsJSFile.cpp @@ -1297,7 +1297,7 @@ InstallFileOpFileMacAlias(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, else { aliasLeaf = sourceLeaf; - aliasLeaf.Append(NS_LITERAL_STRING(" alias")); // XXX use GetResourcedString(id) + aliasLeaf.AppendLiteral(" alias"); // XXX use GetResourcedString(id) } rv2 = iFileAlias->Append(aliasLeaf); diff --git a/xpinstall/src/nsJSInstallVersion.cpp b/xpinstall/src/nsJSInstallVersion.cpp index 9008bd4ab84a..f86709e4965b 100644 --- a/xpinstall/src/nsJSInstallVersion.cpp +++ b/xpinstall/src/nsJSInstallVersion.cpp @@ -302,7 +302,7 @@ InstallVersionInit(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval } else { - b0.Assign(NS_LITERAL_STRING("0.0.0.0")); + b0.AssignLiteral("0.0.0.0"); } if (NS_OK != nativeThis->Init(b0)) diff --git a/xpinstall/src/nsSoftwareUpdateRun.cpp b/xpinstall/src/nsSoftwareUpdateRun.cpp index 011870dda186..30449fc0449c 100644 --- a/xpinstall/src/nsSoftwareUpdateRun.cpp +++ b/xpinstall/src/nsSoftwareUpdateRun.cpp @@ -221,9 +221,9 @@ XPInstallErrorReporter(JSContext *cx, const char *message, JSErrorReport *report nsAutoString logMessage; if (report) { - logMessage.Assign(NS_LITERAL_STRING("Line: ")); + logMessage.AssignLiteral("Line: "); logMessage.AppendInt(report->lineno, 10); - logMessage.Append(NS_LITERAL_STRING("\t")); + logMessage.AppendLiteral("\t"); if (report->ucmessage) logMessage.Append( NS_REINTERPRET_CAST(const PRUnichar*, report->ucmessage) ); else diff --git a/xpinstall/src/nsWinProfile.cpp b/xpinstall/src/nsWinProfile.cpp index 12db3dd3a8dc..b5132a5c093e 100644 --- a/xpinstall/src/nsWinProfile.cpp +++ b/xpinstall/src/nsWinProfile.cpp @@ -53,7 +53,7 @@ nsWinProfile::nsWinProfile( nsInstall* suObj, const nsString& folder, const nsSt if(mFilename.Last() != '\\') { - mFilename.Append(NS_LITERAL_STRING("\\")); + mFilename.AppendLiteral("\\"); } mFilename.Append(file); diff --git a/xpinstall/src/nsWinProfileItem.cpp b/xpinstall/src/nsWinProfileItem.cpp index 7e653aaaf8ee..ece2ddb12ff9 100644 --- a/xpinstall/src/nsWinProfileItem.cpp +++ b/xpinstall/src/nsWinProfileItem.cpp @@ -90,17 +90,17 @@ char* nsWinProfileItem::toString() nsString* filename = new nsString(mProfile->GetFilename()); nsString* result = new nsString; - result->Assign(NS_LITERAL_STRING("Write ")); + result->AssignLiteral("Write "); if (filename == nsnull || result == nsnull) return nsnull; result->Append(*filename); - result->Append(NS_LITERAL_STRING(": [")); + result->AppendLiteral(": ["); result->Append(*mSection); - result->Append(NS_LITERAL_STRING("] ")); + result->AppendLiteral("] "); result->Append(*mKey); - result->Append(NS_LITERAL_STRING("=")); + result->AppendLiteral("="); result->Append(*mValue); resultCString = new char[result->Length() + 1]; diff --git a/xpinstall/src/nsWinRegItem.cpp b/xpinstall/src/nsWinRegItem.cpp index 5ed5036bb1a3..8ece31b54753 100644 --- a/xpinstall/src/nsWinRegItem.cpp +++ b/xpinstall/src/nsWinRegItem.cpp @@ -266,28 +266,28 @@ nsString* nsWinRegItem::keystr(PRInt32 root, nsString* mSubkey, nsString* mName) switch(root) { case nsWinReg::NS_HKEY_CLASSES_ROOT: - rootstr.Assign(NS_LITERAL_STRING("HKEY_CLASSES_ROOT\\")); + rootstr.AssignLiteral("HKEY_CLASSES_ROOT\\"); break; case nsWinReg::NS_HKEY_CURRENT_USER: - rootstr.Assign(NS_LITERAL_STRING("HKEY_CURRENT_USER\\")); + rootstr.AssignLiteral("HKEY_CURRENT_USER\\"); break; case nsWinReg::NS_HKEY_LOCAL_MACHINE: - rootstr.Assign(NS_LITERAL_STRING("HKEY_LOCAL_MACHINE\\")); + rootstr.AssignLiteral("HKEY_LOCAL_MACHINE\\"); break; case nsWinReg::NS_HKEY_USERS: - rootstr.Assign(NS_LITERAL_STRING("HKEY_USERS\\")); + rootstr.AssignLiteral("HKEY_USERS\\"); break; default: istr = itoa(root); if (istr) { - rootstr.Assign(NS_LITERAL_STRING("#")); + rootstr.AssignLiteral("#"); rootstr.AppendWithConversion(istr); - rootstr.Append(NS_LITERAL_STRING("\\")); + rootstr.AppendLiteral("\\"); PR_DELETE(istr); } @@ -298,12 +298,12 @@ nsString* nsWinRegItem::keystr(PRInt32 root, nsString* mSubkey, nsString* mName) if(finalstr != nsnull) { finalstr->Append(*mSubkey); - finalstr->Append(NS_LITERAL_STRING(" [")); + finalstr->AppendLiteral(" ["); if(mName != nsnull) finalstr->Append(*mName); - finalstr->Append(NS_LITERAL_STRING("]")); + finalstr->AppendLiteral("]"); } return finalstr;