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

Unified Diff: third_party/WebKit/Source/core/html/forms/InputType.cpp

Issue 2097313002: Replace ASSERT macros with DCHECK, etc. in core/html/forms/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/forms/InputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/InputType.cpp b/third_party/WebKit/Source/core/html/forms/InputType.cpp
index ebd6b063070d5def7a87c8ed0fe7077e7aaa6710..5df9178ac0da7f64d9cd15a52d55785e86809317 100644
--- a/third_party/WebKit/Source/core/html/forms/InputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/InputType.cpp
@@ -327,19 +327,19 @@ bool InputType::stepMismatch(const String& value) const
String InputType::badInputText() const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return locale().queryString(WebLocalizedString::ValidationTypeMismatch);
}
String InputType::rangeOverflowText(const Decimal&) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return String();
}
String InputType::rangeUnderflowText(const Decimal&) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return String();
}
@@ -399,7 +399,7 @@ std::pair<String, String> InputType::validationMessage(const InputTypeView& inpu
return std::make_pair(rangeOverflowText(stepRange.maximum()), emptyString());
if (stepRange.stepMismatch(numericValue)) {
- ASSERT(stepRange.hasStep());
+ DCHECK(stepRange.hasStep());
Decimal candidate1 = stepRange.clampValue(numericValue);
String localizedCandidate1 = localizeValue(serialize(candidate1));
Decimal candidate2 = candidate1 < numericValue ? candidate1 + stepRange.step() : candidate1 - stepRange.step();
@@ -416,7 +416,7 @@ std::pair<String, String> InputType::validationMessage(const InputTypeView& inpu
Decimal InputType::parseToNumber(const String&, const Decimal& defaultValue) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return defaultValue;
}
@@ -427,7 +427,7 @@ Decimal InputType::parseToNumberOrNaN(const String& string) const
String InputType::serialize(const Decimal&) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return String();
}
@@ -599,13 +599,13 @@ void InputType::warnIfValueIsInvalid(const String&) const
bool InputType::receiveDroppedFiles(const DragData*)
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return false;
}
String InputType::droppedFileSystemId()
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return String();
}
@@ -673,7 +673,7 @@ String InputType::defaultToolTip(const InputTypeView& inputTypeView) const
Decimal InputType::findClosestTickMarkValue(const Decimal&)
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return Decimal::nan();
}
@@ -767,7 +767,7 @@ void InputType::applyStep(const Decimal& current, int count, AnyStepHandling any
// e.g. <input type=number value=3 min=-100 step=3> -> 2
//
- ASSERT(!step.isZero());
+ DCHECK(!step.isZero());
if (count < 0) {
newValue = base + ((newValue - base) / step).floor() * step;
++count;
@@ -793,7 +793,7 @@ void InputType::applyStep(const Decimal& current, int count, AnyStepHandling any
newValue = alignedMaximum;
} else if (newValue < stepRange.minimum()) {
const Decimal alignedMinimum = base + ((stepRange.minimum() - base) / step).ceil() * step;
- ASSERT(alignedMinimum >= stepRange.minimum());
+ DCHECK_GE(alignedMinimum, stepRange.minimum());
newValue = alignedMinimum;
}
@@ -816,7 +816,7 @@ bool InputType::getAllowedValueStep(Decimal* step) const
StepRange InputType::createStepRange(AnyStepHandling) const
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return StepRange();
}
@@ -860,10 +860,10 @@ void InputType::stepUpFromLayoutObject(int n)
//
// n is assumed as -n if step < 0.
- ASSERT(isSteppable());
+ DCHECK(isSteppable());
if (!isSteppable())
return;
- ASSERT(n);
+ DCHECK(n);
if (!n)
return;

Powered by Google App Engine
This is Rietveld 408576698