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

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: Added CSSRule.UNKNOWN_RULE as well 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,
philipj_slow 2015/06/10 13:34:21 Can you spell out the constant for every case to m
Sunil Ratnu 2015/06/10 13:54:40 Done.
45 STYLE_RULE,
46 CHARSET_RULE, 45 CHARSET_RULE,
47 IMPORT_RULE, 46 IMPORT_RULE,
48 MEDIA_RULE, 47 MEDIA_RULE,
49 FONT_FACE_RULE, 48 FONT_FACE_RULE,
50 PAGE_RULE, 49 PAGE_RULE,
51 // 7 was VARIABLES_RULE; we now match other browsers with 7 as 50 // 7 was VARIABLES_RULE; we now match other browsers with 7 as
philipj_slow 2015/06/10 13:34:21 I think you can remove this comment too, this was
Sunil Ratnu 2015/06/10 13:54:40 Done.
52 // KEYFRAMES_RULE: 51 // KEYFRAMES_RULE:
53 // <https://bugs.webkit.org/show_bug.cgi?id=71293>. 52 // <https://bugs.webkit.org/show_bug.cgi?id=71293>.
54 KEYFRAMES_RULE, 53 KEYFRAMES_RULE,
55 WEBKIT_KEYFRAMES_RULE = KEYFRAMES_RULE, 54 WEBKIT_KEYFRAMES_RULE = KEYFRAMES_RULE,
56 KEYFRAME_RULE, 55 KEYFRAME_RULE,
57 WEBKIT_KEYFRAME_RULE = KEYFRAME_RULE, 56 WEBKIT_KEYFRAME_RULE = KEYFRAME_RULE,
58 SUPPORTS_RULE = 12, 57 SUPPORTS_RULE = 12,
59 VIEWPORT_RULE = 15, 58 VIEWPORT_RULE = 15,
60 }; 59 };
61 60
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 CSSStyleSheet* m_parentStyleSheet; 113 CSSStyleSheet* m_parentStyleSheet;
115 }; 114 };
116 }; 115 };
117 116
118 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ 117 #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) 118 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, rule.type() == CSSRule::TYPE_NAME)
120 119
121 } // namespace blink 120 } // namespace blink
122 121
123 #endif // CSSRule_h 122 #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