示例#1
0
bool NumberInputType::hasBadInput() const
{
    String standardValue = convertFromVisibleValue(element()->innerTextValue());
    return !standardValue.isEmpty() && !std::isfinite(parseToDoubleForNumberType(standardValue));
}
示例#2
0
bool NumberInputType::isAcceptableValue(const String& proposedValue)
{
    String standardValue = convertFromVisibleValue(proposedValue);
    return standardValue.isEmpty() || isfinite(parseToDoubleForNumberType(standardValue));
}