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

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

Issue 2416893002: CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule (Closed)
Patch Set: Fix windows build Created 4 years, 2 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 /* 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 11 matching lines...) Expand all
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 "core/css/CSSGroupingRule.h" 32 #include "core/css/CSSConditionRule.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class StyleRuleSupports; 36 class StyleRuleSupports;
37 37
38 class CSSSupportsRule final : public CSSGroupingRule { 38 class CSSSupportsRule final : public CSSConditionRule {
39 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
40 40
41 public: 41 public:
42 static CSSSupportsRule* create(StyleRuleSupports* rule, 42 static CSSSupportsRule* create(StyleRuleSupports* rule,
43 CSSStyleSheet* sheet) { 43 CSSStyleSheet* sheet) {
44 return new CSSSupportsRule(rule, sheet); 44 return new CSSSupportsRule(rule, sheet);
45 } 45 }
46 46
47 ~CSSSupportsRule() override {} 47 ~CSSSupportsRule() override {}
48 48
49 String cssText() const override; 49 String cssText() const override;
50 50
51 String conditionText() const;
52
53 DEFINE_INLINE_VIRTUAL_TRACE() { CSSGroupingRule::trace(visitor); }
foolip 2016/10/18 10:38:33 I think this should move into CSSConditionRule ins
54
55 private: 51 private:
56 CSSSupportsRule(StyleRuleSupports*, CSSStyleSheet*); 52 CSSSupportsRule(StyleRuleSupports*, CSSStyleSheet*);
57 53
58 CSSRule::Type type() const override { return kSupportsRule; } 54 CSSRule::Type type() const override { return kSupportsRule; }
59 }; 55 };
60 56
61 DEFINE_CSS_RULE_TYPE_CASTS(CSSSupportsRule, kSupportsRule); 57 DEFINE_CSS_RULE_TYPE_CASTS(CSSSupportsRule, kSupportsRule);
62 58
63 } // namespace blink 59 } // namespace blink
64 60
65 #endif // CSSSupportsRule_h 61 #endif // CSSSupportsRule_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698