Backed out changeset 427dc5894094 (bug 1197307) for bustage

This commit is contained in:
Carsten "Tomcat" Book 2015-12-01 10:04:50 +01:00
parent fcac0e8934
commit 7652c9a63d
6 changed files with 32 additions and 27 deletions

View File

@ -31,7 +31,7 @@
#include "nsGkAtoms.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValueInlines.h"
#include "mozilla/Snprintf.h"
#include "prprf.h"
#include "nsFloatManager.h"
#include "prenv.h"
#include "plstr.h"
@ -1427,9 +1427,9 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
ListTag(stdout);
char buf[400];
snprintf_literal(buf,
": %lld elapsed (%lld per line) (%d lines; %d new lines)",
delta, perLineDelta, numLines, ectc - ctc);
PR_snprintf(buf, sizeof(buf),
": %lld elapsed (%lld per line) (%d lines; %d new lines)",
delta, perLineDelta, numLines, ectc - ctc);
printf("%s\n", buf);
}
#endif
@ -6578,10 +6578,10 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
ListTag(stdout);
char buf[400];
snprintf_literal(buf,
": %lld elapsed (%lld per line) lines=%d drawn=%d skip=%d",
delta, deltaPerLine,
numLines, drawnLines, numLines - drawnLines);
PR_snprintf(buf, sizeof(buf),
": %lld elapsed (%lld per line) lines=%d drawn=%d skip=%d",
delta, deltaPerLine,
numLines, drawnLines, numLines - drawnLines);
printf("%s\n", buf);
}
#endif

View File

@ -36,7 +36,7 @@
#include "nsStyleConsts.h"
#include "nsIPresShell.h"
#include "mozilla/Logging.h"
#include "mozilla/Snprintf.h"
#include "prprf.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];
snprintf_literal(buf, "(%d)", ContentIndexInContainer(this));
PR_snprintf(buf, sizeof(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) {
snprintf(aResult, aResultSize, "%s@%p",
nsAtomCString(aContent->NodeInfo()->NameAtom()).get(), aFrame);
PR_snprintf(aResult, aResultSize, "%s@%p",
nsAtomCString(aContent->NodeInfo()->NameAtom()).get(), aFrame);
}
else {
snprintf(aResult, aResultSize, "@%p", aFrame);
PR_snprintf(aResult, aResultSize, "@%p", aFrame);
}
}

View File

@ -17,7 +17,7 @@
#include "nsIFrameInlines.h"
#include "nsPresArena.h"
#include "nsPrintfCString.h"
#include "mozilla/Snprintf.h"
#include "prprf.h"
#ifdef DEBUG
static int32_t ctorCount;
@ -213,15 +213,15 @@ BreakTypeToString(uint8_t aBreakType)
char*
nsLineBox::StateToString(char* aBuf, int32_t aBufSize) const
{
snprintf_literal(aBuf, aBufSize, "%s,%s,%s,%s,%s,before:%s,after:%s[0x%x]",
IsBlock() ? "block" : "inline",
IsDirty() ? "dirty" : "clean",
IsPreviousMarginDirty() ? "prevmargindirty" : "prevmarginclean",
IsImpactedByFloat() ? "impacted" : "not impacted",
IsLineWrapped() ? "wrapped" : "not wrapped",
BreakTypeToString(GetBreakTypeBefore()),
BreakTypeToString(GetBreakTypeAfter()),
mAllFlags);
PR_snprintf(aBuf, aBufSize, "%s,%s,%s,%s,%s,before:%s,after:%s[0x%x]",
IsBlock() ? "block" : "inline",
IsDirty() ? "dirty" : "clean",
IsPreviousMarginDirty() ? "prevmargindirty" : "prevmarginclean",
IsImpactedByFloat() ? "impacted" : "not impacted",
IsLineWrapped() ? "wrapped" : "not wrapped",
BreakTypeToString(GetBreakTypeBefore()),
BreakTypeToString(GetBreakTypeAfter()),
mAllFlags);
return aBuf;
}

View File

@ -30,7 +30,7 @@
#include "mozilla/LookAndFeel.h"
#include "nsCSSRendering.h"
#include "mozilla/Snprintf.h"
#include "prprf.h" // For PR_snprintf()
#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]; snprintf_literal(key, "\\u%04X", aChar);
char key[10]; PR_snprintf(key, sizeof(key), "\\u%04X", aChar);
nsAutoString value;
nsresult rv = mGlyphProperties->GetStringProperty(nsDependentCString(key),
value);

View File

@ -7,6 +7,7 @@
#include "nsCOMPtr.h"
#include "nsPresContext.h"
#include "nsNameSpaceManager.h"
#include "prprf.h" // For PR_snprintf()
#include "nsIDocShell.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIWebBrowserChrome.h"
@ -325,7 +326,9 @@ nsMathMLmactionFrame::MouseClick()
if (mChildCount > 1) {
int32_t selection = (mSelection == mChildCount)? 1 : mSelection + 1;
nsAutoString value;
value.AppendInt(selection);
char cbuf[10];
PR_snprintf(cbuf, sizeof(cbuf), "%d", selection);
value.AssignASCII(cbuf);
bool notify = false; // don't yet notify the document
mContent->SetAttr(kNameSpaceID_None, nsGkAtoms::selection_, value, notify);

View File

@ -18,6 +18,7 @@
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "nsUnicodeProperties.h"
#include "prprf.h"
namespace mozilla {
@ -211,7 +212,8 @@ DecimalToText(CounterValue aOrdinal, nsSubstring& aResult)
{
// 3 for additional digit, negative sign, and null
char cbuf[std::numeric_limits<CounterValue>::digits10 + 3];
aResult.AppendInt(aOrdinal);
PR_snprintf(cbuf, sizeof(cbuf), "%ld", aOrdinal);
aResult.AssignASCII(cbuf);
return true;
}