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

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

Issue 2013693002: [css-tables] Set table and cell widths dirty when section border changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle case where row is null Created 4 years, 5 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 m_table->setEffectiveColumnPosition(nEffCols, pos); 319 m_table->setEffectiveColumnPosition(nEffCols, pos);
320 } 320 }
321 321
322 void TableLayoutAlgorithmFixed::willChangeTableLayout() 322 void TableLayoutAlgorithmFixed::willChangeTableLayout()
323 { 323 {
324 // When switching table layout algorithm, we need to dirty the preferred 324 // When switching table layout algorithm, we need to dirty the preferred
325 // logical widths as we cleared the bits without computing them. 325 // logical widths as we cleared the bits without computing them.
326 // (see calcWidthArray above.) This optimization is preferred to always 326 // (see calcWidthArray above.) This optimization is preferred to always
327 // computing the logical widths we never intended to use. 327 // computing the logical widths we never intended to use.
328 m_table->recalcSectionsIfNeeded(); 328 m_table->recalcSectionsIfNeeded();
329 for (LayoutTableSection* section = m_table->topNonEmptySection(); section; s ection = m_table->sectionBelow(section)) { 329 for (LayoutTableSection* section = m_table->topNonEmptySection(); section; s ection = m_table->sectionBelow(section))
330 for (unsigned i = 0; i < section->numRows(); i++) { 330 section->markAllCellsWidthsDirtyAndOrNeedsLayout(LayoutTableSection::Mar kDirtyOnly);
331 LayoutTableRow* row = section->rowLayoutObjectAt(i);
332 if (!row)
333 continue;
334 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->ne xtCell())
335 cell->setPreferredLogicalWidthsDirty();
336 }
337 }
338 } 331 }
339 332
340 } // namespace blink 333 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | third_party/WebKit/Source/core/style/BorderData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698