Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCol.cpp

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 : LayoutTableBoxComponent(element) 38 : LayoutTableBoxComponent(element)
39 , m_span(1) 39 , m_span(1)
40 { 40 {
41 // init LayoutObject attributes 41 // init LayoutObject attributes
42 setInline(true); // our object is not Inline 42 setInline(true); // our object is not Inline
43 updateFromElement(); 43 updateFromElement();
44 } 44 }
45 45
46 void LayoutTableCol::styleDidChange(StyleDifference diff, const ComputedStyle* o ldStyle) 46 void LayoutTableCol::styleDidChange(StyleDifference diff, const ComputedStyle* o ldStyle)
47 { 47 {
48 DCHECK(style()->display() == TABLE_COLUMN || style()->display() == TABLE_COL UMN_GROUP); 48 DCHECK(style()->display() == EDisplay::TableColumn || style()->display() == EDisplay::TableColumnGroup);
49 49
50 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); 50 LayoutTableBoxComponent::styleDidChange(diff, oldStyle);
51 51
52 if (!oldStyle) 52 if (!oldStyle)
53 return; 53 return;
54 54
55 LayoutTable* table = this->table(); 55 LayoutTable* table = this->table();
56 if (!table) 56 if (!table)
57 return; 57 return;
58 58
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void LayoutTableCol::willBeRemovedFromTree() 92 void LayoutTableCol::willBeRemovedFromTree()
93 { 93 {
94 LayoutTableBoxComponent::willBeRemovedFromTree(); 94 LayoutTableBoxComponent::willBeRemovedFromTree();
95 table()->removeColumn(this); 95 table()->removeColumn(this);
96 } 96 }
97 97
98 bool LayoutTableCol::isChildAllowed(LayoutObject* child, const ComputedStyle& st yle) const 98 bool LayoutTableCol::isChildAllowed(LayoutObject* child, const ComputedStyle& st yle) const
99 { 99 {
100 // We cannot use isTableColumn here as style() may return 0. 100 // We cannot use isTableColumn here as style() may return 0.
101 return child->isLayoutTableCol() && style.display() == TABLE_COLUMN; 101 return child->isLayoutTableCol() && style.display() == EDisplay::TableColumn ;
102 } 102 }
103 103
104 bool LayoutTableCol::canHaveChildren() const 104 bool LayoutTableCol::canHaveChildren() const
105 { 105 {
106 // Cols cannot have children. This is actually necessary to fix a bug 106 // Cols cannot have children. This is actually necessary to fix a bug
107 // with libraries.uc.edu, which makes a <p> be a table-column. 107 // with libraries.uc.edu, which makes a <p> be a table-column.
108 return isTableColumnGroup(); 108 return isTableColumnGroup();
109 } 109 }
110 110
111 LayoutRect LayoutTableCol::localOverflowRectForPaintInvalidation() const 111 LayoutRect LayoutTableCol::localOverflowRectForPaintInvalidation() const
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return style()->borderStart(); 186 return style()->borderStart();
187 } 187 }
188 188
189 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const 189 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const
190 { 190 {
191 ASSERT_UNUSED(cell, table()->colElementAtAbsoluteColumn(cell->absoluteColumn Index() - 1).innermostColOrColGroup() == this); 191 ASSERT_UNUSED(cell, table()->colElementAtAbsoluteColumn(cell->absoluteColumn Index() - 1).innermostColOrColGroup() == this);
192 return style()->borderEnd(); 192 return style()->borderEnd();
193 } 193 }
194 194
195 } // namespace blink 195 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCol.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698