зеркало из 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();
|
unit = val.GetUnit();
|
||||||
if (unit == eCSSUnit_Array) {
|
if (unit == eCSSUnit_Array) {
|
||||||
nsCSSValue::Array *srcArr = val.GetArrayValue();
|
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);
|
val = srcArr->Item(i);
|
||||||
unit = val.GetUnit();
|
unit = val.GetUnit();
|
||||||
gfxFontFaceSrc *face = srcArray.AppendElements(1);
|
gfxFontFaceSrc *face = srcArray.AppendElements(1);
|
||||||
|
|
|
@ -277,7 +277,7 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
|
||||||
|
|
||||||
nsCSSValue::Array *array = aValue.GetArrayValue();
|
nsCSSValue::Array *array = aValue.GetArrayValue();
|
||||||
PRBool mark = PR_FALSE;
|
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 (aProperty == eCSSProperty_border_image && i >= 5) {
|
||||||
if (array->Item(i).GetUnit() == eCSSUnit_Null) {
|
if (array->Item(i).GetUnit() == eCSSUnit_Null) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -327,7 +327,7 @@ nsCSSDeclaration::AppendCSSValueToString(nsCSSProperty aProperty,
|
||||||
aResult.AppendLiteral("(");
|
aResult.AppendLiteral("(");
|
||||||
|
|
||||||
/* Now, step through the function contents, writing each of them as we go. */
|
/* 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);
|
AppendCSSValueToString(aProperty, array->Item(index), aResult);
|
||||||
|
|
||||||
/* If we're not at the final element, append a comma. */
|
/* 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) {
|
if (i != 0) {
|
||||||
aResult.AppendLiteral(", ");
|
aResult.AppendLiteral(", ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1480,7 +1480,7 @@ AppendSerializedFontSrc(const nsCSSValue& src, nsAString & aResult NS_OUTPARAM)
|
||||||
"improper value unit for src:");
|
"improper value unit for src:");
|
||||||
|
|
||||||
const nsCSSValue::Array& sources = *src.GetArrayValue();
|
const nsCSSValue::Array& sources = *src.GetArrayValue();
|
||||||
PRUint32 i = 0;
|
size_t i = 0;
|
||||||
|
|
||||||
while (i < sources.Count()) {
|
while (i < sources.Count()) {
|
||||||
nsAutoString formats;
|
nsAutoString formats;
|
||||||
|
|
|
@ -358,7 +358,7 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
|
||||||
while (shadow1) {
|
while (shadow1) {
|
||||||
nsCSSValue::Array *array1 = shadow1->mValue.GetArrayValue();
|
nsCSSValue::Array *array1 = shadow1->mValue.GetArrayValue();
|
||||||
nsCSSValue::Array *array2 = shadow2->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,
|
NS_ABORT_IF_FALSE(array1->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||||
"unexpected unit");
|
"unexpected unit");
|
||||||
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||||
|
@ -495,7 +495,7 @@ AddShadowItems(double aCoeff1, const nsCSSValue &aValue1,
|
||||||
return PR_FALSE;
|
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,
|
NS_ABORT_IF_FALSE(array1->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||||
"unexpected unit");
|
"unexpected unit");
|
||||||
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
NS_ABORT_IF_FALSE(array2->Item(i).GetUnit() == eCSSUnit_Pixel,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче