Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: Source/core/rendering/RenderTableRow.cpp

Issue 744493002: Let RenderTable reach table cells needing overflow recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: RenderTableRow::recomputeOverflow Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent) 240 RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb ject* parent)
241 { 241 {
242 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document() ); 242 RenderTableRow* newRow = RenderTableRow::createAnonymous(&parent->document() );
243 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW); 243 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_ROW);
244 newRow->setStyle(newStyle.release()); 244 newRow->setStyle(newStyle.release());
245 return newRow; 245 return newRow;
246 } 246 }
247 247
248 void RenderTableRow::recomputeOverflow()
249 {
250 clearAllOverflows();
251 addVisualEffectOverflow();
252 for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell())
253 addOverflowFromCell(cell);
254 }
255
248 void RenderTableRow::addOverflowFromCell(const RenderTableCell* cell) 256 void RenderTableRow::addOverflowFromCell(const RenderTableCell* cell)
249 { 257 {
250 // Non-row-spanning-cells don't create overflow (they are fully contained wi thin this row). 258 // Non-row-spanning-cells don't create overflow (they are fully contained wi thin this row).
259 // FIXME: This seems incorrect because cell may have visual effect overflow that should be included in this row.
251 if (cell->rowSpan() == 1) 260 if (cell->rowSpan() == 1)
252 return; 261 return;
253 262
254 // Cells only generates visual overflow. 263 // Cells only generates visual overflow.
255 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s tyle()); 264 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s tyle());
256 265
257 // The cell and the row share the section's coordinate system. However 266 // The cell and the row share the section's coordinate system. However
258 // the visual overflow should be determined in the coordinate system of 267 // the visual overflow should be determined in the coordinate system of
259 // the row, that's why we shift it below. 268 // the row, that's why we shift it below.
260 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y(); 269 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y();
261 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); 270 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference);
262 271
263 addVisualOverflow(cellVisualOverflowRect); 272 addVisualOverflow(cellVisualOverflowRect);
264 } 273 }
265 274
266 } // namespace blink 275 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698