Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTableCol.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCol.h b/third_party/WebKit/Source/core/layout/LayoutTableCol.h |
| index a028b3b73ac374db8fd72ff02c5fd5b908f956bd..306ff030e64521d9ea1f69973a06205b5737a2fe 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCol.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCol.h |
| @@ -76,11 +76,12 @@ public: |
| // For CSS table columns or colgroups, this is always 1. |
| unsigned span() const { return m_span; } |
| - bool isTableColumnGroupWithColumnChildren() { return firstChild(); } |
| + bool isTableColumnGroupWithColumnChildren() const { return firstChild(); } |
| bool isTableColumn() const { return style()->display() == TABLE_COLUMN; } |
| bool isTableColumnGroup() const { return style()->display() == TABLE_COLUMN_GROUP; } |
| LayoutTableCol* enclosingColumnGroup() const; |
| + LayoutTableCol* lastColumnInGroup() const; |
| // Returns the next column or column-group. |
| LayoutTableCol* nextColumn() const; |
| @@ -92,6 +93,20 @@ public: |
| const char* name() const override { return "LayoutTableCol"; } |
| + // Returns col/colgroup table-relative position. |
| + // <col> elements need to provide absoluteColumnIndex. |
|
Xianzhu
2016/03/28 00:44:42
Can you rephrase the above sentence?
atotic1
2016/03/29 17:05:16
Done.
|
| + // This is because <col> element with span N is treated for display as |
| + // N <col> elements with span 1. It does not make sense to talk |
| + // about visual <col> position, only about <col> position at |
| + // particular absolute column. |
|
Xianzhu
2016/03/28 00:44:42
I think you can omit the above comments.
atotic1
2016/03/29 17:05:16
Moved it into .cpp. The comment describes a non-in
|
| + LayoutRect positionByCellSpan(unsigned absoluteColumnIndex) const; |
| + |
| + // Return indexes to all columns inside this element. |
| + // Can return vector with size 0 if LayoutTableCol is out of range. |
| + // <col> element can return size() > 1 if it spans multiple columns |
| + // <colgroup> element can return any size. |
| + Vector<unsigned> getEffectiveColumnIndexes() const; |
| + |
| private: |
| LayoutObjectChildList* virtualChildren() override { return children(); } |
| const LayoutObjectChildList* virtualChildren() const override { return children(); } |