| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 LayoutTableCol::LayoutTableCol(Element* element) | 37 LayoutTableCol::LayoutTableCol(Element* element) |
| 38 : LayoutTableBoxComponent(element), m_span(1) { | 38 : LayoutTableBoxComponent(element), m_span(1) { |
| 39 // init LayoutObject attributes | 39 // init LayoutObject attributes |
| 40 setInline(true); // our object is not Inline | 40 setInline(true); // our object is not Inline |
| 41 updateFromElement(); | 41 updateFromElement(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void LayoutTableCol::styleDidChange(StyleDifference diff, | 44 void LayoutTableCol::styleDidChange(StyleDifference diff, |
| 45 const ComputedStyle* oldStyle) { | 45 const ComputedStyle* oldStyle) { |
| 46 DCHECK(style()->display() == EDisplay::TableColumn || | 46 DCHECK(style()->display() == EDisplay::kTableColumn || |
| 47 style()->display() == EDisplay::TableColumnGroup); | 47 style()->display() == EDisplay::kTableColumnGroup); |
| 48 | 48 |
| 49 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); | 49 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); |
| 50 | 50 |
| 51 if (!oldStyle) | 51 if (!oldStyle) |
| 52 return; | 52 return; |
| 53 | 53 |
| 54 LayoutTable* table = this->table(); | 54 LayoutTable* table = this->table(); |
| 55 if (!table) | 55 if (!table) |
| 56 return; | 56 return; |
| 57 | 57 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 | 96 |
| 97 void LayoutTableCol::willBeRemovedFromTree() { | 97 void LayoutTableCol::willBeRemovedFromTree() { |
| 98 LayoutTableBoxComponent::willBeRemovedFromTree(); | 98 LayoutTableBoxComponent::willBeRemovedFromTree(); |
| 99 table()->removeColumn(this); | 99 table()->removeColumn(this); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool LayoutTableCol::isChildAllowed(LayoutObject* child, | 102 bool LayoutTableCol::isChildAllowed(LayoutObject* child, |
| 103 const ComputedStyle& style) const { | 103 const ComputedStyle& style) const { |
| 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::kTableColumn; |
| 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::localVisualRect() const { | 114 LayoutRect LayoutTableCol::localVisualRect() const { |
| 115 // Entire table gets invalidated, instead of invalidating | 115 // Entire table gets invalidated, instead of invalidating |
| (...skipping 77 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 |