| 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, 2007, 2008, 2009, 2010, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 | 231 |
| 232 LayoutTableRow* LayoutTableRow::createAnonymousWithParent(const LayoutObject* pa
rent) | 232 LayoutTableRow* LayoutTableRow::createAnonymousWithParent(const LayoutObject* pa
rent) |
| 233 { | 233 { |
| 234 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document()
); | 234 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document()
); |
| 235 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), TABLE_ROW); | 235 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parent->styleRef(), TABLE_ROW); |
| 236 newRow->setStyle(newStyle.release()); | 236 newRow->setStyle(newStyle.release()); |
| 237 return newRow; | 237 return newRow; |
| 238 } | 238 } |
| 239 | 239 |
| 240 void LayoutTableRow::recalculateOverflow() |
| 241 { |
| 242 clearAllOverflows(); |
| 243 addVisualEffectOverflow(); |
| 244 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) |
| 245 addOverflowFromCell(cell); |
| 246 } |
| 247 |
| 240 void LayoutTableRow::addOverflowFromCell(const LayoutTableCell* cell) | 248 void LayoutTableRow::addOverflowFromCell(const LayoutTableCell* cell) |
| 241 { | 249 { |
| 242 // Non-row-spanning-cells don't create overflow (they are fully contained wi
thin this row). | 250 // Non-row-spanning-cells don't create overflow (they are fully contained wi
thin this row). |
| 251 // TODO(crbug.com/603993): This seems incorrect because cell may have visual
effect overflow that should be included in this row. |
| 243 if (cell->rowSpan() == 1) | 252 if (cell->rowSpan() == 1) |
| 244 return; | 253 return; |
| 245 | 254 |
| 246 // Cells only generates visual overflow. | 255 // Cells only generates visual overflow. |
| 247 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s
tyleRef()); | 256 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s
tyleRef()); |
| 248 | 257 |
| 249 // The cell and the row share the section's coordinate system. However | 258 // The cell and the row share the section's coordinate system. However |
| 250 // the visual overflow should be determined in the coordinate system of | 259 // the visual overflow should be determined in the coordinate system of |
| 251 // the row, that's why we shift it below. | 260 // the row, that's why we shift it below. |
| 252 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); | 261 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
| 253 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 262 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
| 254 | 263 |
| 255 addVisualOverflow(cellVisualOverflowRect); | 264 addVisualOverflow(cellVisualOverflowRect); |
| 256 } | 265 } |
| 257 | 266 |
| 258 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |