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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 HTMLTableSectionElement* HTMLTableElement::lastBody() const | 175 HTMLTableSectionElement* HTMLTableElement::lastBody() const |
176 { | 176 { |
177 for (Node* child = lastChild(); child; child = child->previousSibling()) { | 177 for (Node* child = lastChild(); child; child = child->previousSibling()) { |
178 if (child->hasTagName(tbodyTag)) | 178 if (child->hasTagName(tbodyTag)) |
179 return toHTMLTableSectionElement(child); | 179 return toHTMLTableSectionElement(child); |
180 } | 180 } |
181 return 0; | 181 return 0; |
182 } | 182 } |
183 | 183 |
| 184 PassRefPtrWillBeRawPtr<HTMLElement> HTMLTableElement::insertRow(ExceptionState&
exceptionState) |
| 185 { |
| 186 // The default 'index' argument value is -1. |
| 187 return insertRow(-1, exceptionState); |
| 188 } |
| 189 |
184 PassRefPtrWillBeRawPtr<HTMLElement> HTMLTableElement::insertRow(int index, Excep
tionState& exceptionState) | 190 PassRefPtrWillBeRawPtr<HTMLElement> HTMLTableElement::insertRow(int index, Excep
tionState& exceptionState) |
185 { | 191 { |
186 if (index < -1) { | 192 if (index < -1) { |
187 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); | 193 exceptionState.throwDOMException(IndexSizeError, "The index provided ("
+ String::number(index) + ") is less than -1."); |
188 return nullptr; | 194 return nullptr; |
189 } | 195 } |
190 | 196 |
191 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); | 197 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); |
192 | 198 |
193 RefPtrWillBeRawPtr<HTMLTableRowElement> lastRow = nullptr; | 199 RefPtrWillBeRawPtr<HTMLTableRowElement> lastRow = nullptr; |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 return getAttribute(summaryAttr); | 578 return getAttribute(summaryAttr); |
573 } | 579 } |
574 | 580 |
575 void HTMLTableElement::trace(Visitor* visitor) | 581 void HTMLTableElement::trace(Visitor* visitor) |
576 { | 582 { |
577 visitor->trace(m_sharedCellStyle); | 583 visitor->trace(m_sharedCellStyle); |
578 HTMLElement::trace(visitor); | 584 HTMLElement::trace(visitor); |
579 } | 585 } |
580 | 586 |
581 } | 587 } |
OLD | NEW |