зеркало из https://github.com/mozilla/gecko-dev.git
Bug 530364 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in /parser, r=mrbkap
This commit is contained in:
Родитель
b25fc47555
Коммит
48cece3011
|
@ -506,7 +506,7 @@ IsHiddenInput(CToken* aToken, nsITokenizer* aTokenizer)
|
|||
NS_ASSERTION(ac <= aTokenizer->GetCount(),
|
||||
"Not enough tokens in the tokenizer");
|
||||
// But we don't really trust ourselves to get that right
|
||||
ac = PR_MIN(ac, aTokenizer->GetCount());
|
||||
ac = NS_MIN(ac, aTokenizer->GetCount());
|
||||
|
||||
for (PRInt32 i = 0; i < ac; ++i) {
|
||||
NS_ASSERTION(eHTMLTokenTypes(aTokenizer->GetTokenAt(i)->GetTokenType()) ==
|
||||
|
|
|
@ -383,7 +383,7 @@ nsHTMLTags::AddRefTable(void)
|
|||
PRUint32 maxTagNameLength = 0;
|
||||
for (i = 0; i < NS_HTML_TAG_MAX; ++i) {
|
||||
PRUint32 len = nsCRT::strlen(sTagUnicodeTable[i]);
|
||||
maxTagNameLength = PR_MAX(len, maxTagNameLength);
|
||||
maxTagNameLength = NS_MAX(len, maxTagNameLength);
|
||||
}
|
||||
NS_ASSERTION(maxTagNameLength == NS_HTMLTAG_NAME_MAX_LENGTH,
|
||||
"NS_HTMLTAG_NAME_MAX_LENGTH not set correctly!");
|
||||
|
|
|
@ -503,7 +503,7 @@ nsSpeculativeScriptThread::StartParsing(nsParser *aParser)
|
|||
// We consumed more the last time we tried speculatively parsing than we
|
||||
// did the last time we actually parsed.
|
||||
PRUint32 distance = Distance(start, end);
|
||||
start.advance(PR_MIN(mNumConsumed - context->mNumConsumed, distance));
|
||||
start.advance(NS_MIN(mNumConsumed - context->mNumConsumed, distance));
|
||||
}
|
||||
|
||||
if (start == end) {
|
||||
|
@ -2721,7 +2721,7 @@ nsParser::DetectMetaTag(const char* aBytes,
|
|||
// Fast and loose parsing to determine if we have a complete
|
||||
// META tag in this block, looking upto 2k into it.
|
||||
const nsASingleFragmentCString& str =
|
||||
Substring(aBytes, aBytes + PR_MIN(aLen, 2048));
|
||||
Substring(aBytes, aBytes + NS_MIN(aLen, 2048));
|
||||
// XXXldb Should be const_char_iterator when FindInReadable supports it.
|
||||
nsACString::const_iterator begin, end;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче