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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 795 |
796 ASSERT(!needsLayout()); | 796 ASSERT(!needsLayout()); |
797 | 797 |
798 return m_rowPos[m_grid.size()]; | 798 return m_rowPos[m_grid.size()]; |
799 } | 799 } |
800 | 800 |
801 void LayoutTableSection::layout() | 801 void LayoutTableSection::layout() |
802 { | 802 { |
803 ASSERT(needsLayout()); | 803 ASSERT(needsLayout()); |
804 LayoutAnalyzer::Scope analyzer(*this); | 804 LayoutAnalyzer::Scope analyzer(*this); |
805 // TODO(dgrogan): Change this to RELEASE_ASSERT(!needsCellRecalc()) once | 805 RELEASE_ASSERT(!needsCellRecalc()); |
806 // containment and tables play nicely. https://crbug.com/616643 | |
807 if (needsCellRecalc()) | |
808 return; | |
809 ASSERT(!table()->needsSectionRecalc()); | 806 ASSERT(!table()->needsSectionRecalc()); |
810 | 807 |
811 // addChild may over-grow m_grid but we don't want to throw away the memory
too early as addChild | 808 // addChild may over-grow m_grid but we don't want to throw away the memory
too early as addChild |
812 // can be called in a loop (e.g during parsing). Doing it now ensures we hav
e a stable-enough structure. | 809 // can be called in a loop (e.g during parsing). Doing it now ensures we hav
e a stable-enough structure. |
813 m_grid.shrinkToFit(); | 810 m_grid.shrinkToFit(); |
814 | 811 |
815 LayoutState state(*this, locationOffset()); | 812 LayoutState state(*this, locationOffset()); |
816 | 813 |
817 const Vector<int>& columnPos = table()->effectiveColumnPositions(); | 814 const Vector<int>& columnPos = table()->effectiveColumnPositions(); |
818 | 815 |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). | 1668 // FIXME: The table's direction should determine our row's direction, not th
e section's (see bug 96691). |
1672 if (!style()->isLeftToRightDirection()) | 1669 if (!style()->isLeftToRightDirection()) |
1673 cellLocation.setX(LayoutUnit(table()->effectiveColumnPositions()[table()
->numEffectiveColumns()] - table()->effectiveColumnPositions()[table()->absolute
ColumnToEffectiveColumn(cell->absoluteColumnIndex() + cell->colSpan())] + horizo
ntalBorderSpacing)); | 1670 cellLocation.setX(LayoutUnit(table()->effectiveColumnPositions()[table()
->numEffectiveColumns()] - table()->effectiveColumnPositions()[table()->absolute
ColumnToEffectiveColumn(cell->absoluteColumnIndex() + cell->colSpan())] + horizo
ntalBorderSpacing)); |
1674 else | 1671 else |
1675 cellLocation.setX(LayoutUnit(table()->effectiveColumnPositions()[effecti
veColumn] + horizontalBorderSpacing)); | 1672 cellLocation.setX(LayoutUnit(table()->effectiveColumnPositions()[effecti
veColumn] + horizontalBorderSpacing)); |
1676 | 1673 |
1677 cell->setLogicalLocation(cellLocation); | 1674 cell->setLogicalLocation(cellLocation); |
1678 } | 1675 } |
1679 | 1676 |
1680 } // namespace blink | 1677 } // namespace blink |
OLD | NEW |