| Index: third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp b/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
|
| index 2cd857cd035f11df3e20db6657d8581a5aa9c581..55c66de891375c199041e4e12c0f8d460ea9c999 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.cpp
|
| @@ -57,9 +57,9 @@ DateTimeNumericFieldElement::DateTimeNumericFieldElement(Document& document, Fie
|
| , m_value(0)
|
| , m_hasValue(false)
|
| {
|
| - ASSERT(m_step.step);
|
| - ASSERT(m_range.minimum <= m_range.maximum);
|
| - ASSERT(m_hardLimits.minimum <= m_hardLimits.maximum);
|
| + DCHECK_NE(m_step.step, 0);
|
| + DCHECK_LE(m_range.minimum, m_range.maximum);
|
| + DCHECK_LE(m_hardLimits.minimum, m_hardLimits.maximum);
|
|
|
| // We show a direction-neutral string such as "--" as a placeholder. It
|
| // should follow the direction of numeric values.
|
| @@ -113,7 +113,7 @@ String DateTimeNumericFieldElement::formatValue(int value) const
|
|
|
| void DateTimeNumericFieldElement::handleKeyboardEvent(KeyboardEvent* keyboardEvent)
|
| {
|
| - ASSERT(!isDisabled());
|
| + DCHECK(!isDisabled());
|
| if (keyboardEvent->type() != EventTypeNames::keypress)
|
| return;
|
|
|
| @@ -132,9 +132,9 @@ void DateTimeNumericFieldElement::handleKeyboardEvent(KeyboardEvent* keyboardEve
|
| }
|
| m_typeAheadBuffer.append(number);
|
| int newValue = typeAheadValue();
|
| - if (newValue >= m_hardLimits.minimum)
|
| + if (newValue >= m_hardLimits.minimum) {
|
| setValueAsInteger(newValue, DispatchEvent);
|
| - else {
|
| + } else {
|
| m_hasValue = false;
|
| updateVisibleValue(DispatchEvent);
|
| }
|
|
|