mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...))
. r=ehsan
This commit is contained in:
parent
a5ab25c973
commit
19bebbc68d
@ -518,7 +518,7 @@ TextAttrsMgr::FontSizeTextAttr::
|
||||
|
||||
nsAutoString value;
|
||||
value.AppendInt(pts);
|
||||
value.Append(NS_LITERAL_STRING("pt"));
|
||||
value.AppendLiteral("pt");
|
||||
|
||||
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::font_size, value);
|
||||
}
|
||||
|
@ -3323,16 +3323,16 @@ KeyBinding::ToAtkFormat(nsAString& aValue) const
|
||||
{
|
||||
nsAutoString modifierName;
|
||||
if (mModifierMask & kControl)
|
||||
aValue.Append(NS_LITERAL_STRING("<Control>"));
|
||||
aValue.AppendLiteral("<Control>");
|
||||
|
||||
if (mModifierMask & kAlt)
|
||||
aValue.Append(NS_LITERAL_STRING("<Alt>"));
|
||||
aValue.AppendLiteral("<Alt>");
|
||||
|
||||
if (mModifierMask & kShift)
|
||||
aValue.Append(NS_LITERAL_STRING("<Shift>"));
|
||||
aValue.AppendLiteral("<Shift>");
|
||||
|
||||
if (mModifierMask & kMeta)
|
||||
aValue.Append(NS_LITERAL_STRING("<Meta>"));
|
||||
aValue.AppendLiteral("<Meta>");
|
||||
|
||||
aValue.Append(mKey);
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ WebSocket::Init(JSContext* aCx,
|
||||
}
|
||||
|
||||
if (!mRequestedProtocolList.IsEmpty()) {
|
||||
mRequestedProtocolList.Append(NS_LITERAL_CSTRING(", "));
|
||||
mRequestedProtocolList.AppendLiteral(", ");
|
||||
}
|
||||
|
||||
AppendUTF16toUTF8(aProtocolArray[index], mRequestedProtocolList);
|
||||
|
@ -3891,7 +3891,7 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode,
|
||||
content->GetAttr(kNameSpaceID_XMLNS, name->LocalName(), uriStr);
|
||||
|
||||
// really want something like nsXMLContentSerializer::SerializeAttr
|
||||
tagName.Append(NS_LITERAL_STRING(" xmlns")); // space important
|
||||
tagName.AppendLiteral(" xmlns"); // space important
|
||||
if (name->GetPrefix()) {
|
||||
tagName.Append(char16_t(':'));
|
||||
name->LocalName()->ToString(nameStr);
|
||||
@ -3899,8 +3899,9 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode,
|
||||
} else {
|
||||
setDefaultNamespace = true;
|
||||
}
|
||||
tagName.Append(NS_LITERAL_STRING("=\"") + uriStr +
|
||||
NS_LITERAL_STRING("\""));
|
||||
tagName.AppendLiteral("=\"");
|
||||
tagName.Append(uriStr);
|
||||
tagName.Append('"');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3913,8 +3914,9 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode,
|
||||
// default namespace attr in, so that our kids will be in our
|
||||
// namespace.
|
||||
info->GetNamespaceURI(uriStr);
|
||||
tagName.Append(NS_LITERAL_STRING(" xmlns=\"") + uriStr +
|
||||
NS_LITERAL_STRING("\""));
|
||||
tagName.AppendLiteral(" xmlns=\"");
|
||||
tagName.Append(uriStr);
|
||||
tagName.Append('"');
|
||||
}
|
||||
}
|
||||
|
||||
@ -6116,7 +6118,7 @@ nsContentUtils::IsPatternMatching(nsAString& aValue, nsAString& aPattern,
|
||||
|
||||
// The pattern has to match the entire value.
|
||||
aPattern.Insert(NS_LITERAL_STRING("^(?:"), 0);
|
||||
aPattern.Append(NS_LITERAL_STRING(")$"));
|
||||
aPattern.AppendLiteral(")$");
|
||||
|
||||
JS::Rooted<JSObject*> re(cx,
|
||||
JS_NewUCRegExpObjectNoStatics(cx,
|
||||
|
@ -146,7 +146,8 @@ nsDOMTokenList::AddInternal(const nsAttrValue* aAttr,
|
||||
if (oneWasAdded ||
|
||||
(!resultStr.IsEmpty() &&
|
||||
!nsContentUtils::IsHTMLWhitespace(resultStr.Last()))) {
|
||||
resultStr.Append(NS_LITERAL_STRING(" ") + aToken);
|
||||
resultStr.Append(' ');
|
||||
resultStr.Append(aToken);
|
||||
} else {
|
||||
resultStr.Append(aToken);
|
||||
}
|
||||
|
@ -1394,7 +1394,7 @@ nsPlainTextSerializer::EndLine(bool aSoftlinebreak, bool aBreakBySpace)
|
||||
// If breaker character is ASCII space with RFC 3676 support (delsp=yes),
|
||||
// add twice space.
|
||||
if ((mFlags & nsIDocumentEncoder::OutputFormatDelSp) && aBreakBySpace)
|
||||
mCurrentLine.Append(NS_LITERAL_STRING(" "));
|
||||
mCurrentLine.AppendLiteral(" ");
|
||||
else
|
||||
mCurrentLine.Append(char16_t(' '));
|
||||
}
|
||||
|
@ -77,11 +77,11 @@ TestCJKWithFlowedDelSp()
|
||||
for (uint32_t i = 0; i < 36; i++) {
|
||||
result.Append(0x5341);
|
||||
}
|
||||
result.Append(NS_LITERAL_STRING(" \r\n"));
|
||||
result.AppendLiteral(" \r\n");
|
||||
for (uint32_t i = 0; i < 4; i++) {
|
||||
result.Append(0x5341);
|
||||
}
|
||||
result.Append(NS_LITERAL_STRING("\r\n"));
|
||||
result.AppendLiteral("\r\n");
|
||||
|
||||
if (!test.Equals(result)) {
|
||||
fail("Wrong HTML to CJK text serialization with format=flowed; delsp=yes");
|
||||
|
@ -4451,7 +4451,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
|
||||
rv2 = nestedURI->GetInnerURI(getter_AddRefs(tempURI));
|
||||
if (NS_SUCCEEDED(rv2) && tempURI) {
|
||||
tempURI->GetScheme(scheme);
|
||||
formatStrs[0].Append(NS_LITERAL_STRING(", "));
|
||||
formatStrs[0].AppendLiteral(", ");
|
||||
AppendASCIItoUTF16(scheme, formatStrs[0]);
|
||||
}
|
||||
nestedURI = do_QueryInterface(tempURI);
|
||||
|
@ -1589,7 +1589,7 @@ Console::IncreaseCounter(JSContext* aCx, const ConsoleStackEntry& aFrame,
|
||||
|
||||
if (key.IsEmpty()) {
|
||||
key.Append(aFrame.mFilename);
|
||||
key.Append(NS_LITERAL_STRING(":"));
|
||||
key.Append(':');
|
||||
key.AppendInt(aFrame.mLineNumber);
|
||||
}
|
||||
|
||||
|
@ -327,11 +327,11 @@ URLSearchParams::SerializeEnumerator(const nsAString& aName,
|
||||
if (data->mFirst) {
|
||||
data->mFirst = false;
|
||||
} else {
|
||||
data->mValue.Append(NS_LITERAL_STRING("&"));
|
||||
data->mValue.Append('&');
|
||||
}
|
||||
|
||||
data->Serialize(NS_ConvertUTF16toUTF8(aName));
|
||||
data->mValue.Append(NS_LITERAL_STRING("="));
|
||||
data->mValue.Append('=');
|
||||
data->Serialize(NS_ConvertUTF16toUTF8(aArray->ElementAt(i)));
|
||||
}
|
||||
|
||||
|
@ -1067,9 +1067,9 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
|
||||
#endif // MOZ_B2G_RIL
|
||||
} else {
|
||||
nsCString warningMsg;
|
||||
warningMsg.Append(NS_LITERAL_CSTRING("Unsupported AT command: "));
|
||||
warningMsg.AppendLiteral("Unsupported AT command: ");
|
||||
warningMsg.Append(msg);
|
||||
warningMsg.Append(NS_LITERAL_CSTRING(", reply with ERROR"));
|
||||
warningMsg.AppendLiteral(", reply with ERROR");
|
||||
BT_WARNING(warningMsg.get());
|
||||
|
||||
SendLine("ERROR");
|
||||
|
@ -3257,7 +3257,7 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
|
||||
}
|
||||
|
||||
if (index) {
|
||||
fileIds.Append(NS_LITERAL_STRING(" "));
|
||||
fileIds.Append(' ');
|
||||
}
|
||||
fileIds.AppendInt(id);
|
||||
}
|
||||
|
@ -457,7 +457,8 @@ KeyPath::SerializeToString(nsAString& aString) const
|
||||
// It also makes serializing easier :-)
|
||||
uint32_t len = mStrings.Length();
|
||||
for (uint32_t i = 0; i < len; ++i) {
|
||||
aString.Append(NS_LITERAL_STRING(",") + mStrings[i]);
|
||||
aString.Append(',');
|
||||
aString.Append(mStrings[i]);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -431,10 +431,10 @@ Notification::Notification(const nsAString& aID, const nsAString& aTitle, const
|
||||
// The name of the alert is of the form origin#tag/ID.
|
||||
alertName.AppendLiteral("#");
|
||||
if (!mTag.IsEmpty()) {
|
||||
alertName.Append(NS_LITERAL_STRING("tag:"));
|
||||
alertName.AppendLiteral("tag:");
|
||||
alertName.Append(mTag);
|
||||
} else {
|
||||
alertName.Append(NS_LITERAL_STRING("notag:"));
|
||||
alertName.AppendLiteral("notag:");
|
||||
alertName.Append(mID);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,8 @@ CreateScopeKey(nsIPrincipal* aPrincipal,
|
||||
rv = uri->GetScheme(scheme);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
key.Append(NS_LITERAL_CSTRING(":") + scheme);
|
||||
key.Append(':');
|
||||
key.Append(scheme);
|
||||
|
||||
int32_t port = NS_GetRealPort(uri);
|
||||
if (port != -1) {
|
||||
@ -184,9 +185,10 @@ CreateScopeKey(nsIPrincipal* aPrincipal,
|
||||
|
||||
aKey.Truncate();
|
||||
aKey.AppendInt(appId);
|
||||
aKey.Append(NS_LITERAL_CSTRING(":") + (isInBrowserElement ?
|
||||
NS_LITERAL_CSTRING("t") : NS_LITERAL_CSTRING("f")) +
|
||||
NS_LITERAL_CSTRING(":") + key);
|
||||
aKey.Append(':');
|
||||
aKey.Append(isInBrowserElement ? 't' : 'f');
|
||||
aKey.Append(':');
|
||||
aKey.Append(key);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -238,9 +240,10 @@ CreateQuotaDBKey(nsIPrincipal* aPrincipal,
|
||||
|
||||
aKey.Truncate();
|
||||
aKey.AppendInt(appId);
|
||||
aKey.Append(NS_LITERAL_CSTRING(":") + (isInBrowserElement ?
|
||||
NS_LITERAL_CSTRING("t") : NS_LITERAL_CSTRING("f")) +
|
||||
NS_LITERAL_CSTRING(":") + subdomainsDBKey);
|
||||
aKey.Append(':');
|
||||
aKey.Append(isInBrowserElement ? 't' : 'f');
|
||||
aKey.Append(':');
|
||||
aKey.Append(subdomainsDBKey);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -272,14 +272,14 @@ DOMStorageObserver::Observe(nsISupports* aSubject,
|
||||
|
||||
nsAutoCString scope;
|
||||
scope.AppendInt(appId);
|
||||
scope.Append(NS_LITERAL_CSTRING(":t:"));
|
||||
scope.AppendLiteral(":t:");
|
||||
db->AsyncClearMatchingScope(scope);
|
||||
Notify("app-data-cleared", scope);
|
||||
|
||||
if (!browserOnly) {
|
||||
scope.Truncate();
|
||||
scope.AppendInt(appId);
|
||||
scope.Append(NS_LITERAL_CSTRING(":f:"));
|
||||
scope.AppendLiteral(":f:");
|
||||
db->AsyncClearMatchingScope(scope);
|
||||
Notify("app-data-cleared", scope);
|
||||
}
|
||||
|
@ -903,14 +903,14 @@ bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
|
||||
// and we need to provide the full path.
|
||||
nsAutoString libxul;
|
||||
libxul.Append(gPaths->libDir);
|
||||
libxul.Append(NS_LITERAL_STRING("/XUL"));
|
||||
libxul.AppendLiteral("/XUL");
|
||||
#else
|
||||
// On other platforms, libxul is a library "xul" with regular
|
||||
// library prefix/suffix.
|
||||
nsAutoString libxul;
|
||||
libxul.Append(NS_LITERAL_STRING(DLL_PREFIX));
|
||||
libxul.Append(NS_LITERAL_STRING("xul"));
|
||||
libxul.Append(NS_LITERAL_STRING(DLL_SUFFIX));
|
||||
libxul.AppendLiteral(DLL_PREFIX);
|
||||
libxul.AppendLiteral("xul");
|
||||
libxul.AppendLiteral(DLL_SUFFIX);
|
||||
#endif // defined(XP_MACOSX)
|
||||
|
||||
if (!SetStringProperty(cx, objPath, "libxul", libxul)) {
|
||||
@ -973,14 +973,14 @@ bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
|
||||
nsAutoString libsqlite3;
|
||||
#if defined(ANDROID)
|
||||
// On Android, we use the system's libsqlite3
|
||||
libsqlite3.Append(NS_LITERAL_STRING(DLL_PREFIX));
|
||||
libsqlite3.Append(NS_LITERAL_STRING("sqlite3"));
|
||||
libsqlite3.Append(NS_LITERAL_STRING(DLL_SUFFIX));
|
||||
libsqlite3.AppendLiteral(DLL_PREFIX);
|
||||
libsqlite3.AppendLiteral("sqlite3");
|
||||
libsqlite3.AppendLiteral(DLL_SUFFIX);
|
||||
#elif defined(XP_WIN)
|
||||
// On Windows, for some reason, this is part of nss3.dll
|
||||
libsqlite3.Append(NS_LITERAL_STRING(DLL_PREFIX));
|
||||
libsqlite3.Append(NS_LITERAL_STRING("nss3"));
|
||||
libsqlite3.Append(NS_LITERAL_STRING(DLL_SUFFIX));
|
||||
libsqlite3.AppendLiteral(DLL_PREFIX);
|
||||
libsqlite3.AppendLiteral("nss3");
|
||||
libsqlite3.AppendLiteral(DLL_SUFFIX);
|
||||
#else
|
||||
// On other platforms, we link sqlite3 into libxul
|
||||
libsqlite3 = libxul;
|
||||
|
@ -224,7 +224,7 @@ nsVolumeService::GetVolumeByPath(const nsAString& aPath, nsIVolume **aResult)
|
||||
for (volIndex = 0; volIndex < numVolumes; volIndex++) {
|
||||
nsRefPtr<nsVolume> vol = mVolumeArray[volIndex];
|
||||
NS_ConvertUTF16toUTF8 volMountPointSlash(vol->MountPoint());
|
||||
volMountPointSlash.Append(NS_LITERAL_CSTRING("/"));
|
||||
volMountPointSlash.Append('/');
|
||||
nsDependentCSubstring testStr(realPathBuf, volMountPointSlash.Length());
|
||||
if (volMountPointSlash.Equals(testStr)) {
|
||||
vol.forget(aResult);
|
||||
|
@ -39,8 +39,9 @@ txParseDocumentFromURI(const nsAString& aHref, const txXPathNode& aLoader,
|
||||
loadGroup, true, &theDocument);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
aErrMsg.Append(NS_LITERAL_STRING("Document load of ") +
|
||||
aHref + NS_LITERAL_STRING(" failed."));
|
||||
aErrMsg.AppendLiteral("Document load of ");
|
||||
aErrMsg.Append(aHref);
|
||||
aErrMsg.AppendLiteral(" failed.");
|
||||
return NS_FAILED(rv) ? rv : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,10 @@ txNodeTypeTest::toString(nsAString& aDest)
|
||||
{
|
||||
switch (mNodeType) {
|
||||
case COMMENT_TYPE:
|
||||
aDest.Append(NS_LITERAL_STRING("comment()"));
|
||||
aDest.AppendLiteral("comment()");
|
||||
break;
|
||||
case TEXT_TYPE:
|
||||
aDest.Append(NS_LITERAL_STRING("text()"));
|
||||
aDest.AppendLiteral("text()");
|
||||
break;
|
||||
case PI_TYPE:
|
||||
aDest.AppendLiteral("processing-instruction(");
|
||||
@ -79,7 +79,7 @@ txNodeTypeTest::toString(nsAString& aDest)
|
||||
aDest.Append(char16_t(')'));
|
||||
break;
|
||||
case NODE_TYPE:
|
||||
aDest.Append(NS_LITERAL_STRING("node()"));
|
||||
aDest.AppendLiteral("node()");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ txIdPattern::toString(nsAString& aDest)
|
||||
nsAutoString str;
|
||||
mIds[count]->ToString(str);
|
||||
aDest.Append(str);
|
||||
aDest.Append(NS_LITERAL_STRING("')"));
|
||||
aDest.AppendLiteral("')");
|
||||
#ifdef DEBUG
|
||||
aDest.Append(char16_t('}'));
|
||||
#endif
|
||||
@ -360,7 +360,7 @@ txKeyPattern::toString(nsAString& aDest)
|
||||
aDest.Append(tmp);
|
||||
aDest.AppendLiteral(", ");
|
||||
aDest.Append(mValue);
|
||||
aDest.Append(NS_LITERAL_STRING("')"));
|
||||
aDest.AppendLiteral("')");
|
||||
#ifdef DEBUG
|
||||
aDest.Append(char16_t('}'));
|
||||
#endif
|
||||
|
@ -788,7 +788,7 @@ mount_operation_ask_password (GMountOperation *mount_op,
|
||||
nsAutoString key, realm;
|
||||
|
||||
NS_ConvertUTF8toUTF16 dispHost(scheme);
|
||||
dispHost.Append(NS_LITERAL_STRING("://"));
|
||||
dispHost.AppendLiteral("://");
|
||||
dispHost.Append(NS_ConvertUTF8toUTF16(hostPort));
|
||||
|
||||
key = dispHost;
|
||||
|
@ -185,7 +185,7 @@ ProxiedAuthCallback(gconstpointer in,
|
||||
nsAutoString key, realm;
|
||||
|
||||
NS_ConvertUTF8toUTF16 dispHost(scheme);
|
||||
dispHost.Append(NS_LITERAL_STRING("://"));
|
||||
dispHost.AppendLiteral("://");
|
||||
dispHost.Append(NS_ConvertUTF8toUTF16(hostPort));
|
||||
|
||||
key = dispHost;
|
||||
|
@ -184,7 +184,7 @@ gfxDWriteFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
|
||||
if (FAILED(hr)) {
|
||||
continue;
|
||||
}
|
||||
fullID.Append(NS_LITERAL_STRING(" "));
|
||||
fullID.Append(' ');
|
||||
fullID.Append(faceName);
|
||||
|
||||
gfxDWriteFontEntry *fe = new gfxDWriteFontEntry(fullID, font);
|
||||
@ -1626,7 +1626,7 @@ DirectWriteFontInfo::LoadFontFamilyData(const nsAString& aFamilyName)
|
||||
if (FAILED(hr)) {
|
||||
continue;
|
||||
}
|
||||
fullID.Append(NS_LITERAL_STRING(" "));
|
||||
fullID.Append(' ');
|
||||
fullID.Append(fontName);
|
||||
|
||||
FontFaceData fontData;
|
||||
|
@ -5542,9 +5542,12 @@ nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
||||
if (GetType() == nsGkAtoms::subDocumentFrame) {
|
||||
nsAutoString src;
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::src, src);
|
||||
buf.Append(NS_LITERAL_STRING(" src=") + src);
|
||||
buf.AppendLiteral(" src=");
|
||||
buf.Append(src);
|
||||
}
|
||||
aResult.Append(NS_LITERAL_STRING("(") + buf + NS_LITERAL_STRING(")"));
|
||||
aResult.Append('(');
|
||||
aResult.Append(buf);
|
||||
aResult.Append(')');
|
||||
}
|
||||
char buf[40];
|
||||
PR_snprintf(buf, sizeof(buf), "(%d)", ContentIndexInContainer(this));
|
||||
|
@ -1005,7 +1005,8 @@ AddFallbackFonts(nsAString& aFontName, const nsAString& aFallbackFamilies)
|
||||
++p; // may advance past p_end
|
||||
}
|
||||
|
||||
aFontName.Append(NS_LITERAL_STRING(",") + aFallbackFamilies);
|
||||
aFontName.Append(',');
|
||||
aFontName.Append(aFallbackFamilies);
|
||||
return;
|
||||
|
||||
insert:
|
||||
|
@ -343,14 +343,14 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
AppendValueToString(eCSSProperty_border_image_slice, aValue,
|
||||
aSerialization);
|
||||
if (!widthDefault || !outsetDefault) {
|
||||
aValue.Append(NS_LITERAL_STRING(" /"));
|
||||
aValue.AppendLiteral(" /");
|
||||
if (!widthDefault) {
|
||||
aValue.Append(char16_t(' '));
|
||||
AppendValueToString(eCSSProperty_border_image_width, aValue,
|
||||
aSerialization);
|
||||
}
|
||||
if (!outsetDefault) {
|
||||
aValue.Append(NS_LITERAL_STRING(" / "));
|
||||
aValue.AppendLiteral(" / ");
|
||||
AppendValueToString(eCSSProperty_border_image_outset, aValue,
|
||||
aSerialization);
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ ImportRule::GetCssText(nsAString& aCssText)
|
||||
{
|
||||
aCssText.AssignLiteral("@import url(");
|
||||
nsStyleUtil::AppendEscapedCSSString(mURLSpec, aCssText);
|
||||
aCssText.Append(NS_LITERAL_STRING(")"));
|
||||
aCssText.Append(')');
|
||||
if (mMedia) {
|
||||
nsAutoString mediaText;
|
||||
mMedia->GetText(mediaText);
|
||||
@ -687,9 +687,9 @@ GroupRule::AppendRulesToCssText(nsAString& aCssText)
|
||||
if (domRule) {
|
||||
nsAutoString cssText;
|
||||
domRule->GetCssText(cssText);
|
||||
aCssText.Append(NS_LITERAL_STRING(" ") +
|
||||
cssText +
|
||||
NS_LITERAL_STRING("\n"));
|
||||
aCssText.AppendLiteral(" ");
|
||||
aCssText.Append(cssText);
|
||||
aCssText.Append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1311,7 +1311,7 @@ NameSpaceRule::GetCssText(nsAString& aCssText)
|
||||
}
|
||||
aCssText.AppendLiteral("url(");
|
||||
nsStyleUtil::AppendEscapedCSSString(mURLSpec, aCssText);
|
||||
aCssText.Append(NS_LITERAL_STRING(");"));
|
||||
aCssText.AppendLiteral(");");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1121,17 +1121,17 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
|
||||
}
|
||||
}
|
||||
else if (eCSSUnit_URL == unit || eCSSUnit_Image == unit) {
|
||||
aResult.Append(NS_LITERAL_STRING("url("));
|
||||
aResult.AppendLiteral("url(");
|
||||
nsStyleUtil::AppendEscapedCSSString(
|
||||
nsDependentString(GetOriginalURLValue()), aResult);
|
||||
aResult.Append(NS_LITERAL_STRING(")"));
|
||||
aResult.Append(')');
|
||||
}
|
||||
else if (eCSSUnit_Element == unit) {
|
||||
aResult.Append(NS_LITERAL_STRING("-moz-element(#"));
|
||||
aResult.AppendLiteral("-moz-element(#");
|
||||
nsAutoString tmpStr;
|
||||
GetStringValue(tmpStr);
|
||||
nsStyleUtil::AppendEscapedCSSIdent(tmpStr, aResult);
|
||||
aResult.Append(NS_LITERAL_STRING(")"));
|
||||
aResult.Append(')');
|
||||
}
|
||||
else if (eCSSUnit_Percent == unit) {
|
||||
aResult.AppendFloat(GetPercentValue() * 100.0f);
|
||||
|
@ -670,7 +670,7 @@ nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush)
|
||||
nsAutoString assertMsg(
|
||||
NS_LITERAL_STRING("we should be in a pseudo-element that is expected to contain elements ("));
|
||||
assertMsg.Append(nsDependentString(pseudoAtom->GetUTF16String()));
|
||||
assertMsg.Append(NS_LITERAL_STRING(")"));
|
||||
assertMsg.Append(')');
|
||||
NS_ASSERTION(nsCSSPseudoElements::PseudoElementContainsElements(pseudo),
|
||||
NS_LossyConvertUTF16toASCII(assertMsg).get());
|
||||
}
|
||||
@ -1314,48 +1314,48 @@ nsComputedDOMStyle::MatrixToCSSValue(gfx3DMatrix& matrix)
|
||||
|
||||
nsAutoString resultString(NS_LITERAL_STRING("matrix"));
|
||||
if (is3D) {
|
||||
resultString.Append(NS_LITERAL_STRING("3d"));
|
||||
resultString.AppendLiteral("3d");
|
||||
}
|
||||
|
||||
resultString.Append(NS_LITERAL_STRING("("));
|
||||
resultString.Append('(');
|
||||
resultString.AppendFloat(matrix._11);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._12);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
if (is3D) {
|
||||
resultString.AppendFloat(matrix._13);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._14);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
}
|
||||
resultString.AppendFloat(matrix._21);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._22);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
if (is3D) {
|
||||
resultString.AppendFloat(matrix._23);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._24);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._31);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._32);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._33);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._34);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
}
|
||||
resultString.AppendFloat(matrix._41);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._42);
|
||||
if (is3D) {
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._43);
|
||||
resultString.Append(NS_LITERAL_STRING(", "));
|
||||
resultString.AppendLiteral(", ");
|
||||
resultString.AppendFloat(matrix._44);
|
||||
}
|
||||
resultString.Append(NS_LITERAL_STRING(")"));
|
||||
resultString.Append(')');
|
||||
|
||||
/* Create a value to hold our result. */
|
||||
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
|
||||
|
@ -247,7 +247,7 @@ nsROCSSPrimitiveValue::GetCssText(nsAString& aCssText)
|
||||
tmpStr.Append(comma + colorValue);
|
||||
}
|
||||
|
||||
tmpStr.Append(NS_LITERAL_STRING(")"));
|
||||
tmpStr.Append(')');
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ nsStyleUtil::SerializeFunctionalAlternates(
|
||||
AppendEscapedCSSIdent(v.value, funcParams);
|
||||
} else {
|
||||
if (!funcParams.IsEmpty()) {
|
||||
funcParams.Append(NS_LITERAL_STRING(", "));
|
||||
funcParams.AppendLiteral(", ");
|
||||
}
|
||||
AppendEscapedCSSIdent(v.value, funcParams);
|
||||
}
|
||||
|
@ -232,11 +232,11 @@ AppendKeyPrefix(nsILoadContextInfo* aInfo, nsACString &_retval)
|
||||
*/
|
||||
|
||||
if (aInfo->IsAnonymous()) {
|
||||
_retval.Append(NS_LITERAL_CSTRING("a,"));
|
||||
_retval.AppendLiteral("a,");
|
||||
}
|
||||
|
||||
if (aInfo->IsInBrowserElement()) {
|
||||
_retval.Append(NS_LITERAL_CSTRING("b,"));
|
||||
_retval.AppendLiteral("b,");
|
||||
}
|
||||
|
||||
if (aInfo->AppId() != nsILoadContextInfo::NO_APP_ID) {
|
||||
@ -246,7 +246,7 @@ AppendKeyPrefix(nsILoadContextInfo* aInfo, nsACString &_retval)
|
||||
}
|
||||
|
||||
if (aInfo->IsPrivate()) {
|
||||
_retval.Append(NS_LITERAL_CSTRING("p,"));
|
||||
_retval.AppendLiteral("p,");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ GetCacheSessionNameForStoragePolicy(
|
||||
// recognize it too.
|
||||
sessionName.Assign(NS_LITERAL_CSTRING("other"));
|
||||
if (isPrivate)
|
||||
sessionName.Append(NS_LITERAL_CSTRING("-private"));
|
||||
sessionName.AppendLiteral("-private");
|
||||
}
|
||||
|
||||
if (appId != nsILoadContextInfo::NO_APP_ID || inBrowser) {
|
||||
|
@ -409,7 +409,7 @@ nsAboutCacheEntry::WriteCacheEntryDescription(nsICacheEntry *entry)
|
||||
if (NS_FAILED(entry->GetStorageDataSize(&dataSize)))
|
||||
dataSize = 0;
|
||||
s.AppendInt((int32_t)dataSize); // XXX nsICacheEntryInfo interfaces should be fixed.
|
||||
s.Append(NS_LITERAL_CSTRING(" B"));
|
||||
s.AppendLiteral(" B");
|
||||
APPEND_ROW("Data size", s);
|
||||
|
||||
// TODO - mayhemer
|
||||
|
@ -424,7 +424,7 @@ Http2Decompressor::OutputHeader(const nsACString &name, const nsACString &value)
|
||||
if (name.Equals(NS_LITERAL_CSTRING(":status"))) {
|
||||
nsAutoCString status(NS_LITERAL_CSTRING("HTTP/2.0 "));
|
||||
status.Append(value);
|
||||
status.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
status.AppendLiteral("\r\n");
|
||||
mOutput->Insert(status, 0);
|
||||
mHeaderStatus = value;
|
||||
} else if (name.Equals(NS_LITERAL_CSTRING(":authority"))) {
|
||||
@ -445,24 +445,24 @@ Http2Decompressor::OutputHeader(const nsACString &name, const nsACString &value)
|
||||
}
|
||||
|
||||
mOutput->Append(name);
|
||||
mOutput->Append(NS_LITERAL_CSTRING(": "));
|
||||
mOutput->AppendLiteral(": ");
|
||||
// Special handling for set-cookie according to the spec
|
||||
bool isSetCookie = name.Equals(NS_LITERAL_CSTRING("set-cookie"));
|
||||
int32_t valueLen = value.Length();
|
||||
for (int32_t i = 0; i < valueLen; ++i) {
|
||||
if (value[i] == '\0') {
|
||||
if (isSetCookie) {
|
||||
mOutput->Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
mOutput->AppendLiteral("\r\n");
|
||||
mOutput->Append(name);
|
||||
mOutput->Append(NS_LITERAL_CSTRING(": "));
|
||||
mOutput->AppendLiteral(": ");
|
||||
} else {
|
||||
mOutput->Append(NS_LITERAL_CSTRING(", "));
|
||||
mOutput->AppendLiteral(", ");
|
||||
}
|
||||
} else {
|
||||
mOutput->Append(value[i]);
|
||||
}
|
||||
}
|
||||
mOutput->Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
mOutput->AppendLiteral("\r\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -249,13 +249,13 @@ Http2Stream::CreatePushHashKey(const nsCString &scheme,
|
||||
nsCString &outKey)
|
||||
{
|
||||
outOrigin = scheme;
|
||||
outOrigin.Append(NS_LITERAL_CSTRING("://"));
|
||||
outOrigin.AppendLiteral("://");
|
||||
outOrigin.Append(hostHeader);
|
||||
|
||||
outKey = outOrigin;
|
||||
outKey.Append(NS_LITERAL_CSTRING("/[http2."));
|
||||
outKey.AppendLiteral("/[http2.");
|
||||
outKey.AppendInt(serial);
|
||||
outKey.Append(NS_LITERAL_CSTRING("]"));
|
||||
outKey.Append(']');
|
||||
outKey.Append(pathInfo);
|
||||
}
|
||||
|
||||
@ -876,7 +876,7 @@ Http2Stream::ConvertResponseHeaders(Http2Decompressor *decompressor,
|
||||
}
|
||||
|
||||
aHeadersIn.Truncate();
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("X-Firefox-Spdy: " NS_HTTP2_DRAFT_TOKEN "\r\n\r\n"));
|
||||
aHeadersOut.Append("X-Firefox-Spdy: " NS_HTTP2_DRAFT_TOKEN "\r\n\r\n");
|
||||
LOG (("decoded response headers are:\n%s", aHeadersOut.BeginReading()));
|
||||
if (mIsTunnel) {
|
||||
aHeadersOut.Truncate();
|
||||
|
@ -1730,7 +1730,8 @@ HttpBaseChannel::AddCookiesToRequest()
|
||||
cookie = mUserSetCookieHeader;
|
||||
}
|
||||
else if (!mUserSetCookieHeader.IsEmpty()) {
|
||||
cookie.Append(NS_LITERAL_CSTRING("; ") + mUserSetCookieHeader);
|
||||
cookie.AppendLiteral("; ");
|
||||
cookie.Append(mUserSetCookieHeader);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -236,13 +236,13 @@ SpdyStream3::CreatePushHashKey(const nsCString &scheme,
|
||||
nsCString &outKey)
|
||||
{
|
||||
outOrigin = scheme;
|
||||
outOrigin.Append(NS_LITERAL_CSTRING("://"));
|
||||
outOrigin.AppendLiteral("://");
|
||||
outOrigin.Append(hostHeader);
|
||||
|
||||
outKey = outOrigin;
|
||||
outKey.Append(NS_LITERAL_CSTRING("/[spdy3."));
|
||||
outKey.AppendLiteral("/[spdy3.");
|
||||
outKey.AppendInt(serial);
|
||||
outKey.Append(NS_LITERAL_CSTRING("]"));
|
||||
outKey.Append(']');
|
||||
outKey.Append(pathInfo);
|
||||
}
|
||||
|
||||
@ -1163,9 +1163,9 @@ SpdyStream3::ConvertHeaders(nsACString &aHeadersOut)
|
||||
// create UI feedback.
|
||||
|
||||
aHeadersOut.Append(version);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(" "));
|
||||
aHeadersOut.Append(' ');
|
||||
aHeadersOut.Append(status);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
|
||||
const unsigned char *nvpair = reinterpret_cast<unsigned char *>
|
||||
(mDecompressBuffer.get()) + 4;
|
||||
@ -1244,7 +1244,7 @@ SpdyStream3::ConvertHeaders(nsACString &aHeadersOut)
|
||||
valueLen);
|
||||
|
||||
aHeadersOut.Append(nameString);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(": "));
|
||||
aHeadersOut.AppendLiteral(": ");
|
||||
|
||||
// expand nullptr bytes in the value string
|
||||
for (char *cPtr = valueString.BeginWriting();
|
||||
@ -1256,12 +1256,12 @@ SpdyStream3::ConvertHeaders(nsACString &aHeadersOut)
|
||||
}
|
||||
|
||||
// NULLs are really "\r\nhdr: "
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
aHeadersOut.Append(nameString);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(": "));
|
||||
aHeadersOut.AppendLiteral(": ");
|
||||
}
|
||||
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
}
|
||||
// move to the next name/value pair in this block
|
||||
nvpair += 8 + nameLen + valueLen;
|
||||
@ -1272,7 +1272,7 @@ SpdyStream3::ConvertHeaders(nsACString &aHeadersOut)
|
||||
nvpair += 4;
|
||||
} while (lastHeaderByte >= nvpair);
|
||||
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("X-Firefox-Spdy: 3\r\n\r\n"));
|
||||
aHeadersOut.AppendLiteral("X-Firefox-Spdy: 3\r\n\r\n");
|
||||
LOG (("decoded response headers are:\n%s",
|
||||
aHeadersOut.BeginReading()));
|
||||
|
||||
|
@ -241,13 +241,13 @@ SpdyStream31::CreatePushHashKey(const nsCString &scheme,
|
||||
nsCString &outKey)
|
||||
{
|
||||
outOrigin = scheme;
|
||||
outOrigin.Append(NS_LITERAL_CSTRING("://"));
|
||||
outOrigin.AppendLiteral("://");
|
||||
outOrigin.Append(hostHeader);
|
||||
|
||||
outKey = outOrigin;
|
||||
outKey.Append(NS_LITERAL_CSTRING("/[spdy3_1."));
|
||||
outKey.AppendLiteral("/[spdy3_1.");
|
||||
outKey.AppendInt(serial);
|
||||
outKey.Append(NS_LITERAL_CSTRING("]"));
|
||||
outKey.Append(']');
|
||||
outKey.Append(pathInfo);
|
||||
}
|
||||
|
||||
@ -1179,9 +1179,9 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut)
|
||||
// create UI feedback.
|
||||
|
||||
aHeadersOut.Append(version);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(" "));
|
||||
aHeadersOut.Append(' ');
|
||||
aHeadersOut.Append(status);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
|
||||
const unsigned char *nvpair = reinterpret_cast<unsigned char *>
|
||||
(mDecompressBuffer.get()) + 4;
|
||||
@ -1260,7 +1260,7 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut)
|
||||
valueLen);
|
||||
|
||||
aHeadersOut.Append(nameString);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(": "));
|
||||
aHeadersOut.AppendLiteral(": ");
|
||||
|
||||
// expand NULL bytes in the value string
|
||||
for (char *cPtr = valueString.BeginWriting();
|
||||
@ -1272,12 +1272,12 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut)
|
||||
}
|
||||
|
||||
// NULLs are really "\r\nhdr: "
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
aHeadersOut.Append(nameString);
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING(": "));
|
||||
aHeadersOut.AppendLiteral(": ");
|
||||
}
|
||||
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
aHeadersOut.AppendLiteral("\r\n");
|
||||
}
|
||||
// move to the next name/value pair in this block
|
||||
nvpair += 8 + nameLen + valueLen;
|
||||
@ -1288,7 +1288,7 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut)
|
||||
nvpair += 4;
|
||||
} while (lastHeaderByte >= nvpair);
|
||||
|
||||
aHeadersOut.Append(NS_LITERAL_CSTRING("X-Firefox-Spdy: 3.1\r\n\r\n"));
|
||||
aHeadersOut.AppendLiteral("X-Firefox-Spdy: 3.1\r\n\r\n");
|
||||
LOG (("decoded response headers are:\n%s",
|
||||
aHeadersOut.BeginReading()));
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
{
|
||||
mBuf.Assign(NS_LITERAL_CSTRING("GET "));
|
||||
mBuf.Append(path);
|
||||
mBuf.Append(NS_LITERAL_CSTRING(" HTTP/1.0\r\n\r\n"));
|
||||
mBuf.AppendLiteral(" HTTP/1.0\r\n\r\n");
|
||||
}
|
||||
virtual ~MyHandler() {}
|
||||
|
||||
|
@ -297,7 +297,7 @@ main(int argc, char* argv[])
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoCString newName(leafName);
|
||||
newName.Append(NS_LITERAL_CSTRING(".1"));
|
||||
newName.AppendLiteral(".1");
|
||||
rv = destFile->SetNativeLeafName(newName);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
@ -305,7 +305,7 @@ main(int argc, char* argv[])
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "RunTest failed");
|
||||
|
||||
newName = leafName;
|
||||
newName.Append(NS_LITERAL_CSTRING(".2"));
|
||||
newName.AppendLiteral(".2");
|
||||
rv = destFile->SetNativeLeafName(newName);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -937,7 +937,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
nsAutoString klass;
|
||||
node->GetAttr(kNameSpaceID_None, nsGkAtoms::_class, klass);
|
||||
if (!klass.IsEmpty()) {
|
||||
klass.Append(NS_LITERAL_STRING(" error"));
|
||||
klass.AppendLiteral(" error");
|
||||
node->SetAttr(kNameSpaceID_None, nsGkAtoms::_class, klass, true);
|
||||
} else {
|
||||
node->SetAttr(kNameSpaceID_None,
|
||||
|
@ -169,8 +169,8 @@ nsParserUtils::ParseFragment(const nsAString& aFragment,
|
||||
if (aIsXML) {
|
||||
// XHTML
|
||||
if (aBaseURI) {
|
||||
base.Append(NS_LITERAL_CSTRING(XHTML_DIV_TAG));
|
||||
base.Append(NS_LITERAL_CSTRING(" xml:base=\""));
|
||||
base.AppendLiteral(XHTML_DIV_TAG);
|
||||
base.AppendLiteral(" xml:base=\"");
|
||||
aBaseURI->GetSpec(spec);
|
||||
// nsEscapeHTML is good enough, because we only need to get
|
||||
// quotes, ampersands, and angle brackets
|
||||
@ -178,7 +178,7 @@ nsParserUtils::ParseFragment(const nsAString& aFragment,
|
||||
if (escapedSpec)
|
||||
base += escapedSpec;
|
||||
NS_Free(escapedSpec);
|
||||
base.Append(NS_LITERAL_CSTRING("\""));
|
||||
base.Append('"');
|
||||
tagStack.AppendElement(NS_ConvertUTF8toUTF16(base));
|
||||
} else {
|
||||
tagStack.AppendElement(NS_LITERAL_STRING(XHTML_DIV_TAG));
|
||||
|
@ -590,7 +590,7 @@ formatPlainErrorMessage(const nsXPIDLCString &host, int32_t port,
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n\n"));
|
||||
returnedMessage.AppendLiteral("\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ AppendErrorTextUntrusted(PRErrorCode errTrust,
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@ -702,7 +702,7 @@ GetSubjectAltNames(CERTCertificate *nssCert,
|
||||
case certDNSName:
|
||||
name.AssignASCII((char*)current->name.other.data, current->name.other.len);
|
||||
if (!allNames.IsEmpty()) {
|
||||
allNames.Append(NS_LITERAL_STRING(", "));
|
||||
allNames.AppendLiteral(", ");
|
||||
}
|
||||
++nameCount;
|
||||
allNames.Append(name);
|
||||
@ -727,7 +727,7 @@ GetSubjectAltNames(CERTCertificate *nssCert,
|
||||
}
|
||||
if (!name.IsEmpty()) {
|
||||
if (!allNames.IsEmpty()) {
|
||||
allNames.Append(NS_LITERAL_STRING(", "));
|
||||
allNames.AppendLiteral(", ");
|
||||
}
|
||||
++nameCount;
|
||||
allNames.Append(name);
|
||||
@ -770,7 +770,7 @@ AppendErrorTextMismatch(const nsString &host,
|
||||
formattedString);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -803,9 +803,9 @@ AppendErrorTextMismatch(const nsString &host,
|
||||
message);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(message);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n "));
|
||||
returnedMessage.AppendLiteral("\n ");
|
||||
returnedMessage.Append(allNames);
|
||||
returnedMessage.Append(NS_LITERAL_STRING(" \n"));
|
||||
returnedMessage.AppendLiteral(" \n");
|
||||
}
|
||||
}
|
||||
else if (nameCount == 1) {
|
||||
@ -824,7 +824,7 @@ AppendErrorTextMismatch(const nsString &host,
|
||||
formattedString);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
}
|
||||
else { // nameCount == 0
|
||||
@ -833,7 +833,7 @@ AppendErrorTextMismatch(const nsString &host,
|
||||
message);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(message);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -908,7 +908,7 @@ AppendErrorTextTime(nsIX509Cert* ix509,
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@ -933,14 +933,14 @@ AppendErrorTextCode(PRErrorCode errorCodeToReport,
|
||||
params, 1,
|
||||
formattedString);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
else {
|
||||
returnedMessage.Append(NS_LITERAL_STRING(" ("));
|
||||
returnedMessage.AppendLiteral(" (");
|
||||
returnedMessage.Append(idU);
|
||||
returnedMessage.Append(NS_LITERAL_STRING(")"));
|
||||
returnedMessage.Append(')');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -989,7 +989,7 @@ formatOverridableCertErrorMessage(nsISSLStatus & sslStatus,
|
||||
returnedMessage);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n\n"));
|
||||
returnedMessage.AppendLiteral("\n\n");
|
||||
|
||||
RefPtr<nsIX509Cert> ix509;
|
||||
rv = sslStatus.GetServerCert(byRef(ix509));
|
||||
|
@ -1207,7 +1207,7 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) {
|
||||
|
||||
nsAutoString msg;
|
||||
msg.Append(NS_ConvertASCIItoUTF16(hostName));
|
||||
msg.Append(NS_LITERAL_STRING(" : server does not support RFC 5746, see CVE-2009-3555"));
|
||||
msg.AppendLiteral(" : server does not support RFC 5746, see CVE-2009-3555");
|
||||
|
||||
nsContentUtils::LogSimpleConsoleError(msg, "SSL");
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ ProcessRawBytes(nsINSSComponent *nssComponent, SECItem *data,
|
||||
nsAutoString value;
|
||||
value.AppendInt(i_pv);
|
||||
text.Append(value);
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -652,7 +652,7 @@ ProcessRawBytes(nsINSSComponent *nssComponent, SECItem *data,
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
|
||||
// This prints the value of the byte out into a
|
||||
@ -666,7 +666,7 @@ ProcessRawBytes(nsINSSComponent *nssComponent, SECItem *data,
|
||||
PR_snprintf(buffer, 5, "%02x ", data->data[i]);
|
||||
AppendASCIItoUTF16(buffer, text);
|
||||
if ((i+1)%16 == 0) {
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
@ -692,37 +692,37 @@ ProcessNSCertTypeExtensions(SECItem *extData,
|
||||
if (nsCertType & NS_CERT_TYPE_SSL_CLIENT) {
|
||||
nssComponent->GetPIPNSSBundleString("VerifySSLClient", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_SSL_SERVER) {
|
||||
nssComponent->GetPIPNSSBundleString("VerifySSLServer", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_EMAIL) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpCertTypeEmail", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_OBJECT_SIGNING) {
|
||||
nssComponent->GetPIPNSSBundleString("VerifyObjSign", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_SSL_CA) {
|
||||
nssComponent->GetPIPNSSBundleString("VerifySSLCA", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_EMAIL_CA) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpEmailCA", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (nsCertType & NS_CERT_TYPE_OBJECT_SIGNING_CA) {
|
||||
nssComponent->GetPIPNSSBundleString("VerifyObjSign", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -746,37 +746,37 @@ ProcessKeyUsageExtension(SECItem *extData, nsAString &text,
|
||||
if (keyUsage & KU_DIGITAL_SIGNATURE) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUSign", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_NON_REPUDIATION) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUNonRep", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_KEY_ENCIPHERMENT) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUEnc", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_DATA_ENCIPHERMENT) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUDEnc", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_KEY_AGREEMENT) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUKA", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_KEY_CERT_SIGN) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUCertSign", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (keyUsage & KU_CRL_SIGN) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKUCRLSigner", local);
|
||||
text.Append(local.get());
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -816,7 +816,7 @@ ProcessBasicConstraints(SECItem *extData,
|
||||
params, 1, local);
|
||||
if (NS_FAILED(rv2))
|
||||
return rv2;
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
text.Append(local.get());
|
||||
}
|
||||
return NS_OK;
|
||||
@ -856,14 +856,14 @@ ProcessExtKeyUsage(SECItem *extData,
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// display name and OID in parentheses
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(" ("));
|
||||
text.AppendLiteral(" (");
|
||||
text.Append(oidname);
|
||||
text.Append(NS_LITERAL_STRING(")"));
|
||||
text.Append(')');
|
||||
} else
|
||||
// If there is no bundle string, just display the OID itself
|
||||
text.Append(oidname);
|
||||
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
oids++;
|
||||
}
|
||||
|
||||
@ -1140,9 +1140,9 @@ ProcessGeneralName(PLArenaPool *arena,
|
||||
break;
|
||||
}
|
||||
text.Append(key);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
text.Append(value);
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
finish:
|
||||
return rv;
|
||||
}
|
||||
@ -1212,7 +1212,7 @@ ProcessSubjectKeyId(SECItem *extData,
|
||||
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKeyID", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
ProcessRawBytes(nssComponent, &decoded, text);
|
||||
|
||||
finish:
|
||||
@ -1243,15 +1243,15 @@ ProcessAuthKeyId(SECItem *extData,
|
||||
if (ret->keyID.len > 0) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKeyID", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
ProcessRawBytes(nssComponent, &ret->keyID, text);
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
|
||||
if (ret->authCertIssuer) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpIssuer", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
rv = ProcessGeneralNames(arena, ret->authCertIssuer, text, nssComponent);
|
||||
if (NS_FAILED(rv))
|
||||
goto finish;
|
||||
@ -1260,7 +1260,7 @@ ProcessAuthKeyId(SECItem *extData,
|
||||
if (ret->authCertSerialNumber.len > 0) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpSerialNo", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
ProcessRawBytes(nssComponent, &ret->authCertSerialNumber, text);
|
||||
}
|
||||
|
||||
@ -1304,7 +1304,7 @@ ProcessUserNotice(SECItem *der_notice,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
text.Append(NS_LITERAL_STRING(" - "));
|
||||
text.AppendLiteral(" - ");
|
||||
itemList = notice->noticeReference.noticeNumbers;
|
||||
while (*itemList) {
|
||||
unsigned long number;
|
||||
@ -1312,15 +1312,15 @@ ProcessUserNotice(SECItem *der_notice,
|
||||
if (SEC_ASN1DecodeInteger(*itemList, &number) == SECSuccess) {
|
||||
PR_snprintf(buffer, sizeof(buffer), "#%d", number);
|
||||
if (itemList != notice->noticeReference.noticeNumbers)
|
||||
text.Append(NS_LITERAL_STRING(", "));
|
||||
text.AppendLiteral(", ");
|
||||
AppendASCIItoUTF16(buffer, text);
|
||||
}
|
||||
itemList++;
|
||||
}
|
||||
}
|
||||
if (notice->displayText.len != 0) {
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.Append(NS_LITERAL_STRING(" "));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
text.AppendLiteral(" ");
|
||||
switch (notice->displayText.type) {
|
||||
case siAsciiString:
|
||||
case siVisibleString:
|
||||
@ -1379,8 +1379,8 @@ ProcessCertificatePolicies(SECItem *extData,
|
||||
// next to the correct OID.
|
||||
|
||||
if (policyInfo->oid == ev_oid_tag) {
|
||||
text.Append(NS_LITERAL_STRING(":"));
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.Append(':');
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
needColon = false;
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpPolicyOidEV", local);
|
||||
text.Append(local);
|
||||
@ -1391,18 +1391,18 @@ ProcessCertificatePolicies(SECItem *extData,
|
||||
/* Add all qualifiers on separate lines, indented */
|
||||
policyQualifiers = policyInfo->policyQualifiers;
|
||||
if (needColon)
|
||||
text.Append(NS_LITERAL_STRING(":"));
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.Append(':');
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
while (*policyQualifiers) {
|
||||
text.Append(NS_LITERAL_STRING(" "));
|
||||
text.AppendLiteral(" ");
|
||||
policyQualifier = *policyQualifiers++;
|
||||
switch(policyQualifier->oid) {
|
||||
case SEC_OID_PKIX_CPS_POINTER_QUALIFIER:
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpCPSPointer", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(":"));
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.Append(NS_LITERAL_STRING(" "));
|
||||
text.Append(':');
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
text.AppendLiteral(" ");
|
||||
/* The CPS pointer ought to be the cPSuri alternative
|
||||
of the Qualifier choice. */
|
||||
rv = ProcessIA5String(&policyQualifier->qualifierValue,
|
||||
@ -1413,20 +1413,20 @@ ProcessCertificatePolicies(SECItem *extData,
|
||||
case SEC_OID_PKIX_USER_NOTICE_QUALIFIER:
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpUserNotice", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
rv = ProcessUserNotice(&policyQualifier->qualifierValue,
|
||||
text, nssComponent);
|
||||
break;
|
||||
default:
|
||||
GetDefaultOIDFormat(&policyQualifier->qualifierID, nssComponent, local, '.');
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
ProcessRawBytes(nssComponent, &policyQualifier->qualifierValue, text);
|
||||
}
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
} /* while policyQualifiers */
|
||||
} /* if policyQualifiers */
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
|
||||
finish:
|
||||
@ -1474,48 +1474,48 @@ ProcessCrlDistPoints(SECItem *extData,
|
||||
}
|
||||
if (point->reasons.len) {
|
||||
reasons = point->reasons.data[0];
|
||||
text.Append(NS_LITERAL_STRING(" "));
|
||||
text.Append(' ');
|
||||
comma = 0;
|
||||
if (reasons & RF_UNUSED) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpUnused", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_KEY_COMPROMISE) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpKeyCompromise", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_CA_COMPROMISE) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpCACompromise", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_AFFILIATION_CHANGED) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpAffiliationChanged", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_SUPERSEDED) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpSuperseded", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_CESSATION_OF_OPERATION) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpCessation", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
if (reasons & RF_CERTIFICATE_HOLD) {
|
||||
if (comma) text.Append(NS_LITERAL_STRING(", "));
|
||||
if (comma) text.AppendLiteral(", ");
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpHold", local);
|
||||
text.Append(local); comma = 1;
|
||||
}
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR));
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
}
|
||||
if (point->crlIssuer) {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpIssuer", local);
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
rv = ProcessGeneralNames(arena, point->crlIssuer,
|
||||
text, nssComponent);
|
||||
if (NS_FAILED(rv))
|
||||
@ -1561,7 +1561,7 @@ ProcessAuthInfoAccess(SECItem *extData,
|
||||
goto finish;
|
||||
}
|
||||
text.Append(local);
|
||||
text.Append(NS_LITERAL_STRING(": "));
|
||||
text.AppendLiteral(": ");
|
||||
rv = ProcessGeneralName(arena, desc->location, text, nssComponent);
|
||||
if (NS_FAILED(rv))
|
||||
goto finish;
|
||||
@ -1690,7 +1690,7 @@ ProcessSingleExtension(CERTCertExtension *extension,
|
||||
} else {
|
||||
nssComponent->GetPIPNSSBundleString("CertDumpNonCritical", text);
|
||||
}
|
||||
text.Append(NS_LITERAL_STRING(SEPARATOR).get());
|
||||
text.AppendLiteral(SEPARATOR);
|
||||
nsresult rv = ProcessExtensionData(oidTag, &extension->value, extvalue,
|
||||
ev_oid_tag, nssComponent);
|
||||
if (NS_FAILED(rv)) {
|
||||
@ -1780,7 +1780,7 @@ ProcessTime(PRTime dispTime, const char16_t *displayName,
|
||||
&explodedTimeGMT, tempString);
|
||||
|
||||
text.Append(tempString);
|
||||
text.Append(NS_LITERAL_STRING(" GMT)"));
|
||||
text.AppendLiteral(" GMT)");
|
||||
|
||||
nsCOMPtr<nsIASN1PrintableItem> printableItem = new nsNSSASN1PrintableItem();
|
||||
|
||||
@ -2202,10 +2202,10 @@ getNSSCertNicknamesFromCertList(CERTCertList *certList)
|
||||
nssComponent->GetPIPNSSBundleString("NicknameExpired", expiredString);
|
||||
nssComponent->GetPIPNSSBundleString("NicknameNotYetValid", notYetValidString);
|
||||
|
||||
expiredStringLeadingSpace.Append(NS_LITERAL_STRING(" "));
|
||||
expiredStringLeadingSpace.Append(' ');
|
||||
expiredStringLeadingSpace.Append(expiredString);
|
||||
|
||||
notYetValidStringLeadingSpace.Append(NS_LITERAL_STRING(" "));
|
||||
notYetValidStringLeadingSpace.Append(' ');
|
||||
notYetValidStringLeadingSpace.Append(notYetValidString);
|
||||
|
||||
NS_ConvertUTF16toUTF8 aUtf8ExpiredString(expiredStringLeadingSpace);
|
||||
|
@ -63,7 +63,7 @@ nsNSSErrors::getErrorMessageFromCode(PRErrorCode err,
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
returnedMessage.Append(defMsg);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ nsNSSErrors::getErrorMessageFromCode(PRErrorCode err,
|
||||
{
|
||||
// no localized string available, use NSS' internal
|
||||
returnedMessage.AppendASCII(PR_ErrorToString(err, PR_LANGUAGE_EN));
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
|
||||
if (nss_error_id_str)
|
||||
@ -89,14 +89,14 @@ nsNSSErrors::getErrorMessageFromCode(PRErrorCode err,
|
||||
params, 1,
|
||||
formattedString);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
returnedMessage.Append(formattedString);
|
||||
returnedMessage.Append(NS_LITERAL_STRING("\n"));
|
||||
returnedMessage.Append('\n');
|
||||
}
|
||||
else {
|
||||
returnedMessage.Append(NS_LITERAL_STRING("("));
|
||||
returnedMessage.Append('(');
|
||||
returnedMessage.Append(idU);
|
||||
returnedMessage.Append(NS_LITERAL_STRING(")"));
|
||||
returnedMessage.Append(')');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ AsyncBindingParams::iterateOverNamedParameters(const nsACString &aName,
|
||||
|
||||
if (oneIdx == 0) {
|
||||
nsAutoCString errMsg(aName);
|
||||
errMsg.Append(NS_LITERAL_CSTRING(" is not a valid named parameter."));
|
||||
errMsg.AppendLiteral(" is not a valid named parameter.");
|
||||
closureThunk->err = new Error(SQLITE_RANGE, errMsg.get());
|
||||
return PL_DHASH_STOP;
|
||||
}
|
||||
|
@ -1774,10 +1774,10 @@ PlacesSQLQueryBuilder::SelectAsDay()
|
||||
mQueryString.Append(dayRange);
|
||||
|
||||
if (i < HISTORY_DATE_CONT_NUM(daysOfHistory))
|
||||
mQueryString.Append(NS_LITERAL_CSTRING(" UNION ALL "));
|
||||
mQueryString.AppendLiteral(" UNION ALL ");
|
||||
}
|
||||
|
||||
mQueryString.Append(NS_LITERAL_CSTRING(") ")); // TOUTER END
|
||||
mQueryString.AppendLiteral(") "); // TOUTER END
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -2108,13 +2108,13 @@ nsNavHistory::ConstructQueryString(
|
||||
"{QUERY_OPTIONS} "
|
||||
);
|
||||
|
||||
queryString.Append(NS_LITERAL_CSTRING("ORDER BY "));
|
||||
queryString.AppendLiteral("ORDER BY ");
|
||||
if (sortingMode == nsINavHistoryQueryOptions::SORT_BY_DATE_DESCENDING)
|
||||
queryString.Append(NS_LITERAL_CSTRING("last_visit_date DESC "));
|
||||
queryString.AppendLiteral("last_visit_date DESC ");
|
||||
else
|
||||
queryString.Append(NS_LITERAL_CSTRING("visit_count DESC "));
|
||||
queryString.AppendLiteral("visit_count DESC ");
|
||||
|
||||
queryString.Append(NS_LITERAL_CSTRING("LIMIT "));
|
||||
queryString.AppendLiteral("LIMIT ");
|
||||
queryString.AppendInt(aOptions->MaxResults());
|
||||
|
||||
nsAutoCString additionalQueryOptions;
|
||||
@ -2562,7 +2562,7 @@ nsNavHistory::RemovePagesFromHost(const nsACString& aHost, bool aEntireDomain)
|
||||
NS_ASSERTION(revHostDot[revHostDot.Length() - 1] == '.', "Invalid rev. host");
|
||||
nsAutoString revHostSlash(revHostDot);
|
||||
revHostSlash.Truncate(revHostSlash.Length() - 1);
|
||||
revHostSlash.Append(NS_LITERAL_STRING("/"));
|
||||
revHostSlash.Append('/');
|
||||
|
||||
// build condition string based on host selection type
|
||||
nsAutoCString conditionString;
|
||||
@ -3663,11 +3663,11 @@ CreatePlacesPersistURN(nsNavHistoryQueryResultNode *aResultNode,
|
||||
aURN.Assign(NS_LITERAL_CSTRING("urn:places-persist:"));
|
||||
aURN.Append(uri);
|
||||
|
||||
aURN.Append(NS_LITERAL_CSTRING(","));
|
||||
aURN.Append(',');
|
||||
if (aValue != UNDEFINED_URN_VALUE)
|
||||
aURN.AppendInt(aValue);
|
||||
|
||||
aURN.Append(NS_LITERAL_CSTRING(","));
|
||||
aURN.Append(',');
|
||||
if (!aTitle.IsEmpty()) {
|
||||
nsAutoCString escapedTitle;
|
||||
bool success = NS_Escape(aTitle, escapedTitle, url_XAlphas);
|
||||
|
@ -386,14 +386,14 @@ nsNavHistory::QueriesToQueryString(nsINavHistoryQuery **aQueries,
|
||||
int32_t minVisits;
|
||||
if (NS_SUCCEEDED(query->GetMinVisits(&minVisits)) && minVisits >= 0) {
|
||||
AppendAmpersandIfNonempty(queryString);
|
||||
queryString.Append(NS_LITERAL_CSTRING(QUERYKEY_MIN_VISITS "="));
|
||||
queryString.AppendLiteral(QUERYKEY_MIN_VISITS "=");
|
||||
AppendInt32(queryString, minVisits);
|
||||
}
|
||||
|
||||
int32_t maxVisits;
|
||||
if (NS_SUCCEEDED(query->GetMaxVisits(&maxVisits)) && maxVisits >= 0) {
|
||||
AppendAmpersandIfNonempty(queryString);
|
||||
queryString.Append(NS_LITERAL_CSTRING(QUERYKEY_MAX_VISITS "="));
|
||||
queryString.AppendLiteral(QUERYKEY_MAX_VISITS "=");
|
||||
AppendInt32(queryString, maxVisits);
|
||||
}
|
||||
|
||||
@ -418,7 +418,7 @@ nsNavHistory::QueriesToQueryString(nsINavHistoryQuery **aQueries,
|
||||
NS_ENSURE_TRUE(success, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
AppendAmpersandIfNonempty(queryString);
|
||||
queryString.Append(NS_LITERAL_CSTRING(QUERYKEY_DOMAIN "="));
|
||||
queryString.AppendLiteral(QUERYKEY_DOMAIN "=");
|
||||
queryString.Append(escapedDomain);
|
||||
}
|
||||
|
||||
@ -439,7 +439,7 @@ nsNavHistory::QueriesToQueryString(nsINavHistoryQuery **aQueries,
|
||||
NS_ENSURE_TRUE(success, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
AppendAmpersandIfNonempty(queryString);
|
||||
queryString.Append(NS_LITERAL_CSTRING(QUERYKEY_URI "="));
|
||||
queryString.AppendLiteral(QUERYKEY_URI "=");
|
||||
queryString.Append(escaped);
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ AddonHistogramName(const nsACString &id, const nsACString &name,
|
||||
nsACString &ret)
|
||||
{
|
||||
ret.Append(id);
|
||||
ret.Append(NS_LITERAL_CSTRING(":"));
|
||||
ret.Append(':');
|
||||
ret.Append(name);
|
||||
}
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel)
|
||||
|
||||
// Add an additional .part to prevent the OS from running this file in the
|
||||
// default application.
|
||||
tempLeafName.Append(NS_LITERAL_CSTRING(".part"));
|
||||
tempLeafName.AppendLiteral(".part");
|
||||
|
||||
rv = mTempFile->Append(NS_ConvertUTF8toUTF16(tempLeafName));
|
||||
// make this file unique!!!
|
||||
|
@ -793,7 +793,7 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(nsIArray **_retval)
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString openWithListPath(NS_LITERAL_STRING("SystemFileAssociations\\"));
|
||||
openWithListPath.Append(perceivedType); // no period
|
||||
openWithListPath.Append(NS_LITERAL_STRING("\\OpenWithList"));
|
||||
openWithListPath.AppendLiteral("\\OpenWithList");
|
||||
|
||||
nsresult rv = appKey->Open(nsIWindowsRegKey::ROOT_KEY_CLASSES_ROOT,
|
||||
openWithListPath,
|
||||
|
@ -108,7 +108,7 @@ LogToConsole(const char * message, nsOfflineCacheUpdateItem * item = nullptr)
|
||||
nsAutoCString uriSpec;
|
||||
item->mURI->GetSpec(uriSpec);
|
||||
|
||||
messageUTF16.Append(NS_LITERAL_STRING(", URL="));
|
||||
messageUTF16.AppendLiteral(", URL=");
|
||||
messageUTF16.Append(NS_ConvertUTF8toUTF16(uriSpec));
|
||||
}
|
||||
consoleService->LogStringMessage(messageUTF16.get());
|
||||
|
@ -359,7 +359,7 @@ nsresult JumpListShortcut::GetShellLink(nsCOMPtr<nsIJumpListItem>& item,
|
||||
handlerApp->GetParameterCount(&count);
|
||||
for (uint32_t idx = 0; idx < count; idx++) {
|
||||
if (idx > 0)
|
||||
appArgs.Append(NS_LITERAL_STRING(" "));
|
||||
appArgs.Append(' ');
|
||||
nsAutoString param;
|
||||
rv = handlerApp->GetParameter(idx, param);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -571,12 +571,12 @@ VisualEventTracerLog::GetJSONString(nsACString& aResult)
|
||||
while (batch) {
|
||||
if (batch != mBatch) {
|
||||
// This is not the first batch we are writting, add comma
|
||||
buffer.Append(NS_LITERAL_CSTRING(",\n"));
|
||||
buffer.AppendLiteral(",\n");
|
||||
}
|
||||
|
||||
buffer.Append(NS_LITERAL_CSTRING("{\"thread\":\""));
|
||||
buffer.AppendLiteral("{\"thread\":\"");
|
||||
buffer.Append(batch->mThreadNameCopy);
|
||||
buffer.Append(NS_LITERAL_CSTRING("\",\"log\":[\n"));
|
||||
buffer.AppendLiteral("\",\"log\":[\n");
|
||||
|
||||
static const int kBufferSize = 2048;
|
||||
char buf[kBufferSize];
|
||||
@ -603,13 +603,13 @@ VisualEventTracerLog::GetJSONString(nsACString& aResult)
|
||||
buffer.Append(buf);
|
||||
}
|
||||
|
||||
buffer.Append(NS_LITERAL_CSTRING("]}\n"));
|
||||
buffer.AppendLiteral("]}\n");
|
||||
|
||||
RecordBatch* next = batch->mNextBatch;
|
||||
batch = next;
|
||||
}
|
||||
|
||||
buffer.Append(NS_LITERAL_CSTRING("]}\n"));
|
||||
buffer.AppendLiteral("]}\n");
|
||||
aResult.Assign(buffer);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -61,28 +61,28 @@ nsMacUtilsImpl::GetArchString(nsAString& aArchString)
|
||||
// The order in the string must always be the same so
|
||||
// don't do this in the loop.
|
||||
if (foundPPC) {
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("ppc"));
|
||||
mBinaryArchs.AppendLiteral("ppc");
|
||||
}
|
||||
|
||||
if (foundX86) {
|
||||
if (!mBinaryArchs.IsEmpty()) {
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("-"));
|
||||
mBinaryArchs.Append('-');
|
||||
}
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("i386"));
|
||||
mBinaryArchs.AppendLiteral("i386");
|
||||
}
|
||||
|
||||
if (foundPPC64) {
|
||||
if (!mBinaryArchs.IsEmpty()) {
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("-"));
|
||||
mBinaryArchs.Append('-');
|
||||
}
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("ppc64"));
|
||||
mBinaryArchs.AppendLiteral("ppc64");
|
||||
}
|
||||
|
||||
if (foundX86_64) {
|
||||
if (!mBinaryArchs.IsEmpty()) {
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("-"));
|
||||
mBinaryArchs.Append('-');
|
||||
}
|
||||
mBinaryArchs.Append(NS_LITERAL_STRING("x86_64"));
|
||||
mBinaryArchs.AppendLiteral("x86_64");
|
||||
}
|
||||
|
||||
aArchString.Assign(mBinaryArchs);
|
||||
|
@ -323,7 +323,7 @@ nsThreadPoolNaming::SetThreadPoolName(const nsACString & aPoolName,
|
||||
nsIThread * aThread)
|
||||
{
|
||||
nsCString name(aPoolName);
|
||||
name.Append(NS_LITERAL_CSTRING(" #"));
|
||||
name.AppendLiteral(" #");
|
||||
name.AppendInt(++mCounter, 10); // The counter is declared as volatile
|
||||
|
||||
if (aThread) {
|
||||
|
@ -530,11 +530,10 @@ nsLocalFile::AppendRelativeNativePath(const nsACString& aFragment)
|
||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||
}
|
||||
|
||||
if (mPath.EqualsLiteral("/")) {
|
||||
mPath.Append(aFragment);
|
||||
} else {
|
||||
mPath.Append(NS_LITERAL_CSTRING("/") + aFragment);
|
||||
if (!mPath.EqualsLiteral("/")) {
|
||||
mPath.Append('/');
|
||||
}
|
||||
mPath.Append(aFragment);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1454,7 +1454,8 @@ nsLocalFile::AppendInternal(const nsAFlatString& aNode,
|
||||
|
||||
MakeDirty();
|
||||
|
||||
mWorkingPath.Append(NS_LITERAL_STRING("\\") + aNode);
|
||||
mWorkingPath.Append('\\');
|
||||
mWorkingPath.Append(node);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user