Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp |
| index 01bcd1098588fe08ef47edfa10546e010ee9654d..1d7999a141e82a0e12f22071aef97d757acd3fde 100644 |
| --- a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp |
| @@ -347,11 +347,11 @@ bool DateTimeEditBuilder::shouldHourFieldDisabled() const |
| if (m_dateValue.getType() == DateComponents::Time) |
| return false; |
| - ASSERT(m_dateValue.getType() == DateComponents::DateTimeLocal); |
| + DCHECK_EQ(m_dateValue.getType(), DateComponents::DateTimeLocal); |
| if (shouldDayOfMonthFieldDisabled()) { |
| - ASSERT(m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear()); |
| - ASSERT(m_parameters.minimum.month() == m_parameters.maximum.month()); |
| + DCHECK_EQ(m_parameters.minimum.fullYear(), m_parameters.maximum.fullYear()); |
| + DCHECK_EQ(m_parameters.minimum.month(), m_parameters.maximum.month()); |
| return false; |
| } |
| @@ -400,7 +400,7 @@ bool DateTimeEditBuilder::shouldYearFieldDisabled() const |
| void DateTimeEditBuilder::visitLiteral(const String& text) |
| { |
| DEFINE_STATIC_LOCAL(AtomicString, textPseudoId, ("-webkit-datetime-edit-text")); |
| - ASSERT(text.length()); |
| + DCHECK_GT(text.length(), 0u); |
| HTMLDivElement* element = HTMLDivElement::create(editElement().document()); |
| element->setShadowPseudoId(textPseudoId); |
| if (m_parameters.locale.isRTL() && text.length()) { |
| @@ -422,9 +422,9 @@ DateTimeNumericFieldElement::Step DateTimeEditBuilder::createStep(double msPerFi |
| const Decimal msPerFieldUnitDecimal(static_cast<int>(msPerFieldUnit)); |
| const Decimal msPerFieldSizeDecimal(static_cast<int>(msPerFieldSize)); |
| Decimal stepMilliseconds = stepRange().step(); |
| - ASSERT(!msPerFieldUnitDecimal.isZero()); |
| - ASSERT(!msPerFieldSizeDecimal.isZero()); |
| - ASSERT(!stepMilliseconds.isZero()); |
| + DCHECK(!msPerFieldUnitDecimal.isZero()); |
|
yosin_UTC9
2016/08/19 08:01:35
OPTIONAL: It seems we want to have |operator<<| fo
|
| + DCHECK(!msPerFieldSizeDecimal.isZero()); |
| + DCHECK(!stepMilliseconds.isZero()); |
| DateTimeNumericFieldElement::Step step(1, 0); |
| @@ -464,7 +464,7 @@ DEFINE_TRACE(DateTimeEditElement) |
| inline Element* DateTimeEditElement::fieldsWrapperElement() const |
| { |
| - ASSERT(firstChild()); |
| + DCHECK(firstChild()); |
| return toElement(firstChild()); |
| } |
| @@ -764,7 +764,7 @@ bool DateTimeEditElement::hasFocusedField() |
| void DateTimeEditElement::setOnlyYearMonthDay(const DateComponents& date) |
| { |
| - ASSERT(date.getType() == DateComponents::Date); |
| + DCHECK_EQ(date.getType(), DateComponents::Date); |
| if (!m_editControlOwner) |
| return; |