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

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

Issue 2837023005: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: fix 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // spec. 250 // spec.
251 DCHECK(scope_->RootNode().IsDocumentNode()); 251 DCHECK(scope_->RootNode().IsDocumentNode());
252 for (size_t i = 0; i < author_style_sheets_.size(); ++i) 252 for (size_t i = 0; i < author_style_sheets_.size(); ++i)
253 collector.MatchPageRules( 253 collector.MatchPageRules(
254 &author_style_sheets_[i]->Contents()->GetRuleSet()); 254 &author_style_sheets_[i]->Contents()->GetRuleSet());
255 } 255 }
256 256
257 DEFINE_TRACE(ScopedStyleResolver) { 257 DEFINE_TRACE(ScopedStyleResolver) {
258 visitor->Trace(scope_); 258 visitor->Trace(scope_);
259 visitor->Trace(author_style_sheets_); 259 visitor->Trace(author_style_sheets_);
260 visitor->Trace(viewport_dependent_media_query_results_);
261 visitor->Trace(device_dependent_media_query_results_);
262 visitor->Trace(keyframes_rule_map_); 260 visitor->Trace(keyframes_rule_map_);
263 visitor->Trace(tree_boundary_crossing_rule_set_); 261 visitor->Trace(tree_boundary_crossing_rule_set_);
264 } 262 }
265 263
266 static void AddRules(RuleSet* rule_set, 264 static void AddRules(RuleSet* rule_set,
267 const HeapVector<MinimalRuleData>& rules) { 265 const HeapVector<MinimalRuleData>& rules) {
268 for (unsigned i = 0; i < rules.size(); ++i) { 266 for (unsigned i = 0; i < rules.size(); ++i) {
269 const MinimalRuleData& info = rules[i]; 267 const MinimalRuleData& info = rules[i];
270 rule_set->AddRule(info.rule_, info.selector_index_, info.flags_); 268 rule_set->AddRule(info.rule_, info.selector_index_, info.flags_);
271 } 269 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 323 }
326 return true; 324 return true;
327 } 325 }
328 326
329 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { 327 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) {
330 visitor->Trace(parent_style_sheet_); 328 visitor->Trace(parent_style_sheet_);
331 visitor->Trace(rule_set_); 329 visitor->Trace(rule_set_);
332 } 330 }
333 331
334 } // namespace blink 332 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698