OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 if (!idAttrVal.isEmpty() && !foundInputElements.contains(idAttrVal.i
mpl())) | 154 if (!idAttrVal.isEmpty() && !foundInputElements.contains(idAttrVal.i
mpl())) |
155 appendIdCache(idAttrVal, element); | 155 appendIdCache(idAttrVal, element); |
156 if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal && !foundInpu
tElements.contains(nameAttrVal.impl())) | 156 if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal && !foundInpu
tElements.contains(nameAttrVal.impl())) |
157 appendNameCache(nameAttrVal, element); | 157 appendNameCache(nameAttrVal, element); |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 setHasNameCache(); | 161 setHasNameCache(); |
162 } | 162 } |
163 | 163 |
| 164 WTF::UnionType2<RadioNodeList, Node> HTMLFormControlsCollection::namedGetter(con
st AtomicString& name) |
| 165 { |
| 166 Vector<RefPtr<Node> > namedItems; |
| 167 this->namedItems(name, namedItems); |
| 168 |
| 169 if (!namedItems.size()) |
| 170 return WTF::UnionType2<RadioNodeList, Node>(); |
| 171 |
| 172 if (namedItems.size() == 1) |
| 173 return WTF::UnionType2<RadioNodeList, Node>(namedItems.at(0).release()); |
| 174 |
| 175 return WTF::UnionType2<RadioNodeList, Node>(this->ownerNode()->radioNodeList
(name)); |
164 } | 176 } |
| 177 |
| 178 } |
OLD | NEW |