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

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

Issue 744493002: Let RenderTable reach table cells needing overflow recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments 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 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 void RenderTable::simplifiedNormalFlowLayout() 388 void RenderTable::simplifiedNormalFlowLayout()
389 { 389 {
390 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) { 390 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) {
391 section->layoutIfNeeded(); 391 section->layoutIfNeeded();
392 section->computeOverflowFromCells(); 392 section->computeOverflowFromCells();
393 } 393 }
394 } 394 }
395 395
396 bool RenderTable::recalcChildOverflowAfterStyleChange()
397 {
398 ASSERT(childNeedsOverflowRecalcAfterStyleChange());
399 clearChildNeedsOverflowRecalcAfterStyleChange();
400
401 bool childrenOverflowChanged = false;
402 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) {
403 if (!section->childNeedsOverflowRecalcAfterStyleChange())
404 continue;
405 if (section->recalcChildOverflowAfterStyleChange())
406 childrenOverflowChanged = true;
Julien - ping for review 2014/11/26 19:23:33 The new code is better! I would still keep this on
407 }
408 return childrenOverflowChanged;
409 }
410
396 void RenderTable::layout() 411 void RenderTable::layout()
397 { 412 {
398 ASSERT(needsLayout()); 413 ASSERT(needsLayout());
399 414
400 if (simplifiedLayout()) 415 if (simplifiedLayout())
401 return; 416 return;
402 417
403 // Note: RenderTable is handled differently than other RenderBlocks and the LayoutScope 418 // Note: RenderTable is handled differently than other RenderBlocks and the LayoutScope
404 // must be created before the table begins laying out. 419 // must be created before the table begins laying out.
405 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); 420 TextAutosizer::LayoutScope textAutosizerLayoutScope(this);
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1352 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1338 { 1353 {
1339 ASSERT(cell->isFirstOrLastCellInRow()); 1354 ASSERT(cell->isFirstOrLastCellInRow());
1340 if (hasSameDirectionAs(cell->row())) 1355 if (hasSameDirectionAs(cell->row()))
1341 return style()->borderEnd(); 1356 return style()->borderEnd();
1342 1357
1343 return style()->borderStart(); 1358 return style()->borderStart();
1344 } 1359 }
1345 1360
1346 } 1361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698