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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableRow.cpp

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // to never clear its dirty bit, which stops the propagation. So 91 // to never clear its dirty bit, which stops the propagation. So
92 // anything under LayoutTableSection has to restart the propagation 92 // anything under LayoutTableSection has to restart the propagation
93 // at the table. 93 // at the table.
94 // TODO(dgrogan): Make LayoutTableSection clear its dirty bit. 94 // TODO(dgrogan): Make LayoutTableSection clear its dirty bit.
95 table->setPreferredLogicalWidthsDirty(); 95 table->setPreferredLogicalWidthsDirty();
96 } 96 }
97 } 97 }
98 98
99 const BorderValue& LayoutTableRow::borderAdjoiningStartCell( 99 const BorderValue& LayoutTableRow::borderAdjoiningStartCell(
100 const LayoutTableCell* cell) const { 100 const LayoutTableCell* cell) const {
101 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow()); 101 #if DCHECK_IS_ON()
102 DCHECK(cell->isFirstOrLastCellInRow());
103 #endif
102 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level. 104 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level.
103 return style()->borderStart(); 105 return style()->borderStart();
104 } 106 }
105 107
106 const BorderValue& LayoutTableRow::borderAdjoiningEndCell( 108 const BorderValue& LayoutTableRow::borderAdjoiningEndCell(
107 const LayoutTableCell* cell) const { 109 const LayoutTableCell* cell) const {
108 ASSERT_UNUSED(cell, cell->isFirstOrLastCellInRow()); 110 #if DCHECK_IS_ON()
111 DCHECK(cell->isFirstOrLastCellInRow());
112 #endif
109 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level. 113 // FIXME: https://webkit.org/b/79272 - Add support for mixed directionality at the cell level.
110 return style()->borderEnd(); 114 return style()->borderEnd();
111 } 115 }
112 116
113 void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild) { 117 void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild) {
114 if (!child->isTableCell()) { 118 if (!child->isTableCell()) {
115 LayoutObject* last = beforeChild; 119 LayoutObject* last = beforeChild;
116 if (!last) 120 if (!last)
117 last = lastCell(); 121 last = lastCell();
118 if (last && last->isAnonymous() && last->isTableCell() && 122 if (last && last->isAnonymous() && last->isTableCell() &&
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // the visual overflow should be determined in the coordinate system of 288 // the visual overflow should be determined in the coordinate system of
285 // the row, that's why we shift it below. 289 // the row, that's why we shift it below.
286 LayoutUnit cellOffsetLogicalTopDifference = 290 LayoutUnit cellOffsetLogicalTopDifference =
287 cell->location().y() - location().y(); 291 cell->location().y() - location().y();
288 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 292 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
289 293
290 addContentsVisualOverflow(cellVisualOverflowRect); 294 addContentsVisualOverflow(cellVisualOverflowRect);
291 } 295 }
292 296
293 } // namespace blink 297 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698