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, 2010 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 if (heightInt > 0) // height="0" is ignored for compatibility with W
inIE. | 108 if (heightInt > 0) // height="0" is ignored for compatibility with W
inIE. |
109 addHTMLLengthToStyle(style, CSSPropertyHeight, value); | 109 addHTMLLengthToStyle(style, CSSPropertyHeight, value); |
110 } | 110 } |
111 } else | 111 } else |
112 HTMLTablePartElement::collectStyleForPresentationAttribute(name, value,
style); | 112 HTMLTablePartElement::collectStyleForPresentationAttribute(name, value,
style); |
113 } | 113 } |
114 | 114 |
115 void HTMLTableCellElement::parseAttribute(const QualifiedName& name, const Atomi
cString& value) | 115 void HTMLTableCellElement::parseAttribute(const QualifiedName& name, const Atomi
cString& value) |
116 { | 116 { |
117 if (name == rowspanAttr) { | 117 if (name == rowspanAttr) { |
118 if (renderer() && renderer()->isTableCell()) | 118 if (layoutObject() && layoutObject()->isTableCell()) |
119 toLayoutTableCell(renderer())->colSpanOrRowSpanChanged(); | 119 toLayoutTableCell(layoutObject())->colSpanOrRowSpanChanged(); |
120 } else if (name == colspanAttr) { | 120 } else if (name == colspanAttr) { |
121 if (renderer() && renderer()->isTableCell()) | 121 if (layoutObject() && layoutObject()->isTableCell()) |
122 toLayoutTableCell(renderer())->colSpanOrRowSpanChanged(); | 122 toLayoutTableCell(layoutObject())->colSpanOrRowSpanChanged(); |
123 } else | 123 } else |
124 HTMLTablePartElement::parseAttribute(name, value); | 124 HTMLTablePartElement::parseAttribute(name, value); |
125 } | 125 } |
126 | 126 |
127 const StylePropertySet* HTMLTableCellElement::additionalPresentationAttributeSty
le() | 127 const StylePropertySet* HTMLTableCellElement::additionalPresentationAttributeSty
le() |
128 { | 128 { |
129 if (HTMLTableElement* table = findParentTable()) | 129 if (HTMLTableElement* table = findParentTable()) |
130 return table->additionalCellStyle(); | 130 return table->additionalCellStyle(); |
131 return nullptr; | 131 return nullptr; |
132 } | 132 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 setIntegralAttribute(rowspanAttr, n); | 171 setIntegralAttribute(rowspanAttr, n); |
172 } | 172 } |
173 | 173 |
174 const AtomicString& HTMLTableCellElement::scope() const | 174 const AtomicString& HTMLTableCellElement::scope() const |
175 { | 175 { |
176 return fastGetAttribute(scopeAttr); | 176 return fastGetAttribute(scopeAttr); |
177 } | 177 } |
178 | 178 |
179 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const | 179 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const |
180 { | 180 { |
181 LayoutObject* cellRenderer = renderer(); | 181 LayoutObject* cellRenderer = layoutObject(); |
182 if (!cellRenderer) | 182 if (!cellRenderer) |
183 return nullptr; | 183 return nullptr; |
184 if (!cellRenderer->isTableCell()) | 184 if (!cellRenderer->isTableCell()) |
185 return nullptr; | 185 return nullptr; |
186 | 186 |
187 LayoutTableCell* tableCellRenderer = toLayoutTableCell(cellRenderer); | 187 LayoutTableCell* tableCellRenderer = toLayoutTableCell(cellRenderer); |
188 LayoutTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); | 188 LayoutTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); |
189 if (!cellAboveRenderer) | 189 if (!cellAboveRenderer) |
190 return nullptr; | 190 return nullptr; |
191 | 191 |
192 return toHTMLTableCellElement(cellAboveRenderer->node()); | 192 return toHTMLTableCellElement(cellAboveRenderer->node()); |
193 } | 193 } |
194 | 194 |
195 } // namespace blink | 195 } // namespace blink |
OLD | NEW |