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

Side by Side Diff: Source/core/css/CSSRule.h

Issue 1154753006: Remove CSSRule.UNKNOWN_RULE and CSSUnknownRule interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 years, 6 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSRule.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2007, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2006, 2007, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) 5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 23 matching lines...) Expand all
34 class CSSRuleList; 34 class CSSRuleList;
35 class CSSStyleSheet; 35 class CSSStyleSheet;
36 class StyleRuleBase; 36 class StyleRuleBase;
37 37
38 class CSSRule : public RefCountedWillBeGarbageCollectedFinalized<CSSRule>, publi c ScriptWrappable { 38 class CSSRule : public RefCountedWillBeGarbageCollectedFinalized<CSSRule>, publi c ScriptWrappable {
39 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
40 public: 40 public:
41 virtual ~CSSRule() { } 41 virtual ~CSSRule() { }
42 42
43 enum Type { 43 enum Type {
44 UNKNOWN_RULE, 44 STYLE_RULE = 1,
45 STYLE_RULE, 45 CHARSET_RULE = 2,
46 CHARSET_RULE, 46 IMPORT_RULE = 3,
47 IMPORT_RULE, 47 MEDIA_RULE = 4,
48 MEDIA_RULE, 48 FONT_FACE_RULE = 5,
49 FONT_FACE_RULE, 49 PAGE_RULE = 6,
50 PAGE_RULE, 50 KEYFRAMES_RULE = 7,
51 // 7 was VARIABLES_RULE; we now match other browsers with 7 as
52 // KEYFRAMES_RULE:
53 // <https://bugs.webkit.org/show_bug.cgi?id=71293>.
54 KEYFRAMES_RULE,
55 WEBKIT_KEYFRAMES_RULE = KEYFRAMES_RULE, 51 WEBKIT_KEYFRAMES_RULE = KEYFRAMES_RULE,
56 KEYFRAME_RULE, 52 KEYFRAME_RULE = 8,
57 WEBKIT_KEYFRAME_RULE = KEYFRAME_RULE, 53 WEBKIT_KEYFRAME_RULE = KEYFRAME_RULE,
58 SUPPORTS_RULE = 12, 54 SUPPORTS_RULE = 12,
59 VIEWPORT_RULE = 15, 55 VIEWPORT_RULE = 15,
60 }; 56 };
61 57
62 virtual Type type() const = 0; 58 virtual Type type() const = 0;
63 virtual String cssText() const = 0; 59 virtual String cssText() const = 0;
64 virtual void reattach(StyleRuleBase*) = 0; 60 virtual void reattach(StyleRuleBase*) = 0;
65 61
66 virtual CSSRuleList* cssRules() const { return 0; } 62 virtual CSSRuleList* cssRules() const { return 0; }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 CSSStyleSheet* m_parentStyleSheet; 110 CSSStyleSheet* m_parentStyleSheet;
115 }; 111 };
116 }; 112 };
117 113
118 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ 114 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \
119 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, rule.type() == CSSRule::TYPE_NAME) 115 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, rule.type() == CSSRule::TYPE_NAME)
120 116
121 } // namespace blink 117 } // namespace blink
122 118
123 #endif // CSSRule_h 119 #endif // CSSRule_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSRule.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698