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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMenuList.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/LayoutMenuList.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
index a9353af77d91f01d4fd82b4fd2e0237a229a54ee..c0003ac9abef409a9567b58c755a58bb4351b69f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
@@ -47,7 +47,7 @@ LayoutMenuList::LayoutMenuList(Element* element)
m_innerBlockHeight(LayoutUnit()),
m_optionsWidth(0),
m_lastActiveIndex(-1) {
- ASSERT(isHTMLSelectElement(element));
+ DCHECK(isHTMLSelectElement(element));
}
LayoutMenuList::~LayoutMenuList() {}
@@ -61,13 +61,13 @@ bool LayoutMenuList::isChildAllowed(LayoutObject* object,
void LayoutMenuList::createInnerBlock() {
if (m_innerBlock) {
- ASSERT(firstChild() == m_innerBlock);
- ASSERT(!m_innerBlock->nextSibling());
+ DCHECK_EQ(firstChild(), m_innerBlock);
+ DCHECK(!m_innerBlock->nextSibling());
return;
}
// Create an anonymous block.
- ASSERT(!firstChild());
+ DCHECK(!firstChild());
m_innerBlock = createAnonymousBlock();
m_buttonText = LayoutText::createEmptyAnonymous(document());
@@ -133,7 +133,7 @@ HTMLSelectElement* LayoutMenuList::selectElement() const {
void LayoutMenuList::addChild(LayoutObject* newChild,
LayoutObject* beforeChild) {
m_innerBlock->addChild(newChild, beforeChild);
- ASSERT(m_innerBlock == firstChild());
+ DCHECK_EQ(m_innerBlock, firstChild());
if (AXObjectCache* cache = document().existingAXObjectCache())
cache->childrenChanged(this);
@@ -208,7 +208,7 @@ void LayoutMenuList::updateFromElement() {
locale.convertToLocalizedNumber(String::number(selectedCount));
text = locale.queryString(WebLocalizedString::SelectMenuListText,
localizedNumberString);
- ASSERT(!m_optionStyle);
+ DCHECK(!m_optionStyle);
}
} else {
if (option) {

Powered by Google App Engine
This is Rietveld 408576698