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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 if ((!tw.isAuto() && !tw.isPercentOrCalc()) || 229 if ((!tw.isAuto() && !tw.isPercentOrCalc()) ||
230 table->isOutOfFlowPositioned()) 230 table->isOutOfFlowPositioned())
231 return true; 231 return true;
232 LayoutBlock* cb = table->containingBlock(); 232 LayoutBlock* cb = table->containingBlock();
233 233
234 while (!cb->isLayoutView() && !cb->isTableCell() && 234 while (!cb->isLayoutView() && !cb->isTableCell() &&
235 cb->style()->width().isAuto() && !cb->isOutOfFlowPositioned()) 235 cb->style()->width().isAuto() && !cb->isOutOfFlowPositioned())
236 cb = cb->containingBlock(); 236 cb = cb->containingBlock();
237 237
238 // TODO(dgrogan): Should the second clause check for isFixed() instead? 238 // TODO(dgrogan): Should the second clause check for isFixed() instead?
239 if (!cb->isTableCell() || (!cb->style()->width().isAuto() && 239 if (!cb->isTableCell() ||
240 !cb->style()->width().isPercentOrCalc())) 240 (!cb->style()->width().isAuto() &&
241 !cb->style()->width().isPercentOrCalc()))
241 return true; 242 return true;
242 243
243 LayoutTableCell* cell = toLayoutTableCell(cb); 244 LayoutTableCell* cell = toLayoutTableCell(cb);
244 table = cell->table(); 245 table = cell->table();
245 if (cell->colSpan() > 1 || table->isLogicalWidthAuto()) 246 if (cell->colSpan() > 1 || table->isLogicalWidthAuto())
246 return false; 247 return false;
247 } 248 }
248 NOTREACHED(); 249 NOTREACHED();
249 return true; 250 return true;
250 } 251 }
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 int reduce = available * minMaxDiff / logicalWidthBeyondMin; 854 int reduce = available * minMaxDiff / logicalWidthBeyondMin;
854 m_layoutStruct[i].computedLogicalWidth += reduce; 855 m_layoutStruct[i].computedLogicalWidth += reduce;
855 available -= reduce; 856 available -= reduce;
856 logicalWidthBeyondMin -= minMaxDiff; 857 logicalWidthBeyondMin -= minMaxDiff;
857 if (available >= 0) 858 if (available >= 0)
858 break; 859 break;
859 } 860 }
860 } 861 }
861 } 862 }
862 } // namespace blink 863 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698