| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (HTMLTableElement* table = findParentTable()) | 123 if (HTMLTableElement* table = findParentTable()) |
| 124 return table->additionalCellStyle(); | 124 return table->additionalCellStyle(); |
| 125 return 0; | 125 return 0; |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool HTMLTableCellElement::isURLAttribute(const Attribute& attribute) const | 128 bool HTMLTableCellElement::isURLAttribute(const Attribute& attribute) const |
| 129 { | 129 { |
| 130 return attribute.name() == backgroundAttr || HTMLTablePartElement::isURLAttr
ibute(attribute); | 130 return attribute.name() == backgroundAttr || HTMLTablePartElement::isURLAttr
ibute(attribute); |
| 131 } | 131 } |
| 132 | 132 |
| 133 String HTMLTableCellElement::abbr() const | 133 const AtomicString& HTMLTableCellElement::abbr() const |
| 134 { | 134 { |
| 135 return getAttribute(abbrAttr); | 135 return getAttribute(abbrAttr); |
| 136 } | 136 } |
| 137 | 137 |
| 138 String HTMLTableCellElement::axis() const | 138 const AtomicString& HTMLTableCellElement::axis() const |
| 139 { | 139 { |
| 140 return getAttribute(axisAttr); | 140 return getAttribute(axisAttr); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void HTMLTableCellElement::setColSpan(int n) | 143 void HTMLTableCellElement::setColSpan(int n) |
| 144 { | 144 { |
| 145 setIntegralAttribute(colspanAttr, n); | 145 setIntegralAttribute(colspanAttr, n); |
| 146 } | 146 } |
| 147 | 147 |
| 148 String HTMLTableCellElement::headers() const | 148 const AtomicString& HTMLTableCellElement::headers() const |
| 149 { | 149 { |
| 150 return getAttribute(headersAttr); | 150 return getAttribute(headersAttr); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void HTMLTableCellElement::setRowSpan(int n) | 153 void HTMLTableCellElement::setRowSpan(int n) |
| 154 { | 154 { |
| 155 setIntegralAttribute(rowspanAttr, n); | 155 setIntegralAttribute(rowspanAttr, n); |
| 156 } | 156 } |
| 157 | 157 |
| 158 String HTMLTableCellElement::scope() const | 158 const AtomicString& HTMLTableCellElement::scope() const |
| 159 { | 159 { |
| 160 return getAttribute(scopeAttr); | 160 return getAttribute(scopeAttr); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void HTMLTableCellElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls)
const | 163 void HTMLTableCellElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls)
const |
| 164 { | 164 { |
| 165 HTMLTablePartElement::addSubresourceAttributeURLs(urls); | 165 HTMLTablePartElement::addSubresourceAttributeURLs(urls); |
| 166 | 166 |
| 167 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr))
); | 167 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr))
); |
| 168 } | 168 } |
| 169 | 169 |
| 170 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const | 170 HTMLTableCellElement* HTMLTableCellElement::cellAbove() const |
| 171 { | 171 { |
| 172 RenderObject* cellRenderer = renderer(); | 172 RenderObject* cellRenderer = renderer(); |
| 173 if (!cellRenderer) | 173 if (!cellRenderer) |
| 174 return 0; | 174 return 0; |
| 175 if (!cellRenderer->isTableCell()) | 175 if (!cellRenderer->isTableCell()) |
| 176 return 0; | 176 return 0; |
| 177 | 177 |
| 178 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); | 178 RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer); |
| 179 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); | 179 RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(t
ableCellRenderer); |
| 180 if (!cellAboveRenderer) | 180 if (!cellAboveRenderer) |
| 181 return 0; | 181 return 0; |
| 182 | 182 |
| 183 return toHTMLTableCellElement(cellAboveRenderer->node()); | 183 return toHTMLTableCellElement(cellAboveRenderer->node()); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace WebCore | 186 } // namespace WebCore |
| OLD | NEW |