| 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 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 const LayoutObjectChildList* children() const { return &m_children; } | 70 const LayoutObjectChildList* children() const { return &m_children; } |
| 71 LayoutObjectChildList* children() { return &m_children; } | 71 LayoutObjectChildList* children() { return &m_children; } |
| 72 | 72 |
| 73 void clearPreferredLogicalWidthsDirtyBits(); | 73 void clearPreferredLogicalWidthsDirtyBits(); |
| 74 | 74 |
| 75 // The 'span' attribute in HTML. | 75 // The 'span' attribute in HTML. |
| 76 // For CSS table columns or colgroups, this is always 1. | 76 // For CSS table columns or colgroups, this is always 1. |
| 77 unsigned span() const { return m_span; } | 77 unsigned span() const { return m_span; } |
| 78 | 78 |
| 79 bool isTableColumnGroupWithColumnChildren() { return firstChild(); } | 79 bool isTableColumnGroupWithColumnChildren() const { return firstChild(); } |
| 80 bool isTableColumn() const { return style()->display() == TABLE_COLUMN; } | 80 bool isTableColumn() const { return style()->display() == TABLE_COLUMN; } |
| 81 bool isTableColumnGroup() const { return style()->display() == TABLE_COLUMN_
GROUP; } | 81 bool isTableColumnGroup() const { return style()->display() == TABLE_COLUMN_
GROUP; } |
| 82 | 82 |
| 83 LayoutTableCol* enclosingColumnGroup() const; | 83 LayoutTableCol* enclosingColumnGroup() const; |
| 84 LayoutTableCol* lastColumnInGroup() const; |
| 84 | 85 |
| 85 // Returns the next column or column-group. | 86 // Returns the next column or column-group. |
| 86 LayoutTableCol* nextColumn() const; | 87 LayoutTableCol* nextColumn() const; |
| 87 | 88 |
| 88 const BorderValue& borderAdjoiningCellStartBorder(const LayoutTableCell*) co
nst; | 89 const BorderValue& borderAdjoiningCellStartBorder(const LayoutTableCell*) co
nst; |
| 89 const BorderValue& borderAdjoiningCellEndBorder(const LayoutTableCell*) cons
t; | 90 const BorderValue& borderAdjoiningCellEndBorder(const LayoutTableCell*) cons
t; |
| 90 const BorderValue& borderAdjoiningCellBefore(const LayoutTableCell*) const; | 91 const BorderValue& borderAdjoiningCellBefore(const LayoutTableCell*) const; |
| 91 const BorderValue& borderAdjoiningCellAfter(const LayoutTableCell*) const; | 92 const BorderValue& borderAdjoiningCellAfter(const LayoutTableCell*) const; |
| 92 | 93 |
| 93 const char* name() const override { return "LayoutTableCol"; } | 94 const char* name() const override { return "LayoutTableCol"; } |
| 94 | 95 |
| 96 // Returns col/colgroup table-relative position. |
| 97 // <col> elements need to provide absoluteColumnIndex |
| 98 // This is because <col> element with span N is treated for display as |
| 99 // N <col> elements with span 1. So, visually, it makes no sense |
| 100 // to talk about <col> position, only about <col> position at particular |
| 101 // column |
| 102 LayoutRect positionByCellSpan(unsigned absoluteColumnIndex) const; |
| 103 |
| 104 // Return indexes to all columns inside this element. |
| 105 // Can return vector with size 0 if LayoutTableCol is out of range. |
| 106 // <col> element can return size() > 2 if it spans multiple columns |
| 107 // <colgroup> element can return any size. |
| 108 Vector<unsigned> getEffectiveColumnIndexes() const; |
| 109 |
| 110 Vector<LayoutTableCell*> getColumnCells() const; |
| 111 |
| 95 private: | 112 private: |
| 96 LayoutObjectChildList* virtualChildren() override { return children(); } | 113 LayoutObjectChildList* virtualChildren() override { return children(); } |
| 97 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } | 114 const LayoutObjectChildList* virtualChildren() const override { return child
ren(); } |
| 98 | 115 |
| 99 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectLayoutTableCol || LayoutBox::isOfType(type); } | 116 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectLayoutTableCol || LayoutBox::isOfType(type); } |
| 100 void updateFromElement() override; | 117 void updateFromElement() override; |
| 101 void computePreferredLogicalWidths() override { ASSERT_NOT_REACHED(); } | 118 void computePreferredLogicalWidths() override { ASSERT_NOT_REACHED(); } |
| 102 | 119 |
| 103 void insertedIntoTree() override; | 120 void insertedIntoTree() override; |
| 104 void willBeRemovedFromTree() override; | 121 void willBeRemovedFromTree() override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 116 | 133 |
| 117 LayoutObjectChildList m_children; | 134 LayoutObjectChildList m_children; |
| 118 unsigned m_span; | 135 unsigned m_span; |
| 119 }; | 136 }; |
| 120 | 137 |
| 121 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCol, isLayoutTableCol()); | 138 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCol, isLayoutTableCol()); |
| 122 | 139 |
| 123 } // namespace blink | 140 } // namespace blink |
| 124 | 141 |
| 125 #endif | 142 #endif |
| OLD | NEW |