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

Side by Side Diff: third_party/WebKit/Source/core/css/RuleFeature.cpp

Issue 2873433003: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: Created 3 years, 7 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (&siblingFeatures == &descendantFeatures) 1199 if (&siblingFeatures == &descendantFeatures)
1200 universalSet.setInvalidatesSelf(); 1200 universalSet.setInvalidatesSelf();
1201 else 1201 else
1202 addFeaturesToInvalidationSet(universalSet.ensureSiblingDescendants(), 1202 addFeaturesToInvalidationSet(universalSet.ensureSiblingDescendants(),
1203 descendantFeatures); 1203 descendantFeatures);
1204 } 1204 }
1205 1205
1206 DEFINE_TRACE(RuleFeatureSet) { 1206 DEFINE_TRACE(RuleFeatureSet) {
1207 visitor->trace(m_siblingRules); 1207 visitor->trace(m_siblingRules);
1208 visitor->trace(m_uncommonAttributeRules); 1208 visitor->trace(m_uncommonAttributeRules);
1209 visitor->trace(m_viewportDependentMediaQueryResults);
1210 visitor->trace(m_deviceDependentMediaQueryResults);
1211 } 1209 }
1212 1210
1213 void RuleFeatureSet::InvalidationSetFeatures::add( 1211 void RuleFeatureSet::InvalidationSetFeatures::add(
1214 const InvalidationSetFeatures& other) { 1212 const InvalidationSetFeatures& other) {
1215 classes.appendVector(other.classes); 1213 classes.appendVector(other.classes);
1216 attributes.appendVector(other.attributes); 1214 attributes.appendVector(other.attributes);
1217 ids.appendVector(other.ids); 1215 ids.appendVector(other.ids);
1218 tagNames.appendVector(other.tagNames); 1216 tagNames.appendVector(other.tagNames);
1219 maxDirectAdjacentSelectors = 1217 maxDirectAdjacentSelectors =
1220 std::max(maxDirectAdjacentSelectors, other.maxDirectAdjacentSelectors); 1218 std::max(maxDirectAdjacentSelectors, other.maxDirectAdjacentSelectors);
(...skipping 10 matching lines...) Expand all
1231 bool RuleFeatureSet::InvalidationSetFeatures::hasFeatures() const { 1229 bool RuleFeatureSet::InvalidationSetFeatures::hasFeatures() const {
1232 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() || 1230 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() ||
1233 !tagNames.isEmpty() || customPseudoElement; 1231 !tagNames.isEmpty() || customPseudoElement;
1234 } 1232 }
1235 1233
1236 bool RuleFeatureSet::InvalidationSetFeatures::hasIdClassOrAttribute() const { 1234 bool RuleFeatureSet::InvalidationSetFeatures::hasIdClassOrAttribute() const {
1237 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty(); 1235 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty();
1238 } 1236 }
1239 1237
1240 } // namespace blink 1238 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuerySetTest.cpp ('k') | third_party/WebKit/Source/core/css/RuleSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698