mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 252948 remove *WithConversion in layout
r+sr=bz
This commit is contained in:
parent
edd98105f6
commit
54e0371529
@ -7505,7 +7505,7 @@ void ReflowCountMgr::Add(const char * aName, nsReflowReason aType, nsIFrame * aF
|
||||
counter = new IndiReflowCounter(this);
|
||||
NS_ASSERTION(counter != nsnull, "null ptr");
|
||||
counter->mFrame = aFrame;
|
||||
counter->mName.AssignWithConversion(aName);
|
||||
counter->mName.AssignASCII(aName);
|
||||
PL_HashTableAdd(mIndiFrameCounts, key, counter);
|
||||
}
|
||||
// this eliminates extra counts from super classes
|
||||
|
@ -470,15 +470,15 @@ nsFrameUtil::Tag::ToString(nsString& aResult)
|
||||
if (type == close) {
|
||||
aResult.Append(PRUnichar('/'));
|
||||
}
|
||||
aResult.AppendWithConversion(name);
|
||||
aResult.AppendASCII(name);
|
||||
if (0 != num) {
|
||||
PRInt32 i, n = num;
|
||||
for (i = 0; i < n; i++) {
|
||||
aResult.Append(PRUnichar(' '));
|
||||
aResult.AppendWithConversion(attributes[i]);
|
||||
aResult.AppendASCII(attributes[i]);
|
||||
if (values[i]) {
|
||||
aResult.AppendLiteral("=\"");
|
||||
aResult.AppendWithConversion(values[i]);
|
||||
aResult.AppendASCII(values[i]);
|
||||
aResult.Append(PRUnichar('\"'));
|
||||
}
|
||||
}
|
||||
|
@ -566,7 +566,7 @@ nsIsIndexFrame::URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder, n
|
||||
delete [] inBuf;
|
||||
|
||||
char* outBuf = nsEscape(convertedBuf, url_XPAlphas);
|
||||
oString.AssignWithConversion(outBuf);
|
||||
oString.AssignASCII(outBuf);
|
||||
nsCRT::free(outBuf);
|
||||
nsMemory::Free(convertedBuf);
|
||||
}
|
||||
|
@ -429,14 +429,14 @@ static PRBool DecimalToText(PRInt32 ordinal, nsString& result)
|
||||
{
|
||||
char cbuf[40];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%ld", ordinal);
|
||||
result.AppendWithConversion(cbuf);
|
||||
result.AppendASCII(cbuf);
|
||||
return PR_TRUE;
|
||||
}
|
||||
static PRBool DecimalLeadingZeroToText(PRInt32 ordinal, nsString& result)
|
||||
{
|
||||
char cbuf[40];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%02ld", ordinal);
|
||||
result.AppendWithConversion(cbuf);
|
||||
result.AppendASCII(cbuf);
|
||||
return PR_TRUE;
|
||||
}
|
||||
static PRBool OtherDecimalToText(PRInt32 ordinal, PRUnichar zeroChar, nsString& result)
|
||||
|
@ -470,15 +470,15 @@ nsFrameUtil::Tag::ToString(nsString& aResult)
|
||||
if (type == close) {
|
||||
aResult.Append(PRUnichar('/'));
|
||||
}
|
||||
aResult.AppendWithConversion(name);
|
||||
aResult.AppendASCII(name);
|
||||
if (0 != num) {
|
||||
PRInt32 i, n = num;
|
||||
for (i = 0; i < n; i++) {
|
||||
aResult.Append(PRUnichar(' '));
|
||||
aResult.AppendWithConversion(attributes[i]);
|
||||
aResult.AppendASCII(attributes[i]);
|
||||
if (values[i]) {
|
||||
aResult.AppendLiteral("=\"");
|
||||
aResult.AppendWithConversion(values[i]);
|
||||
aResult.AppendASCII(values[i]);
|
||||
aResult.Append(PRUnichar('\"'));
|
||||
}
|
||||
}
|
||||
|
@ -2258,7 +2258,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge
|
||||
nsCOMPtr<nsILinkHandler> lh = do_QueryInterface(container);
|
||||
NS_ENSURE_TRUE(lh, NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString unitarget; unitarget.AssignWithConversion(aTarget);
|
||||
nsAutoString unitarget; unitarget.AssignASCII(aTarget); // XXX could this be nonascii?
|
||||
|
||||
nsCOMPtr<nsIURI> baseURL;
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
|
@ -587,7 +587,7 @@ nsSimplePageSequenceFrame::SetPageNumberFormat(const char* aPropName, const char
|
||||
// Now go get the Localized Page Formating String
|
||||
nsresult rv = nsFormControlHelper::GetLocalizedString(PRINTING_PROPERTIES, NS_ConvertUTF8toUCS2(aPropName).get(), pageNumberFormat);
|
||||
if (NS_FAILED(rv)) { // back stop formatting
|
||||
pageNumberFormat.AssignWithConversion(aDefPropVal);
|
||||
pageNumberFormat.AssignASCII(aDefPropVal);
|
||||
}
|
||||
|
||||
// Sets the format into a static data memeber which will own the memory and free it
|
||||
|
@ -429,14 +429,14 @@ static PRBool DecimalToText(PRInt32 ordinal, nsString& result)
|
||||
{
|
||||
char cbuf[40];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%ld", ordinal);
|
||||
result.AppendWithConversion(cbuf);
|
||||
result.AppendASCII(cbuf);
|
||||
return PR_TRUE;
|
||||
}
|
||||
static PRBool DecimalLeadingZeroToText(PRInt32 ordinal, nsString& result)
|
||||
{
|
||||
char cbuf[40];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%02ld", ordinal);
|
||||
result.AppendWithConversion(cbuf);
|
||||
result.AppendASCII(cbuf);
|
||||
return PR_TRUE;
|
||||
}
|
||||
static PRBool OtherDecimalToText(PRInt32 ordinal, PRUnichar zeroChar, nsString& result)
|
||||
|
@ -2258,7 +2258,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge
|
||||
nsCOMPtr<nsILinkHandler> lh = do_QueryInterface(container);
|
||||
NS_ENSURE_TRUE(lh, NS_ERROR_FAILURE);
|
||||
|
||||
nsAutoString unitarget; unitarget.AssignWithConversion(aTarget);
|
||||
nsAutoString unitarget; unitarget.AssignASCII(aTarget); // XXX could this be nonascii?
|
||||
|
||||
nsCOMPtr<nsIURI> baseURL;
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
|
@ -7505,7 +7505,7 @@ void ReflowCountMgr::Add(const char * aName, nsReflowReason aType, nsIFrame * aF
|
||||
counter = new IndiReflowCounter(this);
|
||||
NS_ASSERTION(counter != nsnull, "null ptr");
|
||||
counter->mFrame = aFrame;
|
||||
counter->mName.AssignWithConversion(aName);
|
||||
counter->mName.AssignASCII(aName);
|
||||
PL_HashTableAdd(mIndiFrameCounts, key, counter);
|
||||
}
|
||||
// this eliminates extra counts from super classes
|
||||
|
@ -587,7 +587,7 @@ nsSimplePageSequenceFrame::SetPageNumberFormat(const char* aPropName, const char
|
||||
// Now go get the Localized Page Formating String
|
||||
nsresult rv = nsFormControlHelper::GetLocalizedString(PRINTING_PROPERTIES, NS_ConvertUTF8toUCS2(aPropName).get(), pageNumberFormat);
|
||||
if (NS_FAILED(rv)) { // back stop formatting
|
||||
pageNumberFormat.AssignWithConversion(aDefPropVal);
|
||||
pageNumberFormat.AssignASCII(aDefPropVal);
|
||||
}
|
||||
|
||||
// Sets the format into a static data memeber which will own the memory and free it
|
||||
|
@ -566,7 +566,7 @@ nsIsIndexFrame::URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder, n
|
||||
delete [] inBuf;
|
||||
|
||||
char* outBuf = nsEscape(convertedBuf, url_XPAlphas);
|
||||
oString.AssignWithConversion(outBuf);
|
||||
oString.AssignASCII(outBuf);
|
||||
nsCRT::free(outBuf);
|
||||
nsMemory::Free(convertedBuf);
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ nsMathMLmactionFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
PRInt32 selection = (mSelection == mChildCount)? 1 : mSelection + 1;
|
||||
char cbuf[10];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%d", selection);
|
||||
value.AssignWithConversion(cbuf);
|
||||
value.AssignASCII(cbuf);
|
||||
PRBool notify = PR_FALSE; // don't yet notify the document
|
||||
mContent->SetAttr(kNameSpaceID_None, nsMathMLAtoms::selection_, value, notify);
|
||||
|
||||
|
@ -302,9 +302,7 @@ nsSVGTextFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
printf("** nsSVGTextFrame::AttributeChanged(");
|
||||
nsAutoString str;
|
||||
aAttribute->ToString(str);
|
||||
nsCAutoString cstr;
|
||||
cstr.AssignWithConversion(str);
|
||||
printf(cstr.get());
|
||||
printf(NS_ConvertUTF16toUTF8(str).get());
|
||||
printf(")\n");
|
||||
#endif
|
||||
|
||||
|
@ -102,7 +102,7 @@ nsBox::ListBox(nsAutoString& aResult)
|
||||
char addr[100];
|
||||
sprintf(addr, "[@%p] ", NS_STATIC_CAST(void*, frame));
|
||||
|
||||
aResult.AppendWithConversion(addr);
|
||||
aResult.AppendASCII(addr);
|
||||
aResult.Append(name);
|
||||
aResult.AppendLiteral(" ");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user