| 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, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 case LabelsNodeListType: | 156 case LabelsNodeListType: |
| 157 break; | 157 break; |
| 158 } | 158 } |
| 159 ASSERT_NOT_REACHED(); | 159 ASSERT_NOT_REACHED(); |
| 160 return DoNotInvalidateOnAttributeChanges; | 160 return DoNotInvalidateOnAttributeChanges; |
| 161 } | 161 } |
| 162 | 162 |
| 163 HTMLCollection::HTMLCollection(Node* ownerNode, CollectionType type, ItemAfterOv
errideType itemAfterOverrideType) | 163 HTMLCollection::HTMLCollection(Node* ownerNode, CollectionType type, ItemAfterOv
errideType itemAfterOverrideType) |
| 164 : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidation
TypeExcludingIdAndNameAttributes(type), | 164 : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidation
TypeExcludingIdAndNameAttributes(type), |
| 165 WebCore::shouldOnlyIncludeDirectChildren(type), type, itemAfterOverrideT
ype) | 165 WebCore::shouldOnlyIncludeDirectChildren(type), type, itemAfterOverrideT
ype) |
| 166 , m_isNameCacheValid(false) |
| 166 { | 167 { |
| 167 ScriptWrappable::init(this); | 168 ScriptWrappable::init(this); |
| 168 } | 169 } |
| 169 | 170 |
| 170 PassRefPtr<HTMLCollection> HTMLCollection::create(Node* base, CollectionType typ
e) | 171 PassRefPtr<HTMLCollection> HTMLCollection::create(Node* base, CollectionType typ
e) |
| 171 { | 172 { |
| 172 return adoptRef(new HTMLCollection(base, type, DoesNotOverrideItemAfter)); | 173 return adoptRef(new HTMLCollection(base, type, DoesNotOverrideItemAfter)); |
| 173 } | 174 } |
| 174 | 175 |
| 175 HTMLCollection::~HTMLCollection() | 176 HTMLCollection::~HTMLCollection() |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 | 661 |
| 661 void HTMLCollection::append(NodeCacheMap& map, const AtomicString& key, Element*
element) | 662 void HTMLCollection::append(NodeCacheMap& map, const AtomicString& key, Element*
element) |
| 662 { | 663 { |
| 663 OwnPtr<Vector<Element*> >& vector = map.add(key.impl(), nullptr).iterator->v
alue; | 664 OwnPtr<Vector<Element*> >& vector = map.add(key.impl(), nullptr).iterator->v
alue; |
| 664 if (!vector) | 665 if (!vector) |
| 665 vector = adoptPtr(new Vector<Element*>); | 666 vector = adoptPtr(new Vector<Element*>); |
| 666 vector->append(element); | 667 vector->append(element); |
| 667 } | 668 } |
| 668 | 669 |
| 669 } // namespace WebCore | 670 } // namespace WebCore |
| OLD | NEW |