зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1004327 - Don't limit the number of significant fractional digits for <input type=number>. r=bz
This commit is contained in:
Родитель
7d2eb4e7b5
Коммит
5c947c8bd5
|
@ -108,6 +108,10 @@ ICUUtils::LocalizeNumber(double aValue,
|
|||
langTag.get(), nullptr, &status));
|
||||
unum_setAttribute(format, UNUM_GROUPING_USED,
|
||||
LocaleNumberGroupingIsEnabled());
|
||||
// ICU default is a maximum of 3 significant fractional digits. We don't
|
||||
// want that limit, so we set it to the maximum that a double can represent
|
||||
// (14-16 decimal fractional digits).
|
||||
unum_setAttribute(format, UNUM_MAX_FRACTION_DIGITS, 16);
|
||||
int32_t length = unum_formatDouble(format, aValue, buffer, kBufferSize,
|
||||
nullptr, &status);
|
||||
NS_ASSERTION(length < kBufferSize &&
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input type="number" value="1.00100000000001" style="width:100%;">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
|
||||
document.addEventListener("MozReftestInvalidate", function() {
|
||||
document.getElementById("i").stepUp();
|
||||
document.documentElement.className = "";
|
||||
}, false);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="i" type="number" value="1.001" step="0.00000000000001"
|
||||
style="width:100%;">
|
||||
</body>
|
||||
</html>
|
|
@ -29,6 +29,9 @@ skip-if(B2G||Android) == number-min-height-2.html number-min-height-2-ref.html
|
|||
skip-if(B2G||Android) == number-max-height-1.html number-max-height-1-ref.html
|
||||
skip-if(B2G||Android) == number-max-height-2.html number-max-height-2-ref.html
|
||||
|
||||
# number of significant fractional digits:
|
||||
== number-significant-fractional-digits.html number-significant-fractional-digits-ref.html
|
||||
|
||||
# focus
|
||||
# autofocus is disabled on B2G
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=965763
|
||||
|
|
Загрузка…
Ссылка в новой задаче