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

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

Issue 2630723002: Fix blink_perf.paint regression about tables (Closed)
Patch Set: Nits 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) 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, 2009, 2013 Apple Inc. All rights 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights
8 * reserved. 8 * reserved.
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 const LayoutTableCell* firstRowCellAdjoiningTableStart() const; 211 const LayoutTableCell* firstRowCellAdjoiningTableStart() const;
212 const LayoutTableCell* firstRowCellAdjoiningTableEnd() const; 212 const LayoutTableCell* firstRowCellAdjoiningTableEnd() const;
213 213
214 CellStruct& cellAt(unsigned row, unsigned effectiveColumn) { 214 CellStruct& cellAt(unsigned row, unsigned effectiveColumn) {
215 return m_grid[row].row[effectiveColumn]; 215 return m_grid[row].row[effectiveColumn];
216 } 216 }
217 const CellStruct& cellAt(unsigned row, unsigned effectiveColumn) const { 217 const CellStruct& cellAt(unsigned row, unsigned effectiveColumn) const {
218 return m_grid[row].row[effectiveColumn]; 218 return m_grid[row].row[effectiveColumn];
219 } 219 }
220 LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) { 220 LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) {
221 if (effectiveColumn >= numCols(row)) 221 Row& rowVector = m_grid[row].row;
222 if (effectiveColumn >= rowVector.size())
222 return nullptr; 223 return nullptr;
223 CellStruct& c = m_grid[row].row[effectiveColumn]; 224 return rowVector[effectiveColumn].primaryCell();
224 return c.primaryCell();
225 } 225 }
226 const LayoutTableCell* primaryCellAt(unsigned row, 226 const LayoutTableCell* primaryCellAt(unsigned row,
227 unsigned effectiveColumn) const { 227 unsigned effectiveColumn) const {
228 return const_cast<LayoutTableSection*>(this)->primaryCellAt( 228 return const_cast<LayoutTableSection*>(this)->primaryCellAt(
229 row, effectiveColumn); 229 row, effectiveColumn);
230 } 230 }
231 231
232 unsigned numCols(unsigned row) const { return m_grid[row].row.size(); } 232 unsigned numCols(unsigned row) const { return m_grid[row].row.size(); }
233 233
234 // Returns null for cells with a rowspan that exceed the last row. Possibly 234 // Returns null for cells with a rowspan that exceed the last row. Possibly
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // The use is to disable a painting optimization where we just paint the 475 // The use is to disable a painting optimization where we just paint the
476 // invalidated cells. 476 // invalidated cells.
477 bool m_hasMultipleCellLevels; 477 bool m_hasMultipleCellLevels;
478 }; 478 };
479 479
480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
481 481
482 } // namespace blink 482 } // namespace blink
483 483
484 #endif // LayoutTableSection_h 484 #endif // LayoutTableSection_h
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