Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp

Issue 2259173002: Fix style errors in core/html/shadow/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698