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

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

Issue 220123004: Add support for element ids in TargetedStyleRecalc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix comment. 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
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 void DescendantInvalidationSet::getAttributes(Vector<AtomicString>& attributes) const 144 void DescendantInvalidationSet::getAttributes(Vector<AtomicString>& attributes) const
145 { 145 {
146 if (!m_attributes) 146 if (!m_attributes)
147 return; 147 return;
148 for (HashSet<AtomicString>::const_iterator it = m_attributes->begin(); it != m_attributes->end(); ++it) 148 for (HashSet<AtomicString>::const_iterator it = m_attributes->begin(); it != m_attributes->end(); ++it)
149 attributes.append(*it); 149 attributes.append(*it);
150 } 150 }
151 151
152 void DescendantInvalidationSet::getIds(Vector<AtomicString>& ids) const
153 {
154 if (!m_ids)
155 return;
156 for (HashSet<AtomicString>::const_iterator it = m_ids->begin(); it != m_ids- >end(); ++it)
157 ids.append(*it);
158 }
159
152 void DescendantInvalidationSet::setWholeSubtreeInvalid() 160 void DescendantInvalidationSet::setWholeSubtreeInvalid()
153 { 161 {
154 if (m_allDescendantsMightBeInvalid) 162 if (m_allDescendantsMightBeInvalid)
155 return; 163 return;
156 164
157 m_allDescendantsMightBeInvalid = true; 165 m_allDescendantsMightBeInvalid = true;
158 m_classes = nullptr; 166 m_classes = nullptr;
159 m_ids = nullptr; 167 m_ids = nullptr;
160 m_tagNames = nullptr; 168 m_tagNames = nullptr;
161 m_attributes = nullptr; 169 m_attributes = nullptr;
162 } 170 }
163 171
164 } // namespace WebCore 172 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698