OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 void InvalidationSet::destroy() { | 173 void InvalidationSet::destroy() { |
174 if (isDescendantInvalidationSet()) | 174 if (isDescendantInvalidationSet()) |
175 delete toDescendantInvalidationSet(this); | 175 delete toDescendantInvalidationSet(this); |
176 else | 176 else |
177 delete toSiblingInvalidationSet(this); | 177 delete toSiblingInvalidationSet(this); |
178 } | 178 } |
179 | 179 |
180 HashSet<AtomicString>& InvalidationSet::ensureClassSet() { | 180 HashSet<AtomicString>& InvalidationSet::ensureClassSet() { |
181 if (!m_classes) | 181 if (!m_classes) |
182 m_classes = wrapUnique(new HashSet<AtomicString>); | 182 m_classes = WTF::wrapUnique(new HashSet<AtomicString>); |
183 return *m_classes; | 183 return *m_classes; |
184 } | 184 } |
185 | 185 |
186 HashSet<AtomicString>& InvalidationSet::ensureIdSet() { | 186 HashSet<AtomicString>& InvalidationSet::ensureIdSet() { |
187 if (!m_ids) | 187 if (!m_ids) |
188 m_ids = wrapUnique(new HashSet<AtomicString>); | 188 m_ids = WTF::wrapUnique(new HashSet<AtomicString>); |
189 return *m_ids; | 189 return *m_ids; |
190 } | 190 } |
191 | 191 |
192 HashSet<AtomicString>& InvalidationSet::ensureTagNameSet() { | 192 HashSet<AtomicString>& InvalidationSet::ensureTagNameSet() { |
193 if (!m_tagNames) | 193 if (!m_tagNames) |
194 m_tagNames = wrapUnique(new HashSet<AtomicString>); | 194 m_tagNames = WTF::wrapUnique(new HashSet<AtomicString>); |
195 return *m_tagNames; | 195 return *m_tagNames; |
196 } | 196 } |
197 | 197 |
198 HashSet<AtomicString>& InvalidationSet::ensureAttributeSet() { | 198 HashSet<AtomicString>& InvalidationSet::ensureAttributeSet() { |
199 if (!m_attributes) | 199 if (!m_attributes) |
200 m_attributes = wrapUnique(new HashSet<AtomicString>); | 200 m_attributes = WTF::wrapUnique(new HashSet<AtomicString>); |
201 return *m_attributes; | 201 return *m_attributes; |
202 } | 202 } |
203 | 203 |
204 void InvalidationSet::addClass(const AtomicString& className) { | 204 void InvalidationSet::addClass(const AtomicString& className) { |
205 if (wholeSubtreeInvalid()) | 205 if (wholeSubtreeInvalid()) |
206 return; | 206 return; |
207 DCHECK(!className.isEmpty()); | 207 DCHECK(!className.isEmpty()); |
208 ensureClassSet().add(className); | 208 ensureClassSet().add(className); |
209 } | 209 } |
210 | 210 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 return *m_siblingDescendantInvalidationSet; | 313 return *m_siblingDescendantInvalidationSet; |
314 } | 314 } |
315 | 315 |
316 DescendantInvalidationSet& SiblingInvalidationSet::ensureDescendants() { | 316 DescendantInvalidationSet& SiblingInvalidationSet::ensureDescendants() { |
317 if (!m_descendantInvalidationSet) | 317 if (!m_descendantInvalidationSet) |
318 m_descendantInvalidationSet = DescendantInvalidationSet::create(); | 318 m_descendantInvalidationSet = DescendantInvalidationSet::create(); |
319 return *m_descendantInvalidationSet; | 319 return *m_descendantInvalidationSet; |
320 } | 320 } |
321 | 321 |
322 } // namespace blink | 322 } // namespace blink |
OLD | NEW |