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, 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 979 matching lines...) Loading... |
990 // | 990 // |
991 // Note also the oddity where replaced elements always flex, and yet
blocks/tables do | 991 // Note also the oddity where replaced elements always flex, and yet
blocks/tables do |
992 // not necessarily flex. WinIE is crazy and inconsistent, and we ca
n't hope to | 992 // not necessarily flex. WinIE is crazy and inconsistent, and we ca
n't hope to |
993 // match the behavior perfectly, but we'll continue to refine it as
we discover new | 993 // match the behavior perfectly, but we'll continue to refine it as
we discover new |
994 // bugs. :) | 994 // bugs. :) |
995 bool cellChildrenFlex = false; | 995 bool cellChildrenFlex = false; |
996 bool flexAllChildren = cell->style()->logicalHeight().isFixed() | 996 bool flexAllChildren = cell->style()->logicalHeight().isFixed() |
997 || (!table()->style()->logicalHeight().isAuto() && rHeight != ce
ll->logicalHeight()); | 997 || (!table()->style()->logicalHeight().isAuto() && rHeight != ce
ll->logicalHeight()); |
998 | 998 |
999 for (LayoutObject* child = cell->firstChild(); child; child = child-
>nextSibling()) { | 999 for (LayoutObject* child = cell->firstChild(); child; child = child-
>nextSibling()) { |
1000 if (!child->isText() && child->style()->logicalHeight().hasPerce
nt() | 1000 if (child->style()->logicalHeight().hasPercent() |
1001 && (flexAllChildren || shouldFlexCellChild(child)) | 1001 && (flexAllChildren || shouldFlexCellChild(child)) |
1002 && (!child->isTable() || toLayoutTable(child)->hasSections()
)) { | 1002 && (!child->isTable() || toLayoutTable(child)->hasSections()
)) { |
1003 cellChildrenFlex = true; | 1003 cellChildrenFlex = true; |
1004 break; | 1004 break; |
1005 } | 1005 } |
1006 } | 1006 } |
1007 | 1007 |
1008 if (!cellChildrenFlex) { | 1008 if (!cellChildrenFlex) { |
1009 if (TrackedLayoutBoxListHashSet* percentHeightDescendants = cell
->percentHeightDescendants()) { | 1009 if (TrackedLayoutBoxListHashSet* percentHeightDescendants = cell
->percentHeightDescendants()) { |
1010 for (auto* descendant : *percentHeightDescendants) { | 1010 for (auto* descendant : *percentHeightDescendants) { |
(...skipping 611 matching lines...) Loading... |
1622 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1622 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
1623 if (!style()->isLeftToRightDirection()) | 1623 if (!style()->isLeftToRightDirection()) |
1624 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); | 1624 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta
ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] +
horizontalBorderSpacing); |
1625 else | 1625 else |
1626 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); | 1626 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont
alBorderSpacing); |
1627 | 1627 |
1628 cell->setLogicalLocation(cellLocation); | 1628 cell->setLogicalLocation(cellLocation); |
1629 } | 1629 } |
1630 | 1630 |
1631 } // namespace blink | 1631 } // namespace blink |
OLD | NEW |