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

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

Issue 2146163005: [css-tables] Don't use internal layout structure when iterating all rows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 childrenOverflowChanged |= rowChildrenOverflowChanged; 1220 childrenOverflowChanged |= rowChildrenOverflowChanged;
1221 } 1221 }
1222 // TODO(crbug.com/604136): Add visual overflow from rows too. 1222 // TODO(crbug.com/604136): Add visual overflow from rows too.
1223 if (childrenOverflowChanged) 1223 if (childrenOverflowChanged)
1224 computeOverflowFromCells(totalRows, numEffCols); 1224 computeOverflowFromCells(totalRows, numEffCols);
1225 return childrenOverflowChanged; 1225 return childrenOverflowChanged;
1226 } 1226 }
1227 1227
1228 void LayoutTableSection::markAllCellsWidthsDirtyAndOrNeedsLayout(WhatToMarkAllCe lls whatToMark) 1228 void LayoutTableSection::markAllCellsWidthsDirtyAndOrNeedsLayout(WhatToMarkAllCe lls whatToMark)
1229 { 1229 {
1230 for (unsigned i = 0; i < numRows(); i++) { 1230 for (LayoutTableRow* row = firstRow(); row; row = row->nextRow()) {
1231 LayoutTableRow* row = rowLayoutObjectAt(i);
1232 if (!row)
1233 continue;
1234 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->nextCe ll()) { 1231 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->nextCe ll()) {
1235 cell->setPreferredLogicalWidthsDirty(); 1232 cell->setPreferredLogicalWidthsDirty();
1236 if (whatToMark == MarkDirtyAndNeedsLayout) 1233 if (whatToMark == MarkDirtyAndNeedsLayout)
1237 cell->setChildNeedsLayout(); 1234 cell->setChildNeedsLayout();
1238 } 1235 }
1239 } 1236 }
1240 } 1237 }
1241 1238
1242 int LayoutTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) cons t 1239 int LayoutTableSection::calcBlockDirectionOuterBorder(BlockBorderSide side) cons t
1243 { 1240 {
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, 1725 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery,
1729 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. 1726 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns.
1730 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. 1727 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates.
1731 if (table()->header() == this && hasRepeatingHeaderGroup()) 1728 if (table()->header() == this && hasRepeatingHeaderGroup())
1732 rect.setHeight(table()->logicalHeight()); 1729 rect.setHeight(table()->logicalHeight());
1733 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); 1730 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags);
1734 } 1731 }
1735 1732
1736 1733
1737 } // namespace blink 1734 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698