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, 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 as part of layout as the cells are not fully laid out. | |
| 
 
dsinclair
2014/10/23 14:22:01
Can we reword this since it's not that we don't ca
 
Julien - ping for review
2014/10/23 18:40:08
Sure!
 
 | |
| 184 | 185 | 
| 185 // We only ever need to issue paint invalidations if our cells didn't, which means that they didn't need | 186 // 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 | 187 // 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. | 188 // the fact that we did not invalidate paints in setStyle() because we had a layout hint. | 
| 188 if (selfNeedsLayout()) { | 189 if (selfNeedsLayout()) { | 
| 189 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 190 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 
| 190 // FIXME: Is this needed when issuing paint invalidations after layo ut? | 191 // FIXME: Is this needed when issuing paint invalidations after layo ut? | 
| 191 cell->setShouldDoFullPaintInvalidation(); | 192 cell->setShouldDoFullPaintInvalidation(); | 
| 192 } | 193 } | 
| 193 } | 194 } | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 } | 238 } | 
| 238 | 239 | 
| 239 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent) | 240 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent) | 
| 240 { | 241 { | 
| 241 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document() ); | 242 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document() ); | 
| 242 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW); | 243 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW); | 
| 243 newRow->setStyle(newStyle.release()); | 244 newRow->setStyle(newStyle.release()); | 
| 244 return newRow; | 245 return newRow; | 
| 245 } | 246 } | 
| 246 | 247 | 
| 248 void RenderTableRow::addOverflowFromCell(const RenderTableCell* cell) | |
| 249 { | |
| 250 // Non-row-spanning-cells don't create overflow (they are fully contained wi thin this row). | |
| 251 if (cell->rowSpan() == 1) | |
| 252 return; | |
| 253 | |
| 254 // Cells only generates visual overflow. | |
| 255 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s tyle()); | |
| 256 // The cell and the row share the section's coordinate system so we | |
| 257 // need to shift the cell to be in the row's coordinate system. | |
| 
 
dsinclair
2014/10/23 14:22:01
I don't understand this comment. If cell and row s
 
Julien - ping for review
2014/10/23 18:40:08
They are both in the section's coordinate system,
 
 | |
| 258 // RenderTableCell::location() seems bogus for that, so using the different rows. | |
| 
 
dsinclair
2014/10/23 14:22:01
Any reason why this is bogus? Should we have a fix
 
Julien - ping for review
2014/10/23 18:40:08
I was going to say that I am pretty sure we don't
 
 | |
| 259 unsigned row = cell->rowIndex(); | |
| 260 RenderTableRow* cellStartingRow = section()->rowRendererAt(row); | |
| 261 LayoutUnit cellOffsetLogicalTopDifference = cellStartingRow->location().y() + cell->intrinsicPaddingBefore() - location().y(); | |
| 262 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); | |
| 263 | |
| 264 addVisualOverflow(cellVisualOverflowRect); | |
| 265 } | |
| 266 | |
| 247 } // namespace blink | 267 } // namespace blink | 
| OLD | NEW |