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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp

Issue 2770123003: Replace ASSERT with DCHECK in core/layout/ excluding subdirs (Closed)
Patch Set: Split some DCHECKs and add DCHECK_ops wherever possible Created 3 years, 8 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/layout/LayoutFileUploadControl.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp b/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
index 1e8669e805a79caeb08cbee7bf55a81dd252b8c3..9621360e0a6796d6cf2bee78362e91a9d2f2c839 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp
@@ -47,7 +47,7 @@ LayoutFileUploadControl::~LayoutFileUploadControl() {}
void LayoutFileUploadControl::updateFromElement() {
HTMLInputElement* input = toHTMLInputElement(node());
- ASSERT(input->type() == InputTypeNames::file);
+ DCHECK_EQ(input->type(), InputTypeNames::file);
if (HTMLInputElement* button = uploadButton()) {
bool newCanReceiveDroppedFilesState = input->canReceiveDroppedFiles();
@@ -60,7 +60,7 @@ void LayoutFileUploadControl::updateFromElement() {
// This only supports clearing out the files, but that's OK because for
// security reasons that's the only change the DOM is allowed to make.
FileList* files = input->files();
- ASSERT(files);
+ DCHECK(files);
if (files && files->isEmpty())
setShouldDoFullPaintInvalidation();
}
@@ -109,7 +109,7 @@ void LayoutFileUploadControl::computeIntrinsicLogicalWidths(
}
void LayoutFileUploadControl::computePreferredLogicalWidths() {
- ASSERT(preferredLogicalWidthsDirty());
+ DCHECK(preferredLogicalWidthsDirty());
m_minPreferredLogicalWidth = LayoutUnit();
m_maxPreferredLogicalWidth = LayoutUnit();
@@ -174,7 +174,7 @@ String LayoutFileUploadControl::buttonValue() {
String LayoutFileUploadControl::fileTextValue() const {
HTMLInputElement* input = toHTMLInputElement(node());
- ASSERT(input->files());
+ DCHECK(input->files());
return LayoutTheme::theme().fileListNameForWidth(
input->locale(), input->files(), style()->font(), maxFilenameWidth());
}

Powered by Google App Engine
This is Rietveld 408576698