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

Side by Side Diff: Source/core/css/invalidation/DescendantInvalidationSet.cpp

Issue 222643002: Support tag names as invalidation set features. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 void DescendantInvalidationSet::getIds(Vector<AtomicString>& ids) const 156 void DescendantInvalidationSet::getIds(Vector<AtomicString>& ids) const
157 { 157 {
158 if (!m_ids) 158 if (!m_ids)
159 return; 159 return;
160 for (HashSet<AtomicString>::const_iterator it = m_ids->begin(); it != m_ids- >end(); ++it) 160 for (HashSet<AtomicString>::const_iterator it = m_ids->begin(); it != m_ids- >end(); ++it)
161 ids.append(*it); 161 ids.append(*it);
162 } 162 }
163 163
164 void DescendantInvalidationSet::getTagNames(Vector<AtomicString>& tagNames) cons t
165 {
166 if (!m_tagNames)
167 return;
168 for (HashSet<AtomicString>::const_iterator it = m_tagNames->begin(); it != m _tagNames->end(); ++it)
169 tagNames.append(*it);
170 }
171
164 void DescendantInvalidationSet::setWholeSubtreeInvalid() 172 void DescendantInvalidationSet::setWholeSubtreeInvalid()
165 { 173 {
166 if (m_allDescendantsMightBeInvalid) 174 if (m_allDescendantsMightBeInvalid)
167 return; 175 return;
168 176
169 m_allDescendantsMightBeInvalid = true; 177 m_allDescendantsMightBeInvalid = true;
170 m_classes = nullptr; 178 m_classes = nullptr;
171 m_ids = nullptr; 179 m_ids = nullptr;
172 m_tagNames = nullptr; 180 m_tagNames = nullptr;
173 m_attributes = nullptr; 181 m_attributes = nullptr;
174 } 182 }
175 183
176 } // namespace WebCore 184 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/invalidation/DescendantInvalidationSet.h ('k') | Source/core/css/invalidation/StyleInvalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698