| 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, 2007, 2010 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserv
ed. |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 PassRefPtr<HTMLElement> HTMLTableRowElement::insertCell(int index, ExceptionStat
e& es) | 121 PassRefPtr<HTMLElement> HTMLTableRowElement::insertCell(int index, ExceptionStat
e& es) |
| 122 { | 122 { |
| 123 RefPtr<HTMLCollection> children = cells(); | 123 RefPtr<HTMLCollection> children = cells(); |
| 124 int numCells = children ? children->length() : 0; | 124 int numCells = children ? children->length() : 0; |
| 125 if (index < -1 || index > numCells) { | 125 if (index < -1 || index > numCells) { |
| 126 es.throwDOMException(IndexSizeError); | 126 es.throwDOMException(IndexSizeError); |
| 127 return 0; | 127 return 0; |
| 128 } | 128 } |
| 129 | 129 |
| 130 RefPtr<HTMLTableCellElement> cell = HTMLTableCellElement::create(tdTag, docu
ment()); | 130 RefPtr<HTMLTableCellElement> cell = HTMLTableCellElement::create(tdTag, &doc
ument()); |
| 131 if (index < 0 || index >= numCells) | 131 if (index < 0 || index >= numCells) |
| 132 appendChild(cell, es); | 132 appendChild(cell, es); |
| 133 else { | 133 else { |
| 134 Node* n; | 134 Node* n; |
| 135 if (index < 1) | 135 if (index < 1) |
| 136 n = firstChild(); | 136 n = firstChild(); |
| 137 else | 137 else |
| 138 n = children->item(index); | 138 n = children->item(index); |
| 139 insertBefore(cell, n, es); | 139 insertBefore(cell, n, es); |
| 140 } | 140 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 159 { | 159 { |
| 160 return ensureCachedHTMLCollection(TRCells); | 160 return ensureCachedHTMLCollection(TRCells); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void HTMLTableRowElement::setCells(HTMLCollection*, ExceptionState& es) | 163 void HTMLTableRowElement::setCells(HTMLCollection*, ExceptionState& es) |
| 164 { | 164 { |
| 165 es.throwDOMException(NoModificationAllowedError); | 165 es.throwDOMException(NoModificationAllowedError); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } | 168 } |
| OLD | NEW |