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

Unified Diff: third_party/WebKit/Source/core/html/shadow/DateTimeNumericFieldElement.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
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);
}

Powered by Google App Engine
This is Rietveld 408576698