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

Unified Diff: third_party/WebKit/Source/core/html/forms/TextFieldInputType.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/TextFieldInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
index cb8ebf0b6362e30e4015099ed45a23b925755ae1..f3c8f55b5a766928778e7fe5222a7b51fc07b79f 100644
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
@@ -81,7 +81,7 @@ private:
void defaultEventHandler(Event* event) override
{
- ASSERT(document().isActive());
+ DCHECK(document().isActive());
if (event->type() != EventTypeNames::click)
return;
HTMLInputElement* host = hostInput();
@@ -282,9 +282,9 @@ bool TextFieldInputType::shouldHaveSpinButton() const
void TextFieldInputType::createShadowSubtree()
{
- ASSERT(element().shadow());
+ DCHECK(element().shadow());
ShadowRoot* shadowRoot = element().userAgentShadowRoot();
- ASSERT(!shadowRoot->hasChildren());
+ DCHECK(!shadowRoot->hasChildren());
Document& document = element().document();
bool shouldHaveSpinButton = this->shouldHaveSpinButton();
@@ -424,7 +424,7 @@ void TextFieldInputType::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*
if (element().focused()) {
selectionLength = element().document().frame()->selection().selectedText().length();
}
- ASSERT(oldLength >= selectionLength);
+ DCHECK_GE(oldLength, selectionLength);
// Selected characters will be removed by the next text event.
unsigned baseLength = oldLength - selectionLength;
@@ -469,7 +469,7 @@ void TextFieldInputType::updatePlaceholderText()
Element* container = containerElement();
Node* previous = container ? container : element().innerEditorElement();
previous->parentNode()->insertBefore(placeholder, previous);
- ASSERT_WITH_SECURITY_IMPLICATION(placeholder->parentNode() == previous->parentNode());
+ SECURITY_DCHECK(placeholder->parentNode() == previous->parentNode());
}
placeholder->setTextContent(placeholderText);
}

Powered by Google App Engine
This is Rietveld 408576698