зеркало из https://github.com/mozilla/gecko-dev.git
Bug 574750: Use size_t for counter, in loops over contents of an nsCSSValue::Array. r=bz
This commit is contained in:
Родитель
71bec71c28
Коммит
013e10d651
|
@ -1755,9 +1755,9 @@ InsertFontFaceRule(nsCSSFontFaceRule *aRule, gfxUserFontSet* aFontSet,
|
|||
unit = val.GetUnit();
|
||||
if (unit == eCSSUnit_Array) {
|
||||
nsCSSValue::Array *srcArr = val.GetArrayValue();
|
||||
size_t i, numSrc = srcArr->Count();
|
||||
size_t numSrc = srcArr->Count();
|
||||
|
||||
for (i = 0; i < numSrc; i++) {
|
||||
for (size_t i = 0; i < numSrc; i++) {
|
||||
val = srcArr->Item(i);
|
||||
unit = val.GetUnit();
|
||||
gfxFontFaceSrc *face = srcArray.AppendElements(1);
|
||||
|
|
|
@ -277,7 +277,7 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
|
|||
|
||||
nsCSSValue::Array *array = aValue.GetArrayValue();
|
||||
PRBool mark = PR_FALSE;
|
||||
for (PRUint16 i = 0, i_end = array->Count(); i < i_end; ++i) {
|
||||
for (size_t i = 0, i_end = array->Count(); i < i_end; ++i) {
|
||||
if (aProperty == eCSSProperty_border_image && i >= 5) {
|
||||
if (array->Item(i).GetUnit() == eCSSUnit_Null) {
|
||||
continue;
|
||||
|
@ -327,7 +327,7 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
|
|||
aResult.AppendLiteral("(");
|
||||
|
||||
/* Now, step through the function contents, writing each of them as we go. */
|
||||
for (PRUint16 index = 1; index < array->Count(); ++index) {
|
||||
for (size_t index = 1; index < array->Count(); ++index) {
|
||||
AppendCSSValueToString(aProperty, array->Item(index), aResult);
|
||||
|
||||
/* If we're not at the final element, append a comma. */
|
||||
|
@ -367,7 +367,7 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
|
|||
}
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0, i_end = array->Count(); i < i_end; ++i) {
|
||||
for (size_t i = 0, i_end = array->Count(); i < i_end; ++i) {
|
||||
if (i != 0) {
|
||||
aResult.AppendLiteral(", ");
|
||||
}
|
||||
|
|
|
@ -1480,7 +1480,7 @@ AppendSerializedFontSrc(const nsCSSValue& src, nsAString & aResult NS_OUTPARAM)
|
|||
"improper value unit for src:");
|
||||
|
||||
const nsCSSValue::Array& sources = *src.GetArrayValue();
|
||||
PRUint32 i = 0;
|
||||
size_t i = 0;
|
||||
|
||||
while (i < sources.Count()) {
|
||||
nsAutoString formats;
|
||||
|
|
|
@ -358,7 +358,7 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
|
|||
while (shadow1) {
|
||||
nsCSSValue::Array *array1 = shadow1->mValue.GetArrayValue();
|
||||
nsCSSValue::Array *array2 = shadow2->mValue.GetArrayValue();
|
||||
for (PRUint32 i = 0; i < 4; ++i) {
|
||||
for (size_t i = 0; i < 4; ++i) {
|
||||
NS_ABORT_IF_FALSE(array1->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||
"unexpected unit");
|
||||
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||
|
@ -495,7 +495,7 @@ AddShadowItems(double aCoeff1, const nsCSSValue &aValue1,
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
for (PRUint32 i = 0; i < 4; ++i) {
|
||||
for (size_t i = 0; i < 4; ++i) {
|
||||
NS_ABORT_IF_FALSE(array1->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||
"unexpected unit");
|
||||
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||
|
|
Загрузка…
Ссылка в новой задаче