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

Side by Side Diff: third_party/WebKit/Source/core/dom/AttributeCollection.h

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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 | « no previous file | third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp » ('j') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 : AttributeCollectionGeneric<AttributeVector, AttributeVector&>( 111 : AttributeCollectionGeneric<AttributeVector, AttributeVector&>(
112 attributes) {} 112 attributes) {}
113 113
114 // These functions do no error/duplicate checking. 114 // These functions do no error/duplicate checking.
115 void append(const QualifiedName&, const AtomicString& value); 115 void append(const QualifiedName&, const AtomicString& value);
116 void remove(unsigned index); 116 void remove(unsigned index);
117 }; 117 };
118 118
119 inline void MutableAttributeCollection::append(const QualifiedName& name, 119 inline void MutableAttributeCollection::append(const QualifiedName& name,
120 const AtomicString& value) { 120 const AtomicString& value) {
121 m_attributes.append(Attribute(name, value)); 121 m_attributes.push_back(Attribute(name, value));
122 } 122 }
123 123
124 inline void MutableAttributeCollection::remove(unsigned index) { 124 inline void MutableAttributeCollection::remove(unsigned index) {
125 m_attributes.remove(index); 125 m_attributes.remove(index);
126 } 126 }
127 127
128 template <typename Container, typename ContainerMemberType> 128 template <typename Container, typename ContainerMemberType>
129 inline typename AttributeCollectionGeneric<Container, 129 inline typename AttributeCollectionGeneric<Container,
130 ContainerMemberType>::iterator 130 ContainerMemberType>::iterator
131 AttributeCollectionGeneric<Container, ContainerMemberType>::find( 131 AttributeCollectionGeneric<Container, ContainerMemberType>::find(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 shouldIgnoreAttributeCase)) 214 shouldIgnoreAttributeCase))
215 return index; 215 return index;
216 } 216 }
217 } 217 }
218 return kNotFound; 218 return kNotFound;
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
222 222
223 #endif // AttributeCollection_h 223 #endif // AttributeCollection_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698