| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/TableSectionPainter.h" | 5 #include "core/paint/TableSectionPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutTableCell.h" | 7 #include "core/layout/LayoutTableCell.h" |
| 8 #include "core/layout/LayoutTableCol.h" | 8 #include "core/layout/LayoutTableCol.h" |
| 9 #include "core/layout/LayoutTableRow.h" | 9 #include "core/layout/LayoutTableRow.h" |
| 10 #include "core/paint/BoxClipper.h" | 10 #include "core/paint/BoxClipper.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 paintOffset); | 304 paintOffset); |
| 305 for (unsigned c = dirtiedColumns.start(); c < dirtiedColumns.end(); c++) { | 305 for (unsigned c = dirtiedColumns.start(); c < dirtiedColumns.end(); c++) { |
| 306 if (c >= m_layoutTableSection.numCols(r)) | 306 if (c >= m_layoutTableSection.numCols(r)) |
| 307 break; | 307 break; |
| 308 const LayoutTableSection::CellStruct& current = | 308 const LayoutTableSection::CellStruct& current = |
| 309 m_layoutTableSection.cellAt(r, c); | 309 m_layoutTableSection.cellAt(r, c); |
| 310 for (LayoutTableCell* cell : current.cells) { | 310 for (LayoutTableCell* cell : current.cells) { |
| 311 if (overflowingCells.contains(cell)) | 311 if (overflowingCells.contains(cell)) |
| 312 continue; | 312 continue; |
| 313 if (cell->rowSpan() > 1 || cell->colSpan() > 1) { | 313 if (cell->rowSpan() > 1 || cell->colSpan() > 1) { |
| 314 if (!spanningCells.add(cell).isNewEntry) | 314 if (!spanningCells.insert(cell).isNewEntry) |
| 315 continue; | 315 continue; |
| 316 } | 316 } |
| 317 cells.push_back(cell); | 317 cells.push_back(cell); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 // Sort the dirty cells by paint order. | 322 // Sort the dirty cells by paint order. |
| 323 if (!overflowingCells.size()) | 323 if (!overflowingCells.size()) |
| 324 std::stable_sort(cells.begin(), cells.end(), compareCellPositions); | 324 std::stable_sort(cells.begin(), cells.end(), compareCellPositions); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 m_layoutTableSection.styleRef()); | 405 m_layoutTableSection.styleRef()); |
| 406 } else { | 406 } else { |
| 407 // TODO(wangxianzhu): Calculate the inset shadow bounds by insetting | 407 // TODO(wangxianzhu): Calculate the inset shadow bounds by insetting |
| 408 // paintRect by half widths of collapsed borders. | 408 // paintRect by half widths of collapsed borders. |
| 409 BoxPainter::paintInsetBoxShadow(paintInfo, paintRect, | 409 BoxPainter::paintInsetBoxShadow(paintInfo, paintRect, |
| 410 m_layoutTableSection.styleRef()); | 410 m_layoutTableSection.styleRef()); |
| 411 } | 411 } |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace blink | 414 } // namespace blink |
| OLD | NEW |