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

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

Issue 946993002: Avoid style invalidation for empty sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added dummy selectors to tests to force descendant invalidation Created 5 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
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return; 192 return;
193 ensureAttributeSet().add(attribute); 193 ensureAttributeSet().add(attribute);
194 } 194 }
195 195
196 void DescendantInvalidationSet::setWholeSubtreeInvalid() 196 void DescendantInvalidationSet::setWholeSubtreeInvalid()
197 { 197 {
198 if (m_allDescendantsMightBeInvalid) 198 if (m_allDescendantsMightBeInvalid)
199 return; 199 return;
200 200
201 m_allDescendantsMightBeInvalid = true; 201 m_allDescendantsMightBeInvalid = true;
202 m_customPseudoInvalid = false;
202 m_treeBoundaryCrossing = false; 203 m_treeBoundaryCrossing = false;
203 m_insertionPointCrossing = false; 204 m_insertionPointCrossing = false;
204 m_classes = nullptr; 205 m_classes = nullptr;
205 m_ids = nullptr; 206 m_ids = nullptr;
206 m_tagNames = nullptr; 207 m_tagNames = nullptr;
207 m_attributes = nullptr; 208 m_attributes = nullptr;
208 } 209 }
209 210
210 void DescendantInvalidationSet::trace(Visitor* visitor) 211 void DescendantInvalidationSet::trace(Visitor* visitor)
211 { 212 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 { 269 {
269 RefPtr<TracedValue> value = TracedValue::create(); 270 RefPtr<TracedValue> value = TracedValue::create();
270 value->beginArray("DescendantInvalidationSet"); 271 value->beginArray("DescendantInvalidationSet");
271 toTracedValue(value.get()); 272 toTracedValue(value.get());
272 value->endArray(); 273 value->endArray();
273 fprintf(stderr, "%s\n", value->asTraceFormat().ascii().data()); 274 fprintf(stderr, "%s\n", value->asTraceFormat().ascii().data());
274 } 275 }
275 #endif // NDEBUG 276 #endif // NDEBUG
276 277
277 } // namespace blink 278 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698