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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2012 Google Inc. All rights reserved. 5 * Copyright (C) 2012 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Only consider the global author RuleSet for @page rules, as per the HTML5 246 // Only consider the global author RuleSet for @page rules, as per the HTML5
247 // spec. 247 // spec.
248 ASSERT(m_scope->rootNode().isDocumentNode()); 248 ASSERT(m_scope->rootNode().isDocumentNode());
249 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) 249 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i)
250 collector.matchPageRules(&m_authorStyleSheets[i]->contents()->ruleSet()); 250 collector.matchPageRules(&m_authorStyleSheets[i]->contents()->ruleSet());
251 } 251 }
252 252
253 DEFINE_TRACE(ScopedStyleResolver) { 253 DEFINE_TRACE(ScopedStyleResolver) {
254 visitor->trace(m_scope); 254 visitor->trace(m_scope);
255 visitor->trace(m_authorStyleSheets); 255 visitor->trace(m_authorStyleSheets);
256 visitor->trace(m_viewportDependentMediaQueryResults);
257 visitor->trace(m_deviceDependentMediaQueryResults);
258 visitor->trace(m_keyframesRuleMap); 256 visitor->trace(m_keyframesRuleMap);
259 visitor->trace(m_treeBoundaryCrossingRuleSet); 257 visitor->trace(m_treeBoundaryCrossingRuleSet);
260 } 258 }
261 259
262 static void addRules(RuleSet* ruleSet, 260 static void addRules(RuleSet* ruleSet,
263 const HeapVector<MinimalRuleData>& rules) { 261 const HeapVector<MinimalRuleData>& rules) {
264 for (unsigned i = 0; i < rules.size(); ++i) { 262 for (unsigned i = 0; i < rules.size(); ++i) {
265 const MinimalRuleData& info = rules[i]; 263 const MinimalRuleData& info = rules[i];
266 ruleSet->addRule(info.m_rule, info.m_selectorIndex, info.m_flags); 264 ruleSet->addRule(info.m_rule, info.m_selectorIndex, info.m_flags);
267 } 265 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 317 }
320 return true; 318 return true;
321 } 319 }
322 320
323 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { 321 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) {
324 visitor->trace(m_parentStyleSheet); 322 visitor->trace(m_parentStyleSheet);
325 visitor->trace(m_ruleSet); 323 visitor->trace(m_ruleSet);
326 } 324 }
327 325
328 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698