зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1197307 - remove PR_snprintf calls in layout. r=froydnj r=dholbert
This commit is contained in:
Родитель
10546de21b
Коммит
e8ff34c8eb
|
@ -31,7 +31,7 @@
|
|||
#include "nsGkAtoms.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "prprf.h"
|
||||
#include "mozilla/Snprintf.h"
|
||||
#include "nsFloatManager.h"
|
||||
#include "prenv.h"
|
||||
#include "plstr.h"
|
||||
|
@ -1427,7 +1427,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
ListTag(stdout);
|
||||
char buf[400];
|
||||
PR_snprintf(buf, sizeof(buf),
|
||||
snprintf_literal(buf,
|
||||
": %lld elapsed (%lld per line) (%d lines; %d new lines)",
|
||||
delta, perLineDelta, numLines, ectc - ctc);
|
||||
printf("%s\n", buf);
|
||||
|
@ -6578,7 +6578,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
ListTag(stdout);
|
||||
char buf[400];
|
||||
PR_snprintf(buf, sizeof(buf),
|
||||
snprintf_literal(buf,
|
||||
": %lld elapsed (%lld per line) lines=%d drawn=%d skip=%d",
|
||||
delta, deltaPerLine,
|
||||
numLines, drawnLines, numLines - drawnLines);
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "prprf.h"
|
||||
#include "mozilla/Snprintf.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "RestyleManager.h"
|
||||
|
@ -5923,7 +5923,7 @@ nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
|||
aResult.Append(')');
|
||||
}
|
||||
char buf[40];
|
||||
PR_snprintf(buf, sizeof(buf), "(%d)", ContentIndexInContainer(this));
|
||||
snprintf_literal(buf, "(%d)", ContentIndexInContainer(this));
|
||||
AppendASCIItoUTF16(buf, aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -9154,11 +9154,11 @@ GetTagName(nsFrame* aFrame, nsIContent* aContent, int aResultSize,
|
|||
char* aResult)
|
||||
{
|
||||
if (aContent) {
|
||||
PR_snprintf(aResult, aResultSize, "%s@%p",
|
||||
snprintf(aResult, aResultSize, "%s@%p",
|
||||
nsAtomCString(aContent->NodeInfo()->NameAtom()).get(), aFrame);
|
||||
}
|
||||
else {
|
||||
PR_snprintf(aResult, aResultSize, "@%p", aFrame);
|
||||
snprintf(aResult, aResultSize, "@%p", aFrame);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "nsIFrameInlines.h"
|
||||
#include "nsPresArena.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "prprf.h"
|
||||
#include "mozilla/Snprintf.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
static int32_t ctorCount;
|
||||
|
@ -213,7 +213,7 @@ BreakTypeToString(uint8_t aBreakType)
|
|||
char*
|
||||
nsLineBox::StateToString(char* aBuf, int32_t aBufSize) const
|
||||
{
|
||||
PR_snprintf(aBuf, aBufSize, "%s,%s,%s,%s,%s,before:%s,after:%s[0x%x]",
|
||||
snprintf_literal(aBuf, aBufSize, "%s,%s,%s,%s,%s,before:%s,after:%s[0x%x]",
|
||||
IsBlock() ? "block" : "inline",
|
||||
IsDirty() ? "dirty" : "clean",
|
||||
IsPreviousMarginDirty() ? "prevmargindirty" : "prevmarginclean",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "prprf.h" // For PR_snprintf()
|
||||
#include "mozilla/Snprintf.h"
|
||||
|
||||
#include "nsDisplayList.h"
|
||||
|
||||
|
@ -314,7 +314,7 @@ nsPropertiesTable::ElementAt(gfxContext* /* aThebesContext */,
|
|||
if (mCharCache != aChar) {
|
||||
// The key in the property file is interpreted as ASCII and kept
|
||||
// as such ...
|
||||
char key[10]; PR_snprintf(key, sizeof(key), "\\u%04X", aChar);
|
||||
char key[10]; snprintf_literal(key, "\\u%04X", aChar);
|
||||
nsAutoString value;
|
||||
nsresult rv = mGlyphProperties->GetStringProperty(nsDependentCString(key),
|
||||
value);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
#include "prprf.h" // For PR_snprintf()
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
|
@ -326,9 +325,7 @@ nsMathMLmactionFrame::MouseClick()
|
|||
if (mChildCount > 1) {
|
||||
int32_t selection = (mSelection == mChildCount)? 1 : mSelection + 1;
|
||||
nsAutoString value;
|
||||
char cbuf[10];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%d", selection);
|
||||
value.AssignASCII(cbuf);
|
||||
value.AppendInt(selection);
|
||||
bool notify = false; // don't yet notify the document
|
||||
mContent->SetAttr(kNameSpaceID_None, nsGkAtoms::selection_, value, notify);
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsUnicodeProperties.h"
|
||||
#include "prprf.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -212,8 +211,7 @@ DecimalToText(CounterValue aOrdinal, nsSubstring& aResult)
|
|||
{
|
||||
// 3 for additional digit, negative sign, and null
|
||||
char cbuf[std::numeric_limits<CounterValue>::digits10 + 3];
|
||||
PR_snprintf(cbuf, sizeof(cbuf), "%ld", aOrdinal);
|
||||
aResult.AssignASCII(cbuf);
|
||||
aResult.AppendInt(aOrdinal);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче