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

Side by Side Diff: Source/core/css/resolver/ScopedStyleResolver.cpp

Issue 953693002: InlinedVisitor: Migrate css to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 void ScopedStyleResolver::collectViewportRulesTo(StyleResolver* resolver) const 206 void ScopedStyleResolver::collectViewportRulesTo(StyleResolver* resolver) const
207 { 207 {
208 if (!m_scope->rootNode().isDocumentNode()) 208 if (!m_scope->rootNode().isDocumentNode())
209 return; 209 return;
210 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) 210 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i)
211 resolver->viewportStyleResolver()->collectViewportRules(&m_authorStyleSh eets[i]->contents()->ruleSet(), ViewportStyleResolver::AuthorOrigin); 211 resolver->viewportStyleResolver()->collectViewportRules(&m_authorStyleSh eets[i]->contents()->ruleSet(), ViewportStyleResolver::AuthorOrigin);
212 } 212 }
213 213
214 void ScopedStyleResolver::trace(Visitor* visitor) 214 DEFINE_TRACE(ScopedStyleResolver)
215 { 215 {
216 #if ENABLE(OILPAN) 216 #if ENABLE(OILPAN)
217 visitor->trace(m_scope); 217 visitor->trace(m_scope);
218 visitor->trace(m_authorStyleSheets); 218 visitor->trace(m_authorStyleSheets);
219 visitor->trace(m_keyframesRuleMap); 219 visitor->trace(m_keyframesRuleMap);
220 visitor->trace(m_treeBoundaryCrossingRuleSet); 220 visitor->trace(m_treeBoundaryCrossingRuleSet);
221 #endif 221 #endif
222 } 222 }
223 223
224 static void addRules(RuleSet* ruleSet, const WillBeHeapVector<MinimalRuleData>& rules) 224 static void addRules(RuleSet* ruleSet, const WillBeHeapVector<MinimalRuleData>& rules)
(...skipping 17 matching lines...) Expand all
242 addRules(ruleSetForScope.get(), authorRules.shadowDistributedRules()); 242 addRules(ruleSetForScope.get(), authorRules.shadowDistributedRules());
243 243
244 if (!m_treeBoundaryCrossingRuleSet) { 244 if (!m_treeBoundaryCrossingRuleSet) {
245 m_treeBoundaryCrossingRuleSet = adoptPtrWillBeNoop(new CSSStyleSheetRule SubSet()); 245 m_treeBoundaryCrossingRuleSet = adoptPtrWillBeNoop(new CSSStyleSheetRule SubSet());
246 treeScope().document().styleResolver()->addTreeBoundaryCrossingScope(tre eScope().rootNode()); 246 treeScope().document().styleResolver()->addTreeBoundaryCrossingScope(tre eScope().rootNode());
247 } 247 }
248 248
249 m_treeBoundaryCrossingRuleSet->append(RuleSubSet::create(parentStyleSheet, s heetIndex, ruleSetForScope.release())); 249 m_treeBoundaryCrossingRuleSet->append(RuleSubSet::create(parentStyleSheet, s heetIndex, ruleSetForScope.release()));
250 } 250 }
251 251
252 void ScopedStyleResolver::RuleSubSet::trace(Visitor* visitor) 252 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet)
253 { 253 {
254 visitor->trace(m_ruleSet); 254 visitor->trace(m_ruleSet);
255 } 255 }
256 256
257 } // namespace blink 257 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698