Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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)) | |
|
mstensho (USE GERRIT)
2017/01/20 10:02:04
I find it strange that this makes a lot of differe
a.suchit
2017/01/23 06:35:32
Done.
| |
| 222 return nullptr; | |
| 223 CellStruct& c = m_grid[row].row[effectiveColumn]; | 221 CellStruct& c = m_grid[row].row[effectiveColumn]; |
| 224 return c.primaryCell(); | 222 return c.primaryCell(); |
| 225 } | 223 } |
| 226 const LayoutTableCell* primaryCellAt(unsigned row, | 224 const LayoutTableCell* primaryCellAt(unsigned row, |
| 227 unsigned effectiveColumn) const { | 225 unsigned effectiveColumn) const { |
| 228 return const_cast<LayoutTableSection*>(this)->primaryCellAt( | 226 return const_cast<LayoutTableSection*>(this)->primaryCellAt( |
| 229 row, effectiveColumn); | 227 row, effectiveColumn); |
| 230 } | 228 } |
| 231 | 229 |
| 232 unsigned numCols(unsigned row) const { return m_grid[row].row.size(); } | 230 unsigned numCols(unsigned row) const { return m_grid[row].row.size(); } |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 // The use is to disable a painting optimization where we just paint the | 473 // The use is to disable a painting optimization where we just paint the |
| 476 // invalidated cells. | 474 // invalidated cells. |
| 477 bool m_hasMultipleCellLevels; | 475 bool m_hasMultipleCellLevels; |
| 478 }; | 476 }; |
| 479 | 477 |
| 480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); | 478 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); |
| 481 | 479 |
| 482 } // namespace blink | 480 } // namespace blink |
| 483 | 481 |
| 484 #endif // LayoutTableSection_h | 482 #endif // LayoutTableSection_h |
| OLD | NEW |