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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleRule.h

Issue 2837023005: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: fix Created 3 years, 8 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2006, 2008, 2012, 2013 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2006, 2008, 2012, 2013 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 StyleRuleCondition(RuleType, 232 StyleRuleCondition(RuleType,
233 const String& condition_text, 233 const String& condition_text,
234 HeapVector<Member<StyleRuleBase>>& adopt_rule); 234 HeapVector<Member<StyleRuleBase>>& adopt_rule);
235 StyleRuleCondition(const StyleRuleCondition&); 235 StyleRuleCondition(const StyleRuleCondition&);
236 String condition_text_; 236 String condition_text_;
237 }; 237 };
238 238
239 class CORE_EXPORT StyleRuleMedia : public StyleRuleCondition { 239 class CORE_EXPORT StyleRuleMedia : public StyleRuleCondition {
240 public: 240 public:
241 static StyleRuleMedia* Create( 241 static StyleRuleMedia* Create(
242 MediaQuerySet* media, 242 RefPtr<MediaQuerySet> media,
243 HeapVector<Member<StyleRuleBase>>& adopt_rules) { 243 HeapVector<Member<StyleRuleBase>>& adopt_rules) {
244 return new StyleRuleMedia(media, adopt_rules); 244 return new StyleRuleMedia(media, adopt_rules);
245 } 245 }
246 246
247 MediaQuerySet* MediaQueries() const { return media_queries_.Get(); } 247 MediaQuerySet* MediaQueries() const { return media_queries_.Get(); }
248 248
249 StyleRuleMedia* Copy() const { return new StyleRuleMedia(*this); } 249 StyleRuleMedia* Copy() const { return new StyleRuleMedia(*this); }
250 250
251 DECLARE_TRACE_AFTER_DISPATCH(); 251 DECLARE_TRACE_AFTER_DISPATCH();
252 252
253 private: 253 private:
254 StyleRuleMedia(MediaQuerySet*, 254 StyleRuleMedia(RefPtr<MediaQuerySet>,
255 HeapVector<Member<StyleRuleBase>>& adopt_rules); 255 HeapVector<Member<StyleRuleBase>>& adopt_rules);
256 StyleRuleMedia(const StyleRuleMedia&); 256 StyleRuleMedia(const StyleRuleMedia&);
257 257
258 Member<MediaQuerySet> media_queries_; 258 RefPtr<MediaQuerySet> media_queries_;
259 }; 259 };
260 260
261 class StyleRuleSupports : public StyleRuleCondition { 261 class StyleRuleSupports : public StyleRuleCondition {
262 public: 262 public:
263 static StyleRuleSupports* Create( 263 static StyleRuleSupports* Create(
264 const String& condition_text, 264 const String& condition_text,
265 bool condition_is_supported, 265 bool condition_is_supported,
266 HeapVector<Member<StyleRuleBase>>& adopt_rules) { 266 HeapVector<Member<StyleRuleBase>>& adopt_rules) {
267 return new StyleRuleSupports(condition_text, condition_is_supported, 267 return new StyleRuleSupports(condition_text, condition_is_supported,
268 adopt_rules); 268 adopt_rules);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); 331 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace);
332 DEFINE_STYLE_RULE_TYPE_CASTS(Page); 332 DEFINE_STYLE_RULE_TYPE_CASTS(Page);
333 DEFINE_STYLE_RULE_TYPE_CASTS(Media); 333 DEFINE_STYLE_RULE_TYPE_CASTS(Media);
334 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); 334 DEFINE_STYLE_RULE_TYPE_CASTS(Supports);
335 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); 335 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport);
336 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); 336 DEFINE_STYLE_RULE_TYPE_CASTS(Charset);
337 337
338 } // namespace blink 338 } // namespace blink
339 339
340 #endif // StyleRule_h 340 #endif // StyleRule_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698