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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 10 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 | Annotate | Revision Log
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 RenderBox::insertedIntoTree(); 95 RenderBox::insertedIntoTree();
96 table()->addColumn(this); 96 table()->addColumn(this);
97 } 97 }
98 98
99 void LayoutTableCol::willBeRemovedFromTree() 99 void LayoutTableCol::willBeRemovedFromTree()
100 { 100 {
101 RenderBox::willBeRemovedFromTree(); 101 RenderBox::willBeRemovedFromTree();
102 table()->removeColumn(this); 102 table()->removeColumn(this);
103 } 103 }
104 104
105 bool LayoutTableCol::isChildAllowed(RenderObject* child, RenderStyle* style) con st 105 bool LayoutTableCol::isChildAllowed(RenderObject* child, const RenderStyle* styl e) const
106 { 106 {
107 // We cannot use isTableColumn here as style() may return 0. 107 // We cannot use isTableColumn here as style() may return 0.
108 return child->isLayoutTableCol() && style->display() == TABLE_COLUMN; 108 return child->isLayoutTableCol() && style->display() == TABLE_COLUMN;
109 } 109 }
110 110
111 bool LayoutTableCol::canHaveChildren() const 111 bool LayoutTableCol::canHaveChildren() const
112 { 112 {
113 // Cols cannot have children. This is actually necessary to fix a bug 113 // Cols cannot have children. This is actually necessary to fix a bug
114 // with libraries.uc.edu, which makes a <p> be a table-column. 114 // with libraries.uc.edu, which makes a <p> be a table-column.
115 return isTableColumnGroup(); 115 return isTableColumnGroup();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return style()->borderStart(); 195 return style()->borderStart();
196 } 196 }
197 197
198 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const 198 const BorderValue& LayoutTableCol::borderAdjoiningCellAfter(const LayoutTableCel l* cell) const
199 { 199 {
200 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this); 200 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this);
201 return style()->borderEnd(); 201 return style()->borderEnd();
202 } 202 }
203 203
204 } 204 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698