Index: Source/core/css/CSSPropertySourceData.h |
diff --git a/Source/core/css/CSSPropertySourceData.h b/Source/core/css/CSSPropertySourceData.h |
index 2c473a257a01a8cf78c06a4ef12b5d632d20b18f..cef6b39a0a7f9972849c5c9c9c612c150168f483 100644 |
--- a/Source/core/css/CSSPropertySourceData.h |
+++ b/Source/core/css/CSSPropertySourceData.h |
@@ -31,6 +31,7 @@ |
#ifndef CSSPropertySourceData_h |
#define CSSPropertySourceData_h |
+#include "core/css/StyleRule.h" |
#include "platform/heap/Handle.h" |
#include "wtf/Forward.h" |
#include "wtf/RefCounted.h" |
@@ -117,41 +118,23 @@ typedef WillBeHeapVector<RefPtrWillBeMember<CSSRuleSourceData> > RuleSourceDataL |
typedef WillBeHeapVector<SourceRange> SelectorRangeList; |
struct CSSRuleSourceData : public RefCountedWillBeGarbageCollected<CSSRuleSourceData> { |
- enum Type { |
- UNKNOWN_RULE, |
- STYLE_RULE, |
- CHARSET_RULE, |
- IMPORT_RULE, |
- MEDIA_RULE, |
- FONT_FACE_RULE, |
- PAGE_RULE, |
- KEYFRAMES_RULE, |
- VIEWPORT_RULE, |
- SUPPORTS_RULE, |
- }; |
- |
- static PassRefPtrWillBeRawPtr<CSSRuleSourceData> create(Type type) |
+ static PassRefPtrWillBeRawPtr<CSSRuleSourceData> create(StyleRule::Type type) |
{ |
return adoptRefWillBeNoop(new CSSRuleSourceData(type)); |
} |
- static PassRefPtrWillBeRawPtr<CSSRuleSourceData> createUnknown() |
- { |
- return adoptRefWillBeNoop(new CSSRuleSourceData(UNKNOWN_RULE)); |
- } |
- |
- CSSRuleSourceData(Type type) |
+ CSSRuleSourceData(StyleRule::Type type) |
: type(type) |
{ |
- if (type == STYLE_RULE || type == FONT_FACE_RULE || type == PAGE_RULE) |
+ if (type == StyleRule::Style || type == StyleRule::FontFace || type == StyleRule::Page) |
styleSourceData = CSSStyleSourceData::create(); |
- if (type == MEDIA_RULE || type == IMPORT_RULE) |
+ if (type == StyleRule::Media || type == StyleRule::Import) |
mediaSourceData = CSSMediaSourceData::create(); |
} |
DECLARE_TRACE(); |
- Type type; |
+ StyleRule::Type type; |
// Range of the selector list in the enclosing source. |
SourceRange ruleHeaderRange; |