| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // We cannot use isTableColumn here as style() may return 0. | 104 // We cannot use isTableColumn here as style() may return 0. |
| 105 return child->isLayoutTableCol() && style.display() == EDisplay::TableColumn; | 105 return child->isLayoutTableCol() && style.display() == EDisplay::TableColumn; |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool LayoutTableCol::canHaveChildren() const { | 108 bool LayoutTableCol::canHaveChildren() const { |
| 109 // Cols cannot have children. This is actually necessary to fix a bug | 109 // Cols cannot have children. This is actually necessary to fix a bug |
| 110 // with libraries.uc.edu, which makes a <p> be a table-column. | 110 // with libraries.uc.edu, which makes a <p> be a table-column. |
| 111 return isTableColumnGroup(); | 111 return isTableColumnGroup(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 LayoutRect LayoutTableCol::localOverflowRectForPaintInvalidation() const { | 114 LayoutRect LayoutTableCol::localVisualRect() const { |
| 115 // Entire table gets invalidated, instead of invalidating | 115 // Entire table gets invalidated, instead of invalidating |
| 116 // every cell in the column. This is simpler, but suboptimal. | 116 // every cell in the column. This is simpler, but suboptimal. |
| 117 | 117 |
| 118 LayoutTable* table = this->table(); | 118 LayoutTable* table = this->table(); |
| 119 if (!table) | 119 if (!table) |
| 120 return LayoutRect(); | 120 return LayoutRect(); |
| 121 | 121 |
| 122 // The correctness of this method depends on the fact that LayoutTableCol's | 122 // The correctness of this method depends on the fact that LayoutTableCol's |
| 123 // location is always zero. | 123 // location is always zero. |
| 124 ASSERT(this->location() == LayoutPoint()); | 124 ASSERT(this->location() == LayoutPoint()); |
| 125 | 125 |
| 126 return table->localOverflowRectForPaintInvalidation(); | 126 return table->localVisualRect(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void LayoutTableCol::clearPreferredLogicalWidthsDirtyBits() { | 129 void LayoutTableCol::clearPreferredLogicalWidthsDirtyBits() { |
| 130 clearPreferredLogicalWidthsDirty(); | 130 clearPreferredLogicalWidthsDirty(); |
| 131 | 131 |
| 132 for (LayoutObject* child = firstChild(); child; child = child->nextSibling()) | 132 for (LayoutObject* child = firstChild(); child; child = child->nextSibling()) |
| 133 child->clearPreferredLogicalWidthsDirty(); | 133 child->clearPreferredLogicalWidthsDirty(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 LayoutTable* LayoutTableCol::table() const { | 136 LayoutTable* LayoutTableCol::table() const { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter( | 193 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter( |
| 194 const LayoutTableCell* cell) const { | 194 const LayoutTableCell* cell) const { |
| 195 DCHECK_EQ(table() | 195 DCHECK_EQ(table() |
| 196 ->colElementAtAbsoluteColumn(cell->absoluteColumnIndex() - 1) | 196 ->colElementAtAbsoluteColumn(cell->absoluteColumnIndex() - 1) |
| 197 .innermostColOrColGroup(), | 197 .innermostColOrColGroup(), |
| 198 this); | 198 this); |
| 199 return style()->borderEnd(); | 199 return style()->borderEnd(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |