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/TableLayoutAlgorithmAuto.cpp

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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) 2002 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org)
3 * (C) 2002 Dirk Mueller (mueller@kde.org) 3 * (C) 2002 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License. 9 * version 2 of the License.
10 * 10 *
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 m_effectiveLogicalWidthDirty = false; 466 m_effectiveLogicalWidthDirty = false;
467 467
468 return std::min(maxLogicalWidth, INT_MAX / 2); 468 return std::min(maxLogicalWidth, INT_MAX / 2);
469 } 469 }
470 470
471 /* gets all cells that originate in a column and have a cellspan > 1 471 /* gets all cells that originate in a column and have a cellspan > 1
472 Sorts them by increasing cellspan 472 Sorts them by increasing cellspan
473 */ 473 */
474 void TableLayoutAlgorithmAuto::insertSpanCell(LayoutTableCell *cell) 474 void TableLayoutAlgorithmAuto::insertSpanCell(LayoutTableCell *cell)
475 { 475 {
476 ASSERT_ARG(cell, cell && cell->colSpan() != 1); 476 DCHECK(cell);
477 DCHECK_NE(cell->colSpan(), 1u);
477 if (!cell || cell->colSpan() == 1) 478 if (!cell || cell->colSpan() == 1)
478 return; 479 return;
479 480
480 unsigned size = m_spanCells.size(); 481 unsigned size = m_spanCells.size();
481 if (!size || m_spanCells[size-1] != 0) { 482 if (!size || m_spanCells[size-1] != 0) {
482 m_spanCells.grow(size + 10); 483 m_spanCells.grow(size + 10);
483 for (unsigned i = 0; i < 10; i++) 484 for (unsigned i = 0; i < 10; i++)
484 m_spanCells[size+i] = 0; 485 m_spanCells[size+i] = 0;
485 size += 10; 486 size += 10;
486 } 487 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 int reduce = available * minMaxDiff / logicalWidthBeyondMin; 695 int reduce = available * minMaxDiff / logicalWidthBeyondMin;
695 m_layoutStruct[i].computedLogicalWidth += reduce; 696 m_layoutStruct[i].computedLogicalWidth += reduce;
696 available -= reduce; 697 available -= reduce;
697 logicalWidthBeyondMin -= minMaxDiff; 698 logicalWidthBeyondMin -= minMaxDiff;
698 if (available >= 0) 699 if (available >= 0)
699 break; 700 break;
700 } 701 }
701 } 702 }
702 } 703 }
703 } // namespace blink 704 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | third_party/WebKit/Source/core/page/ContextMenuController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698