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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 int rIndex = 0; | 73 int rIndex = 0; |
74 | 74 |
75 if (HTMLTableSectionElement* head = toHTMLTableElement(table)->tHead()) { | 75 if (HTMLTableSectionElement* head = toHTMLTableElement(table)->tHead()) { |
76 for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChi
ld(*head); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row)) { | 76 for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChi
ld(*head); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row)) { |
77 if (row == this) | 77 if (row == this) |
78 return rIndex; | 78 return rIndex; |
79 ++rIndex; | 79 ++rIndex; |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 for (Element* child = ElementTraversal::firstWithin(*table); child; child =
ElementTraversal::nextSibling(*child)) { | 83 for (HTMLElement* child = Traversal<HTMLElement>::firstWithin(*table); child
; child = Traversal<HTMLElement>::nextSibling(*child)) { |
84 if (child->hasTagName(tbodyTag)) { | 84 if (child->hasTagName(tbodyTag)) { |
85 HTMLTableSectionElement* section = toHTMLTableSectionElement(child); | 85 HTMLTableSectionElement* section = toHTMLTableSectionElement(child); |
86 for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firs
tChild(*section); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row))
{ | 86 for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firs
tChild(*section); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row))
{ |
87 if (row == this) | 87 if (row == this) |
88 return rIndex; | 88 return rIndex; |
89 ++rIndex; | 89 ++rIndex; |
90 } | 90 } |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 exceptionState.throwDOMException(IndexSizeError, "The value provided ("
+ String::number(index) + ") is outside the range [0, " + String::number(numCell
s) + ")."); | 152 exceptionState.throwDOMException(IndexSizeError, "The value provided ("
+ String::number(index) + ") is outside the range [0, " + String::number(numCell
s) + ")."); |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLTableRowElement::cells() | 156 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLTableRowElement::cells() |
157 { | 157 { |
158 return ensureCachedHTMLCollection(TRCells); | 158 return ensureCachedHTMLCollection(TRCells); |
159 } | 159 } |
160 | 160 |
161 } | 161 } |
OLD | NEW |