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

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

Issue 2382733002: Introduce markChildForPaginationRelayoutIfNeeded(). (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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 { 173 {
174 ASSERT(needsLayout()); 174 ASSERT(needsLayout());
175 LayoutAnalyzer::Scope analyzer(*this); 175 LayoutAnalyzer::Scope analyzer(*this);
176 176
177 // Table rows do not add translation. 177 // Table rows do not add translation.
178 LayoutState state(*this, LayoutSize()); 178 LayoutState state(*this, LayoutSize());
179 179
180 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { 180 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
181 SubtreeLayoutScope layouter(*cell); 181 SubtreeLayoutScope layouter(*cell);
182 if (!cell->needsLayout()) 182 if (!cell->needsLayout())
183 cell->markForPaginationRelayoutIfNeeded(layouter); 183 markChildForPaginationRelayoutIfNeeded(*cell, layouter);
184 if (cell->needsLayout()) 184 if (cell->needsLayout())
185 cell->layout(); 185 cell->layout();
186 // We're laying out each cell here to establish its raw logical height s o it can be used to 186 // We're laying out each cell here to establish its raw logical height s o it can be used to
187 // figure out the row's height and baseline later on in layoutRows(). As part of that we 187 // figure out the row's height and baseline later on in layoutRows(). As part of that we
188 // will layout the cell again if we're in a paginated context and come u p with the 188 // will layout the cell again if we're in a paginated context and come u p with the
189 // correct strut. Any strut we come up with here will depend on the old paged layout and will 189 // correct strut. Any strut we come up with here will depend on the old paged layout and will
190 // give the cell an invalid height that is not useful for figuring out t he raw height of the row. 190 // give the cell an invalid height that is not useful for figuring out t he raw height of the row.
191 if (cell->firstRootBox() && cell->firstRootBox()->paginationStrut()) 191 if (cell->firstRootBox() && cell->firstRootBox()->paginationStrut())
192 cell->setLogicalHeight(cell->logicalHeight() - cell->firstRootBox()- >paginationStrut()); 192 cell->setLogicalHeight(cell->logicalHeight() - cell->firstRootBox()- >paginationStrut());
193 } 193 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // The cell and the row share the section's coordinate system. However 274 // The cell and the row share the section's coordinate system. However
275 // the visual overflow should be determined in the coordinate system of 275 // the visual overflow should be determined in the coordinate system of
276 // the row, that's why we shift it below. 276 // the row, that's why we shift it below.
277 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y(); 277 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y();
278 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 278 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
279 279
280 addContentsVisualOverflow(cellVisualOverflowRect); 280 addContentsVisualOverflow(cellVisualOverflowRect);
281 } 281 }
282 282
283 } // namespace blink 283 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698