| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 : HTMLTablePartElement(tagName, document) | 42 : HTMLTablePartElement(tagName, document) |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableSectionElement) | 46 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableSectionElement) |
| 47 | 47 |
| 48 const StylePropertySet* HTMLTableSectionElement::additionalPresentationAttribute
Style() | 48 const StylePropertySet* HTMLTableSectionElement::additionalPresentationAttribute
Style() |
| 49 { | 49 { |
| 50 if (HTMLTableElement* table = findParentTable()) | 50 if (HTMLTableElement* table = findParentTable()) |
| 51 return table->additionalGroupStyle(true); | 51 return table->additionalGroupStyle(true); |
| 52 return 0; | 52 return nullptr; |
| 53 } | 53 } |
| 54 | 54 |
| 55 // these functions are rather slow, since we need to get the row at | 55 // these functions are rather slow, since we need to get the row at |
| 56 // the index... but they aren't used during usual HTML parsing anyway | 56 // the index... but they aren't used during usual HTML parsing anyway |
| 57 PassRefPtrWillBeRawPtr<HTMLElement> HTMLTableSectionElement::insertRow(int index
, ExceptionState& exceptionState) | 57 PassRefPtrWillBeRawPtr<HTMLElement> HTMLTableSectionElement::insertRow(int index
, ExceptionState& exceptionState) |
| 58 { | 58 { |
| 59 RefPtrWillBeRawPtr<HTMLCollection> children = rows(); | 59 RefPtrWillBeRawPtr<HTMLCollection> children = rows(); |
| 60 int numRows = children ? static_cast<int>(children->length()) : 0; | 60 int numRows = children ? static_cast<int>(children->length()) : 0; |
| 61 if (index < -1 || index > numRows) { | 61 if (index < -1 || index > numRows) { |
| 62 exceptionState.throwDOMException(IndexSizeError, "The provided index ("
+ String::number(index) + " is outside the range [-1, " + String::number(numRows
) + "]."); | 62 exceptionState.throwDOMException(IndexSizeError, "The provided index ("
+ String::number(index) + " is outside the range [-1, " + String::number(numRows
) + "]."); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 92 ++rowCount; | 92 ++rowCount; |
| 93 return rowCount; | 93 return rowCount; |
| 94 } | 94 } |
| 95 | 95 |
| 96 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLTableSectionElement::rows() | 96 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLTableSectionElement::rows() |
| 97 { | 97 { |
| 98 return ensureCachedCollection<HTMLCollection>(TSectionRows); | 98 return ensureCachedCollection<HTMLCollection>(TSectionRows); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } | 101 } |
| OLD | NEW |