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

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

Issue 2458823002: Don't establish LayoutState for LayoutTableRow objects. (Closed)
Patch Set: Created 4 years, 1 month 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 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013
8 * Apple Inc. 8 * Apple Inc.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 if (beforeChild || nextRow()) 185 if (beforeChild || nextRow())
186 section()->setNeedsCellRecalc(); 186 section()->setNeedsCellRecalc();
187 } 187 }
188 188
189 void LayoutTableRow::layout() { 189 void LayoutTableRow::layout() {
190 ASSERT(needsLayout()); 190 ASSERT(needsLayout());
191 LayoutAnalyzer::Scope analyzer(*this); 191 LayoutAnalyzer::Scope analyzer(*this);
192 192
193 // Table rows do not add translation.
194 LayoutState state(*this, LayoutSize());
195
196 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { 193 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
197 SubtreeLayoutScope layouter(*cell); 194 SubtreeLayoutScope layouter(*cell);
198 cell->setLogicalTop(logicalTop()); 195 cell->setLogicalTop(logicalTop());
199 if (!cell->needsLayout()) 196 if (!cell->needsLayout())
200 markChildForPaginationRelayoutIfNeeded(*cell, layouter); 197 section()->markChildForPaginationRelayoutIfNeeded(*cell, layouter);
201 if (cell->needsLayout()) 198 if (cell->needsLayout())
202 cell->layout(); 199 cell->layout();
203 } 200 }
204 201
205 m_overflow.reset(); 202 m_overflow.reset();
206 addVisualEffectOverflow(); 203 addVisualEffectOverflow();
207 // We do not call addOverflowFromCell here. The cell are laid out to be 204 // We do not call addOverflowFromCell here. The cell are laid out to be
208 // measured above and will be sized correctly in a follow-up phase. 205 // measured above and will be sized correctly in a follow-up phase.
209 206
210 // We only ever need to issue paint invalidations if our cells didn't, which 207 // We only ever need to issue paint invalidations if our cells didn't, which
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // the visual overflow should be determined in the coordinate system of 303 // the visual overflow should be determined in the coordinate system of
307 // the row, that's why we shift it below. 304 // the row, that's why we shift it below.
308 LayoutUnit cellOffsetLogicalTopDifference = 305 LayoutUnit cellOffsetLogicalTopDifference =
309 cell->location().y() - location().y(); 306 cell->location().y() - location().y();
310 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 307 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
311 308
312 addContentsVisualOverflow(cellVisualOverflowRect); 309 addContentsVisualOverflow(cellVisualOverflowRect);
313 } 310 }
314 311
315 } // namespace blink 312 } // 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