OLD | NEW |
1 /* Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. | 1 /* Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. |
2 * | 2 * |
3 * Redistribution and use in source and binary forms, with or without | 3 * Redistribution and use in source and binary forms, with or without |
4 * modification, are permitted provided that the following conditions are | 4 * modification, are permitted provided that the following conditions are |
5 * met: | 5 * met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above | 9 * 2. Redistributions in binary form must reproduce the above |
10 * copyright notice, this list of conditions and the following disclaimer in | 10 * copyright notice, this list of conditions and the following disclaimer in |
(...skipping 13 matching lines...) Expand all Loading... |
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef CSSSupportsRule_h | 29 #ifndef CSSSupportsRule_h |
30 #define CSSSupportsRule_h | 30 #define CSSSupportsRule_h |
31 | 31 |
32 #include "CSSGroupingRule.h" | 32 #include "CSSGroupingRule.h" |
33 | 33 |
34 #if ENABLE(CSS3_CONDITIONAL_RULES) | |
35 | |
36 namespace WebCore { | 34 namespace WebCore { |
37 | 35 |
38 class CSSRule; | 36 class CSSRule; |
39 class StyleRuleSupports; | 37 class StyleRuleSupports; |
40 | 38 |
41 class CSSSupportsRule : public CSSGroupingRule { | 39 class CSSSupportsRule : public CSSGroupingRule { |
42 public: | 40 public: |
43 static PassRefPtr<CSSSupportsRule> create(StyleRuleSupports* rule, CSSStyleS
heet* sheet) | 41 static PassRefPtr<CSSSupportsRule> create(StyleRuleSupports* rule, CSSStyleS
heet* sheet) |
44 { | 42 { |
45 return adoptRef(new CSSSupportsRule(rule, sheet)); | 43 return adoptRef(new CSSSupportsRule(rule, sheet)); |
46 } | 44 } |
47 | 45 |
48 virtual ~CSSSupportsRule() { } | 46 virtual ~CSSSupportsRule() { } |
49 | 47 |
50 virtual CSSRule::Type type() const OVERRIDE { return SUPPORTS_RULE; } | 48 virtual CSSRule::Type type() const OVERRIDE { return SUPPORTS_RULE; } |
51 virtual String cssText() const OVERRIDE; | 49 virtual String cssText() const OVERRIDE; |
52 | 50 |
53 String conditionText() const; | 51 String conditionText() const; |
54 | 52 |
55 private: | 53 private: |
56 CSSSupportsRule(StyleRuleSupports*, CSSStyleSheet*); | 54 CSSSupportsRule(StyleRuleSupports*, CSSStyleSheet*); |
57 }; | 55 }; |
58 | 56 |
59 } // namespace WebCore | 57 } // namespace WebCore |
60 | 58 |
61 #endif // ENABLE(CSS3_CONDITIONAL_RULES) | |
62 | |
63 #endif // CSSSupportsRule_h | 59 #endif // CSSSupportsRule_h |
OLD | NEW |