| 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, 2008, 2010, 2011 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 if (index < -1) { | 188 if (index < -1) { |
| 189 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); | 189 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); |
| 190 return nullptr; | 190 return nullptr; |
| 191 } | 191 } |
| 192 | 192 |
| 193 RefPtr<Node> protectFromMutationEvents(this); | 193 RefPtr<Node> protectFromMutationEvents(this); |
| 194 | 194 |
| 195 RefPtr<HTMLTableRowElement> lastRow = nullptr; | 195 RefPtr<HTMLTableRowElement> lastRow = nullptr; |
| 196 RefPtr<HTMLTableRowElement> row = nullptr; | 196 RefPtr<HTMLTableRowElement> row = nullptr; |
| 197 if (index == -1) | 197 if (index == -1) |
| 198 lastRow = HTMLTableRowsCollection::lastRow(this); | 198 lastRow = HTMLTableRowsCollection::lastRow(*this); |
| 199 else { | 199 else { |
| 200 for (int i = 0; i <= index; ++i) { | 200 for (int i = 0; i <= index; ++i) { |
| 201 row = HTMLTableRowsCollection::rowAfter(this, lastRow.get()); | 201 row = HTMLTableRowsCollection::rowAfter(*this, lastRow.get()); |
| 202 if (!row) { | 202 if (!row) { |
| 203 if (i != index) { | 203 if (i != index) { |
| 204 exceptionState.throwDOMException(IndexSizeError, "The index
provided (" + String::number(index) + ") is greater than the number of rows in t
he table (" + String::number(i) + ")."); | 204 exceptionState.throwDOMException(IndexSizeError, "The index
provided (" + String::number(index) + ") is greater than the number of rows in t
he table (" + String::number(i) + ")."); |
| 205 return nullptr; | 205 return nullptr; |
| 206 } | 206 } |
| 207 break; | 207 break; |
| 208 } | 208 } |
| 209 lastRow = row; | 209 lastRow = row; |
| 210 } | 210 } |
| 211 } | 211 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 232 void HTMLTableElement::deleteRow(int index, ExceptionState& exceptionState) | 232 void HTMLTableElement::deleteRow(int index, ExceptionState& exceptionState) |
| 233 { | 233 { |
| 234 if (index < -1) { | 234 if (index < -1) { |
| 235 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); | 235 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); |
| 236 return; | 236 return; |
| 237 } | 237 } |
| 238 | 238 |
| 239 HTMLTableRowElement* row = 0; | 239 HTMLTableRowElement* row = 0; |
| 240 int i = 0; | 240 int i = 0; |
| 241 if (index == -1) | 241 if (index == -1) |
| 242 row = HTMLTableRowsCollection::lastRow(this); | 242 row = HTMLTableRowsCollection::lastRow(*this); |
| 243 else { | 243 else { |
| 244 for (i = 0; i <= index; ++i) { | 244 for (i = 0; i <= index; ++i) { |
| 245 row = HTMLTableRowsCollection::rowAfter(this, row); | 245 row = HTMLTableRowsCollection::rowAfter(*this, row); |
| 246 if (!row) | 246 if (!row) |
| 247 break; | 247 break; |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 if (!row) { | 250 if (!row) { |
| 251 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is greater than the number of rows in the table ("
+ String::number(i) + ")."); | 251 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is greater than the number of rows in the table ("
+ String::number(i) + ")."); |
| 252 return; | 252 return; |
| 253 } | 253 } |
| 254 row->remove(exceptionState); | 254 row->remove(exceptionState); |
| 255 } | 255 } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 { | 553 { |
| 554 return getAttribute(rulesAttr); | 554 return getAttribute(rulesAttr); |
| 555 } | 555 } |
| 556 | 556 |
| 557 const AtomicString& HTMLTableElement::summary() const | 557 const AtomicString& HTMLTableElement::summary() const |
| 558 { | 558 { |
| 559 return getAttribute(summaryAttr); | 559 return getAttribute(summaryAttr); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } | 562 } |
| OLD | NEW |