| 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, 2008, 2009, 2010, 2013 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 10 * | 10 * |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 unsigned nEffCols) { | 1260 unsigned nEffCols) { |
| 1261 unsigned totalCellsCount = nEffCols * totalRows; | 1261 unsigned totalCellsCount = nEffCols * totalRows; |
| 1262 unsigned maxAllowedOverflowingCellsCount = | 1262 unsigned maxAllowedOverflowingCellsCount = |
| 1263 totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell | 1263 totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell |
| 1264 ? 0 | 1264 ? 0 |
| 1265 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount; | 1265 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount; |
| 1266 | 1266 |
| 1267 m_overflow.reset(); | 1267 m_overflow.reset(); |
| 1268 m_overflowingCells.clear(); | 1268 m_overflowingCells.clear(); |
| 1269 m_forceSlowPaintPathWithOverflowingCell = false; | 1269 m_forceSlowPaintPathWithOverflowingCell = false; |
| 1270 #if ENABLE(ASSERT) | 1270 #if DCHECK_IS_ON() |
| 1271 bool hasOverflowingCell = false; | 1271 bool hasOverflowingCell = false; |
| 1272 #endif | 1272 #endif |
| 1273 // Now that our height has been determined, add in overflow from cells. | 1273 // Now that our height has been determined, add in overflow from cells. |
| 1274 for (unsigned r = 0; r < totalRows; r++) { | 1274 for (unsigned r = 0; r < totalRows; r++) { |
| 1275 for (unsigned c = 0; c < numCols(r); c++) { | 1275 for (unsigned c = 0; c < numCols(r); c++) { |
| 1276 CellStruct& cs = cellAt(r, c); | 1276 CellStruct& cs = cellAt(r, c); |
| 1277 LayoutTableCell* cell = cs.primaryCell(); | 1277 LayoutTableCell* cell = cs.primaryCell(); |
| 1278 if (!cell || cs.inColSpan) | 1278 if (!cell || cs.inColSpan) |
| 1279 continue; | 1279 continue; |
| 1280 if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c)) | 1280 if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c)) |
| 1281 continue; | 1281 continue; |
| 1282 addOverflowFromChild(cell); | 1282 addOverflowFromChild(cell); |
| 1283 #if ENABLE(ASSERT) | 1283 #if DCHECK_IS_ON() |
| 1284 hasOverflowingCell |= cell->hasVisualOverflow(); | 1284 hasOverflowingCell |= cell->hasVisualOverflow(); |
| 1285 #endif | 1285 #endif |
| 1286 if (cell->hasVisualOverflow() && | 1286 if (cell->hasVisualOverflow() && |
| 1287 !m_forceSlowPaintPathWithOverflowingCell) { | 1287 !m_forceSlowPaintPathWithOverflowingCell) { |
| 1288 m_overflowingCells.add(cell); | 1288 m_overflowingCells.add(cell); |
| 1289 if (m_overflowingCells.size() > maxAllowedOverflowingCellsCount) { | 1289 if (m_overflowingCells.size() > maxAllowedOverflowingCellsCount) { |
| 1290 // We need to set m_forcesSlowPaintPath only if there is a least one | 1290 // We need to set m_forcesSlowPaintPath only if there is a least one |
| 1291 // overflowing cells as the hit testing code rely on this information. | 1291 // overflowing cells as the hit testing code rely on this information. |
| 1292 m_forceSlowPaintPathWithOverflowingCell = true; | 1292 m_forceSlowPaintPathWithOverflowingCell = true; |
| 1293 // The slow path does not make any use of the overflowing cells info, | 1293 // The slow path does not make any use of the overflowing cells info, |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 // the header in all columns. | 2071 // the header in all columns. |
| 2072 // Note that this is in flow thread coordinates, not visual coordinates. The | 2072 // Note that this is in flow thread coordinates, not visual coordinates. The |
| 2073 // enclosing LayoutFlowThread will convert to visual coordinates. | 2073 // enclosing LayoutFlowThread will convert to visual coordinates. |
| 2074 if (table()->header() == this && isRepeatingHeaderGroup()) | 2074 if (table()->header() == this && isRepeatingHeaderGroup()) |
| 2075 rect.setHeight(table()->logicalHeight()); | 2075 rect.setHeight(table()->logicalHeight()); |
| 2076 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, | 2076 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, |
| 2077 flags); | 2077 flags); |
| 2078 } | 2078 } |
| 2079 | 2079 |
| 2080 } // namespace blink | 2080 } // namespace blink |
| OLD | NEW |