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

Side by Side Diff: Source/core/layout/LayoutTableSection.cpp

Issue 1062283002: Use C++11 range-based loop for core/layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix it naming Created 5 years, 8 months 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
« no previous file with comments | « Source/core/layout/LayoutFlowThread.cpp ('k') | Source/core/layout/SubtreeLayoutScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights 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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 if (!child->isText() && child->style()->logicalHeight().isPercen t() 992 if (!child->isText() && child->style()->logicalHeight().isPercen t()
993 && (flexAllChildren || shouldFlexCellChild(child)) 993 && (flexAllChildren || shouldFlexCellChild(child))
994 && (!child->isTable() || toLayoutTable(child)->hasSections() )) { 994 && (!child->isTable() || toLayoutTable(child)->hasSections() )) {
995 cellChildrenFlex = true; 995 cellChildrenFlex = true;
996 break; 996 break;
997 } 997 }
998 } 998 }
999 999
1000 if (!cellChildrenFlex) { 1000 if (!cellChildrenFlex) {
1001 if (TrackedRendererListHashSet* percentHeightDescendants = cell- >percentHeightDescendants()) { 1001 if (TrackedRendererListHashSet* percentHeightDescendants = cell- >percentHeightDescendants()) {
1002 TrackedRendererListHashSet::iterator end = percentHeightDesc endants->end(); 1002 for (auto* descendant : *percentHeightDescendants) {
1003 for (TrackedRendererListHashSet::iterator it = percentHeight Descendants->begin(); it != end; ++it) { 1003 if (flexAllChildren || shouldFlexCellChild(descendant)) {
1004 if (flexAllChildren || shouldFlexCellChild(*it)) {
1005 cellChildrenFlex = true; 1004 cellChildrenFlex = true;
1006 break; 1005 break;
1007 } 1006 }
1008 } 1007 }
1009 } 1008 }
1010 } 1009 }
1011 1010
1012 if (cellChildrenFlex) { 1011 if (cellChildrenFlex) {
1013 // Alignment within a cell is based off the calculated 1012 // Alignment within a cell is based off the calculated
1014 // height, which becomes irrelevant once the cell has 1013 // height, which becomes irrelevant once the cell has
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 // FIXME: The table's direction should determine our row's direction, not th e section's (see bug 96691). 1616 // FIXME: The table's direction should determine our row's direction, not th e section's (see bug 96691).
1618 if (!style()->isLeftToRightDirection()) 1617 if (!style()->isLeftToRightDirection())
1619 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); 1618 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing);
1620 else 1619 else
1621 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1620 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1622 1621
1623 cell->setLogicalLocation(cellLocation); 1622 cell->setLogicalLocation(cellLocation);
1624 } 1623 }
1625 1624
1626 } // namespace blink 1625 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFlowThread.cpp ('k') | Source/core/layout/SubtreeLayoutScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698