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

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

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 * (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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 StyleRuleCondition(RuleType, HeapVector<Member<StyleRuleBase>>& adoptRule); 231 StyleRuleCondition(RuleType, HeapVector<Member<StyleRuleBase>>& adoptRule);
232 StyleRuleCondition(RuleType, 232 StyleRuleCondition(RuleType,
233 const String& conditionText, 233 const String& conditionText,
234 HeapVector<Member<StyleRuleBase>>& adoptRule); 234 HeapVector<Member<StyleRuleBase>>& adoptRule);
235 StyleRuleCondition(const StyleRuleCondition&); 235 StyleRuleCondition(const StyleRuleCondition&);
236 String m_conditionText; 236 String m_conditionText;
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(MediaQuerySet* media, 241 static StyleRuleMedia* create(RefPtr<MediaQuerySet> media,
242 HeapVector<Member<StyleRuleBase>>& adoptRules) { 242 HeapVector<Member<StyleRuleBase>>& adoptRules) {
243 return new StyleRuleMedia(media, adoptRules); 243 return new StyleRuleMedia(media, adoptRules);
244 } 244 }
245 245
246 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } 246 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); }
247 247
248 StyleRuleMedia* copy() const { return new StyleRuleMedia(*this); } 248 StyleRuleMedia* copy() const { return new StyleRuleMedia(*this); }
249 249
250 DECLARE_TRACE_AFTER_DISPATCH(); 250 DECLARE_TRACE_AFTER_DISPATCH();
251 251
252 private: 252 private:
253 StyleRuleMedia(MediaQuerySet*, HeapVector<Member<StyleRuleBase>>& adoptRules); 253 StyleRuleMedia(RefPtr<MediaQuerySet>,
254 HeapVector<Member<StyleRuleBase>>& adoptRules);
254 StyleRuleMedia(const StyleRuleMedia&); 255 StyleRuleMedia(const StyleRuleMedia&);
255 256
256 Member<MediaQuerySet> m_mediaQueries; 257 RefPtr<MediaQuerySet> m_mediaQueries;
257 }; 258 };
258 259
259 class StyleRuleSupports : public StyleRuleCondition { 260 class StyleRuleSupports : public StyleRuleCondition {
260 public: 261 public:
261 static StyleRuleSupports* create( 262 static StyleRuleSupports* create(
262 const String& conditionText, 263 const String& conditionText,
263 bool conditionIsSupported, 264 bool conditionIsSupported,
264 HeapVector<Member<StyleRuleBase>>& adoptRules) { 265 HeapVector<Member<StyleRuleBase>>& adoptRules) {
265 return new StyleRuleSupports(conditionText, conditionIsSupported, 266 return new StyleRuleSupports(conditionText, conditionIsSupported,
266 adoptRules); 267 adoptRules);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); 330 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace);
330 DEFINE_STYLE_RULE_TYPE_CASTS(Page); 331 DEFINE_STYLE_RULE_TYPE_CASTS(Page);
331 DEFINE_STYLE_RULE_TYPE_CASTS(Media); 332 DEFINE_STYLE_RULE_TYPE_CASTS(Media);
332 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); 333 DEFINE_STYLE_RULE_TYPE_CASTS(Supports);
333 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); 334 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport);
334 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); 335 DEFINE_STYLE_RULE_TYPE_CASTS(Charset);
335 336
336 } // namespace blink 337 } // namespace blink
337 338
338 #endif // StyleRule_h 339 #endif // StyleRule_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleMedia.cpp ('k') | third_party/WebKit/Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698