| 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, 2009, 2010 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 class LayoutTableCol; | 38 class LayoutTableCol; |
| 39 class LayoutTableCaption; | 39 class LayoutTableCaption; |
| 40 class LayoutTableCell; | 40 class LayoutTableCell; |
| 41 class LayoutTableSection; | 41 class LayoutTableSection; |
| 42 class TableLayoutAlgorithm; | 42 class TableLayoutAlgorithm; |
| 43 | 43 |
| 44 enum SkipEmptySectionsValue { DoNotSkipEmptySections, SkipEmptySections }; | 44 enum SkipEmptySectionsValue { DoNotSkipEmptySections, SkipEmptySections }; |
| 45 enum TableHeightChangingValue { TableHeightNotChanging, TableHeightChanging }; |
| 45 | 46 |
| 46 // LayoutTable is the LayoutObject associated with | 47 // LayoutTable is the LayoutObject associated with |
| 47 // display: table or inline-table. | 48 // display: table or inline-table. |
| 48 // | 49 // |
| 49 // LayoutTable is the master coordinator for determining the overall table | 50 // LayoutTable is the master coordinator for determining the overall table |
| 50 // structure. The reason is that LayoutTableSection children have a local | 51 // structure. The reason is that LayoutTableSection children have a local |
| 51 // view over what their structure is but don't account for other | 52 // view over what their structure is but don't account for other |
| 52 // LayoutTableSection. Thus LayoutTable helps keep consistency across | 53 // LayoutTableSection. Thus LayoutTable helps keep consistency across |
| 53 // LayoutTableSection. See e.g. |m_effectiveColumns| below. | 54 // LayoutTableSection. See e.g. |m_effectiveColumns| below. |
| 54 // | 55 // |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 LayoutRect overflowClipRect( | 509 LayoutRect overflowClipRect( |
| 509 const LayoutPoint& location, | 510 const LayoutPoint& location, |
| 510 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override; | 511 OverlayScrollbarClipBehavior = IgnoreOverlayScrollbarSize) const override; |
| 511 | 512 |
| 512 void addOverflowFromChildren() override; | 513 void addOverflowFromChildren() override; |
| 513 | 514 |
| 514 void recalcSections() const; | 515 void recalcSections() const; |
| 515 void layoutCaption(LayoutTableCaption&, SubtreeLayoutScope&); | 516 void layoutCaption(LayoutTableCaption&, SubtreeLayoutScope&); |
| 516 void layoutSection(LayoutTableSection&, | 517 void layoutSection(LayoutTableSection&, |
| 517 SubtreeLayoutScope&, | 518 SubtreeLayoutScope&, |
| 518 LayoutUnit logicalLeft); | 519 LayoutUnit logicalLeft, |
| 520 TableHeightChangingValue); |
| 519 | 521 |
| 520 // Return the logical height based on the height, min-height and max-height | 522 // Return the logical height based on the height, min-height and max-height |
| 521 // properties from CSS. Will return 0 if auto. | 523 // properties from CSS. Will return 0 if auto. |
| 522 LayoutUnit logicalHeightFromStyle() const; | 524 LayoutUnit logicalHeightFromStyle() const; |
| 523 | 525 |
| 524 void distributeExtraLogicalHeight(int extraLogicalHeight); | 526 void distributeExtraLogicalHeight(int extraLogicalHeight); |
| 525 | 527 |
| 526 void recalcCollapsedBordersIfNeeded(); | 528 void recalcCollapsedBordersIfNeeded(); |
| 527 | 529 |
| 528 // TODO(layout-dev): All mutables in this class are lazily updated by | 530 // TODO(layout-dev): All mutables in this class are lazily updated by |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return numEffectiveColumns(); | 594 return numEffectiveColumns(); |
| 593 } | 595 } |
| 594 | 596 |
| 595 short m_hSpacing; | 597 short m_hSpacing; |
| 596 short m_vSpacing; | 598 short m_vSpacing; |
| 597 int m_borderStart; | 599 int m_borderStart; |
| 598 int m_borderEnd; | 600 int m_borderEnd; |
| 599 | 601 |
| 600 LayoutUnit m_blockOffsetToFirstRepeatableHeader; | 602 LayoutUnit m_blockOffsetToFirstRepeatableHeader; |
| 601 LayoutUnit m_rowOffsetFromRepeatingHeader; | 603 LayoutUnit m_rowOffsetFromRepeatingHeader; |
| 604 LayoutUnit m_oldAvailableLogicalHeight; |
| 602 }; | 605 }; |
| 603 | 606 |
| 604 inline LayoutTableSection* LayoutTable::topSection() const { | 607 inline LayoutTableSection* LayoutTable::topSection() const { |
| 605 ASSERT(!needsSectionRecalc()); | 608 ASSERT(!needsSectionRecalc()); |
| 606 if (m_head) | 609 if (m_head) |
| 607 return m_head; | 610 return m_head; |
| 608 if (m_firstBody) | 611 if (m_firstBody) |
| 609 return m_firstBody; | 612 return m_firstBody; |
| 610 return m_foot; | 613 return m_foot; |
| 611 } | 614 } |
| 612 | 615 |
| 613 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 616 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
| 614 | 617 |
| 615 } // namespace blink | 618 } // namespace blink |
| 616 | 619 |
| 617 #endif // LayoutTable_h | 620 #endif // LayoutTable_h |
| OLD | NEW |