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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index f10f6cedcf210fca9c0f990dd5e8dff9d81ee92b..83a6e8c759a5fd8e8e09ecaed027f7cbae066cf4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -122,7 +122,7 @@ void LayoutTableCell::willBeRemovedFromTree() {
}
unsigned LayoutTableCell::parseColSpanFromDOM() const {
- ASSERT(node());
+ DCHECK(node());
// TODO(dgrogan): HTMLTableCellElement::colSpan() already clamps to something
// smaller than maxColumnIndex; can we just DCHECK here?
if (isHTMLTableCellElement(*node()))
@@ -132,7 +132,7 @@ unsigned LayoutTableCell::parseColSpanFromDOM() const {
}
unsigned LayoutTableCell::parseRowSpanFromDOM() const {
- ASSERT(node());
+ DCHECK(node());
if (isHTMLTableCellElement(*node()))
return std::min<unsigned>(toHTMLTableCellElement(*node()).rowSpan(),
maxRowIndex);
@@ -147,8 +147,8 @@ void LayoutTableCell::updateColAndRowSpanFlags() {
}
void LayoutTableCell::colSpanOrRowSpanChanged() {
- ASSERT(node());
- ASSERT(isHTMLTableCellElement(*node()));
+ DCHECK(node());
+ DCHECK(isHTMLTableCellElement(*node()));
updateColAndRowSpanFlags();
@@ -161,11 +161,11 @@ void LayoutTableCell::colSpanOrRowSpanChanged() {
Length LayoutTableCell::logicalWidthFromColumns(
LayoutTableCol* firstColForThisCell,
Length widthFromStyle) const {
- ASSERT(firstColForThisCell &&
- firstColForThisCell ==
- table()
- ->colElementAtAbsoluteColumn(absoluteColumnIndex())
- .innermostColOrColGroup());
+ DCHECK(firstColForThisCell);
+ DCHECK_EQ(firstColForThisCell,
+ table()
+ ->colElementAtAbsoluteColumn(absoluteColumnIndex())
+ .innermostColOrColGroup());
LayoutTableCol* tableCol = firstColForThisCell;
unsigned colSpanCount = colSpan();
@@ -300,7 +300,7 @@ void LayoutTableCell::setCellLogicalWidth(int tableLayoutLogicalWidth,
}
void LayoutTableCell::layout() {
- ASSERT(needsLayout());
+ DCHECK(needsLayout());
LayoutAnalyzer::Scope analyzer(*this);
int oldCellBaseline = cellBaselinePosition();
@@ -396,7 +396,7 @@ void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(
}
LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o) const {
- ASSERT(o == container());
+ DCHECK_EQ(o, container());
LayoutSize offset = LayoutBlockFlow::offsetFromContainer(o);
if (parent())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698