зеркало из https://github.com/mozilla/pjs.git
Bug 636750 (2/4) - Use ToDouble instead of ToFloat when appropriate. r=bsmedmerg
This commit is contained in:
Родитель
f3e3b8a6d3
Коммит
1676363bcd
|
@ -3297,7 +3297,7 @@ nsAccessible::GetAttrValue(nsIAtom *aProperty, double *aValue)
|
|||
return NS_OK;
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
double value = attrValue.ToFloat(&error);
|
||||
double value = attrValue.ToDouble(&error);
|
||||
if (NS_SUCCEEDED(error))
|
||||
*aValue = value;
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ nsXFormsRangeAccessible::GetMaximumValue(double *aMaximumValue)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
*aMaximumValue = value.ToFloat(&error);
|
||||
*aMaximumValue = value.ToDouble(&error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,7 @@ nsXFormsRangeAccessible::GetMinimumValue(double *aMinimumValue)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
*aMinimumValue = value.ToFloat(&error);
|
||||
*aMinimumValue = value.ToDouble(&error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ nsXFormsRangeAccessible::GetMinimumIncrement(double *aMinimumIncrement)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
*aMinimumIncrement = value.ToFloat(&error);
|
||||
*aMinimumIncrement = value.ToDouble(&error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ nsXFormsRangeAccessible::GetCurrentValue(double *aCurrentValue)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
*aCurrentValue = value.ToFloat(&error);
|
||||
*aCurrentValue = value.ToDouble(&error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -569,7 +569,7 @@ nsXULProgressMeterAccessible::GetMaximumValue(double *aMaximumValue)
|
|||
nsAutoString value;
|
||||
if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::max, value)) {
|
||||
PRInt32 result = NS_OK;
|
||||
*aMaximumValue = value.ToFloat(&result);
|
||||
*aMaximumValue = value.ToDouble(&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ nsXULProgressMeterAccessible::GetCurrentValue(double *aCurrentValue)
|
|||
return NS_OK;
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
double value = attrValue.ToFloat(&error);
|
||||
double value = attrValue.ToDouble(&error);
|
||||
if (NS_FAILED(error))
|
||||
return NS_OK; // Zero value because of wrong markup.
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ nsXULSliderAccessible::GetSliderAttr(nsIAtom *aName, double *aValue)
|
|||
return NS_OK;
|
||||
|
||||
PRInt32 error = NS_OK;
|
||||
double value = attrValue.ToFloat(&error);
|
||||
double value = attrValue.ToDouble(&error);
|
||||
if (NS_SUCCEEDED(error))
|
||||
*aValue = value;
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ nsMediaChannelStream::OnStartRequest(nsIRequest* aRequest)
|
|||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
double duration = durationText.ToFloat(&ec);
|
||||
double duration = durationText.ToDouble(&ec);
|
||||
if (ec == NS_OK && duration >= 0) {
|
||||
mDecoder->SetDuration(PRInt64(NS_round(duration*1000)));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче