Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: Source/core/html/HTMLCollection.cpp

Issue 152903002: Move m_overridesItemAfter member from LiveNodeListBase to HTMLCollection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No change Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLCollection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
156 case RadioImgNodeListType: 156 case RadioImgNodeListType:
157 case LabelsNodeListType: 157 case LabelsNodeListType:
158 break; 158 break;
159 } 159 }
160 ASSERT_NOT_REACHED(); 160 ASSERT_NOT_REACHED();
161 return DoNotInvalidateOnAttributeChanges; 161 return DoNotInvalidateOnAttributeChanges;
162 } 162 }
163 163
164 HTMLCollection::HTMLCollection(ContainerNode* ownerNode, CollectionType type, It emAfterOverrideType itemAfterOverrideType) 164 HTMLCollection::HTMLCollection(ContainerNode* ownerNode, CollectionType type, It emAfterOverrideType itemAfterOverrideType)
165 : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidation TypeExcludingIdAndNameAttributes(type), 165 : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidation TypeExcludingIdAndNameAttributes(type),
166 WebCore::shouldOnlyIncludeDirectChildren(type), type, itemAfterOverrideT ype) 166 WebCore::shouldOnlyIncludeDirectChildren(type), type)
167 , m_overridesItemAfter(itemAfterOverrideType == OverridesItemAfter)
167 , m_isNameCacheValid(false) 168 , m_isNameCacheValid(false)
168 { 169 {
169 ScriptWrappable::init(this); 170 ScriptWrappable::init(this);
170 } 171 }
171 172
172 PassRefPtr<HTMLCollection> HTMLCollection::create(ContainerNode* base, Collectio nType type) 173 PassRefPtr<HTMLCollection> HTMLCollection::create(ContainerNode* base, Collectio nType type)
173 { 174 {
174 return adoptRef(new HTMLCollection(base, type, DoesNotOverrideItemAfter)); 175 return adoptRef(new HTMLCollection(base, type, DoesNotOverrideItemAfter));
175 } 176 }
176 177
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 550
550 void HTMLCollection::append(NodeCacheMap& map, const AtomicString& key, Element* element) 551 void HTMLCollection::append(NodeCacheMap& map, const AtomicString& key, Element* element)
551 { 552 {
552 OwnPtr<Vector<Element*> >& vector = map.add(key.impl(), nullptr).iterator->v alue; 553 OwnPtr<Vector<Element*> >& vector = map.add(key.impl(), nullptr).iterator->v alue;
553 if (!vector) 554 if (!vector)
554 vector = adoptPtr(new Vector<Element*>); 555 vector = adoptPtr(new Vector<Element*>);
555 vector->append(element); 556 vector->append(element);
556 } 557 }
557 558
558 } // namespace WebCore 559 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCollection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698