| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 if (!cell->needsLayout()) | 174 if (!cell->needsLayout()) |
| 175 cell->markForPaginationRelayoutIfNeeded(layouter); | 175 cell->markForPaginationRelayoutIfNeeded(layouter); |
| 176 if (cell->needsLayout()) { | 176 if (cell->needsLayout()) { |
| 177 cell->computeAndSetBlockDirectionMargins(table()); | 177 cell->computeAndSetBlockDirectionMargins(table()); |
| 178 cell->layout(); | 178 cell->layout(); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 m_overflow.clear(); | 182 m_overflow.clear(); |
| 183 addVisualEffectOverflow(); | 183 addVisualEffectOverflow(); |
| 184 // We do not call addOverflowFromCell here. The cell are laid out to be |
| 185 // measured above and will be sized correctly in a follow-up phase. |
| 184 | 186 |
| 185 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need | 187 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need |
| 186 // layout, so we know that our bounds didn't change. This code is just makin
g up for | 188 // layout, so we know that our bounds didn't change. This code is just makin
g up for |
| 187 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. | 189 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. |
| 188 if (selfNeedsLayout()) { | 190 if (selfNeedsLayout()) { |
| 189 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell())
{ | 191 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell())
{ |
| 190 // FIXME: Is this needed when issuing paint invalidations after layo
ut? | 192 // FIXME: Is this needed when issuing paint invalidations after layo
ut? |
| 191 cell->setShouldDoFullPaintInvalidation(); | 193 cell->setShouldDoFullPaintInvalidation(); |
| 192 } | 194 } |
| 193 } | 195 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 239 } |
| 238 | 240 |
| 239 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb
ject* parent) | 241 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb
ject* parent) |
| 240 { | 242 { |
| 241 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document()
); | 243 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document()
); |
| 242 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW); | 244 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_ROW); |
| 243 newRow->setStyle(newStyle.release()); | 245 newRow->setStyle(newStyle.release()); |
| 244 return newRow; | 246 return newRow; |
| 245 } | 247 } |
| 246 | 248 |
| 249 void RenderTableRow::addOverflowFromCell(const RenderTableCell* cell) |
| 250 { |
| 251 // Non-row-spanning-cells don't create overflow (they are fully contained wi
thin this row). |
| 252 if (cell->rowSpan() == 1) |
| 253 return; |
| 254 |
| 255 // Cells only generates visual overflow. |
| 256 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s
tyle()); |
| 257 |
| 258 // The cell and the row share the section's coordinate system. However |
| 259 // the visual overflow should be determined in the coordinate system of |
| 260 // the row, that's why we shift it below. |
| 261 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
| 262 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); |
| 263 |
| 264 addVisualOverflow(cellVisualOverflowRect); |
| 265 } |
| 266 |
| 247 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |