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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutButton.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/LayoutButton.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutButton.cpp b/third_party/WebKit/Source/core/layout/LayoutButton.cpp
index 3f69c18c790cc6eb8521e90d2b09d9159712a9d2..f7807ad3777459f4a2a5765b5029024e3ed34de5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutButton.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutButton.cpp
@@ -32,7 +32,7 @@ LayoutButton::~LayoutButton() {}
void LayoutButton::addChild(LayoutObject* newChild, LayoutObject* beforeChild) {
if (!m_inner) {
// Create an anonymous block.
- ASSERT(!firstChild());
+ DCHECK(!firstChild());
m_inner = createAnonymousBlock(style()->display());
LayoutFlexibleBox::addChild(m_inner);
}
@@ -57,7 +57,7 @@ void LayoutButton::removeChild(LayoutObject* oldChild) {
void LayoutButton::updateAnonymousChildStyle(const LayoutObject& child,
ComputedStyle& childStyle) const {
- ASSERT(!m_inner || &child == m_inner);
+ DCHECK(!m_inner || &child == m_inner);
childStyle.setFlexGrow(1.0f);
// min-width: 0; is needed for correct shrinking.
@@ -87,7 +87,7 @@ int LayoutButton::baselinePosition(FontBaseline baseline,
bool firstLine,
LineDirectionMode direction,
LinePositionMode linePositionMode) const {
- ASSERT(linePositionMode == PositionOnContainingLine);
+ DCHECK_EQ(linePositionMode, PositionOnContainingLine);
// We want to call the LayoutBlock version of firstLineBoxBaseline to
// avoid LayoutFlexibleBox synthesizing a baseline that we don't want.
// We use this check as a proxy for "are there any line boxes in this button"

Powered by Google App Engine
This is Rietveld 408576698