OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 return nullptr; | 154 return nullptr; |
155 } | 155 } |
156 | 156 |
157 // Must call get() on the table in case that argument is compiled before derefer
encing the | 157 // Must call get() on the table in case that argument is compiled before derefer
encing the |
158 // table to get at the collection cache. Order of argument evaluation is undefin
ed and can | 158 // table to get at the collection cache. Order of argument evaluation is undefin
ed and can |
159 // differ between compilers. | 159 // differ between compilers. |
160 HTMLTableRowsCollection::HTMLTableRowsCollection(Node* table) | 160 HTMLTableRowsCollection::HTMLTableRowsCollection(const Handle<Node>& table) |
161 : HTMLCollection(table, TableRows, OverridesItemAfter) | 161 : HTMLCollection(table, TableRows, OverridesItemAfter) |
162 { | 162 { |
163 ASSERT(table->hasTagName(tableTag)); | 163 ASSERT(table->hasTagName(tableTag)); |
164 } | 164 } |
165 | 165 |
166 PassRefPtr<HTMLTableRowsCollection> HTMLTableRowsCollection::create(Node* table,
CollectionType) | 166 PassRefPtr<HTMLTableRowsCollection> HTMLTableRowsCollection::create(const Handle
<Node>& table, CollectionType) |
167 { | 167 { |
168 return adoptRef(new HTMLTableRowsCollection(table)); | 168 return adoptRef(new HTMLTableRowsCollection(table)); |
169 } | 169 } |
170 | 170 |
171 Result<Element> HTMLTableRowsCollection::virtualItemAfter(unsigned& offsetInArra
y, const Handle<Element>& previous) const | 171 Result<Element> HTMLTableRowsCollection::virtualItemAfter(unsigned& offsetInArra
y, const Handle<Element>& previous) const |
172 { | 172 { |
173 ASSERT_UNUSED(offsetInArray, !offsetInArray); | 173 ASSERT_UNUSED(offsetInArray, !offsetInArray); |
174 ASSERT(!previous || (previous->isHTMLElement() && toHTMLElement(previous)->h
asLocalName(trTag))); | 174 ASSERT(!previous || (previous->isHTMLElement() && toHTMLElement(previous)->h
asLocalName(trTag))); |
175 return rowAfter(Handle<HTMLTableElement>::cast(ownerNode()), Handle<HTMLTabl
eRowElement>::cast(previous)); | 175 return rowAfter(Handle<HTMLTableElement>::cast(ownerNode()), Handle<HTMLTabl
eRowElement>::cast(previous)); |
176 } | 176 } |
177 | 177 |
178 } | 178 } |
OLD | NEW |