mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 14:47:31 +09:00
Issue #325 Part 9: Remove non-Intl legacy code paths from nsNumberControlFrame.
This commit is contained in:
parent
29c4fdcc58
commit
f2d90ee4a4
1 changed files with 0 additions and 4 deletions
|
|
@ -680,14 +680,12 @@ nsNumberControlFrame::SetValueOfAnonTextControl(const nsAString& aValue)
|
||||||
// state will be set to invalid) or if aValue can't be localized:
|
// state will be set to invalid) or if aValue can't be localized:
|
||||||
nsAutoString localizedValue(aValue);
|
nsAutoString localizedValue(aValue);
|
||||||
|
|
||||||
#ifdef ENABLE_INTL_API
|
|
||||||
// Try and localize the value we will set:
|
// Try and localize the value we will set:
|
||||||
Decimal val = HTMLInputElement::StringToDecimal(aValue);
|
Decimal val = HTMLInputElement::StringToDecimal(aValue);
|
||||||
if (val.isFinite()) {
|
if (val.isFinite()) {
|
||||||
ICUUtils::LanguageTagIterForContent langTagIter(mContent);
|
ICUUtils::LanguageTagIterForContent langTagIter(mContent);
|
||||||
ICUUtils::LocalizeNumber(val.toDouble(), langTagIter, localizedValue);
|
ICUUtils::LocalizeNumber(val.toDouble(), langTagIter, localizedValue);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// We need to update the value of our anonymous text control here. Note that
|
// We need to update the value of our anonymous text control here. Note that
|
||||||
// this must be its value, and not its 'value' attribute (the default value),
|
// this must be its value, and not its 'value' attribute (the default value),
|
||||||
|
|
@ -706,7 +704,6 @@ nsNumberControlFrame::GetValueOfAnonTextControl(nsAString& aValue)
|
||||||
|
|
||||||
HTMLInputElement::FromContent(mTextField)->GetValue(aValue);
|
HTMLInputElement::FromContent(mTextField)->GetValue(aValue);
|
||||||
|
|
||||||
#ifdef ENABLE_INTL_API
|
|
||||||
// Here we need to de-localize any number typed in by the user. That is, we
|
// Here we need to de-localize any number typed in by the user. That is, we
|
||||||
// need to convert it from the number format of the user's language, region,
|
// need to convert it from the number format of the user's language, region,
|
||||||
// etc. to the format that the HTML 5 spec defines to be a "valid
|
// etc. to the format that the HTML 5 spec defines to be a "valid
|
||||||
|
|
@ -747,7 +744,6 @@ nsNumberControlFrame::GetValueOfAnonTextControl(nsAString& aValue)
|
||||||
// as 12.345, but HTMLInputElement::StringToDecimal would parse it to NaN.
|
// as 12.345, but HTMLInputElement::StringToDecimal would parse it to NaN.
|
||||||
aValue.Truncate();
|
aValue.Truncate();
|
||||||
aValue.AppendFloat(value);
|
aValue.AppendFloat(value);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue