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

Side by Side Diff: sky/engine/core/css/StyleRule.h

Issue 775803002: Remove heap/Handle usage from v8_inspector (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #ifndef SKY_ENGINE_CORE_CSS_STYLERULE_H_ 22 #ifndef SKY_ENGINE_CORE_CSS_STYLERULE_H_
23 #define SKY_ENGINE_CORE_CSS_STYLERULE_H_ 23 #define SKY_ENGINE_CORE_CSS_STYLERULE_H_
24 24
25 #include "sky/engine/core/css/CSSSelectorList.h" 25 #include "sky/engine/core/css/CSSSelectorList.h"
26 #include "sky/engine/core/css/MediaList.h" 26 #include "sky/engine/core/css/MediaList.h"
27 #include "sky/engine/platform/heap/Handle.h"
28 #include "sky/engine/wtf/RefPtr.h" 27 #include "sky/engine/wtf/RefPtr.h"
29 28
30 namespace blink { 29 namespace blink {
31 30
32 class CSSRule; 31 class CSSRule;
33 class CSSStyleRule; 32 class CSSStyleRule;
34 class CSSStyleSheet; 33 class CSSStyleSheet;
35 class MutableStylePropertySet; 34 class MutableStylePropertySet;
36 class StylePropertySet; 35 class StylePropertySet;
37 36
(...skipping 15 matching lines...) Expand all
53 52
54 bool isFontFaceRule() const { return type() == FontFace; } 53 bool isFontFaceRule() const { return type() == FontFace; }
55 bool isKeyframesRule() const { return type() == Keyframes; } 54 bool isKeyframesRule() const { return type() == Keyframes; }
56 bool isMediaRule() const { return type() == Media; } 55 bool isMediaRule() const { return type() == Media; }
57 bool isStyleRule() const { return type() == Style; } 56 bool isStyleRule() const { return type() == Style; }
58 bool isSupportsRule() const { return type() == Supports; } 57 bool isSupportsRule() const { return type() == Supports; }
59 bool isFilterRule() const { return type() == Filter; } 58 bool isFilterRule() const { return type() == Filter; }
60 59
61 PassRefPtr<StyleRuleBase> copy() const; 60 PassRefPtr<StyleRuleBase> copy() const;
62 61
63 #if !ENABLE(OILPAN)
64 void deref() 62 void deref()
65 { 63 {
66 if (derefBase()) 64 if (derefBase())
67 destroy(); 65 destroy();
68 } 66 }
69 #endif // !ENABLE(OILPAN)
70 67
71 // FIXME: There shouldn't be any need for the null parent version. 68 // FIXME: There shouldn't be any need for the null parent version.
72 PassRefPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentSheet = 0) const ; 69 PassRefPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentSheet = 0) const ;
73 PassRefPtr<CSSRule> createCSSOMWrapper(CSSRule* parentRule) const; 70 PassRefPtr<CSSRule> createCSSOMWrapper(CSSRule* parentRule) const;
74 71
75 protected: 72 protected:
76 StyleRuleBase(Type type) : m_type(type) { } 73 StyleRuleBase(Type type) : m_type(type) { }
77 StyleRuleBase(const StyleRuleBase& o) : m_type(o.m_type) { } 74 StyleRuleBase(const StyleRuleBase& o) : m_type(o.m_type) { }
78 75
79 ~StyleRuleBase() { } 76 ~StyleRuleBase() { }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 210
214 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt yleRule()); 211 DEFINE_TYPE_CASTS(StyleRule, StyleRuleBase, rule, rule->isStyleRule(), rule.isSt yleRule());
215 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); 212 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace);
216 DEFINE_STYLE_RULE_TYPE_CASTS(Media); 213 DEFINE_STYLE_RULE_TYPE_CASTS(Media);
217 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); 214 DEFINE_STYLE_RULE_TYPE_CASTS(Supports);
218 DEFINE_STYLE_RULE_TYPE_CASTS(Filter); 215 DEFINE_STYLE_RULE_TYPE_CASTS(Filter);
219 216
220 } // namespace blink 217 } // namespace blink
221 218
222 #endif // SKY_ENGINE_CORE_CSS_STYLERULE_H_ 219 #endif // SKY_ENGINE_CORE_CSS_STYLERULE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaQueryListListener.h ('k') | sky/engine/core/inspector/ScriptArguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698