| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 Google Inc. All rights reserved. | 2 * Copyright (c) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 String name; | 64 String name; |
| 65 String value; | 65 String value; |
| 66 bool important; | 66 bool important; |
| 67 bool disabled; | 67 bool disabled; |
| 68 bool parsedOk; | 68 bool parsedOk; |
| 69 SourceRange range; | 69 SourceRange range; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 struct CSSStyleSourceData : public GarbageCollected<CSSStyleSourceData> { | 72 struct CSSStyleSourceData : public GarbageCollected<CSSStyleSourceData> { |
| 73 static RawPtr<CSSStyleSourceData> create() | 73 static CSSStyleSourceData* create() |
| 74 { | 74 { |
| 75 return new CSSStyleSourceData(); | 75 return new CSSStyleSourceData(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 DEFINE_INLINE_TRACE() | 78 DEFINE_INLINE_TRACE() |
| 79 { | 79 { |
| 80 visitor->trace(propertyData); | 80 visitor->trace(propertyData); |
| 81 } | 81 } |
| 82 | 82 |
| 83 HeapVector<CSSPropertySourceData> propertyData; | 83 HeapVector<CSSPropertySourceData> propertyData; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 struct CSSMediaQueryExpSourceData { | 86 struct CSSMediaQueryExpSourceData { |
| 87 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 87 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 88 public: | 88 public: |
| 89 CSSMediaQueryExpSourceData(const SourceRange& valueRange) | 89 CSSMediaQueryExpSourceData(const SourceRange& valueRange) |
| 90 : valueRange(valueRange) { } | 90 : valueRange(valueRange) { } |
| 91 | 91 |
| 92 DEFINE_INLINE_TRACE() { visitor->trace(valueRange); } | 92 DEFINE_INLINE_TRACE() { visitor->trace(valueRange); } |
| 93 | 93 |
| 94 SourceRange valueRange; | 94 SourceRange valueRange; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 struct CSSMediaQuerySourceData : public GarbageCollected<CSSMediaQuerySourceData
> { | 97 struct CSSMediaQuerySourceData : public GarbageCollected<CSSMediaQuerySourceData
> { |
| 98 static RawPtr<CSSMediaQuerySourceData> create() | 98 static CSSMediaQuerySourceData* create() |
| 99 { | 99 { |
| 100 return new CSSMediaQuerySourceData(); | 100 return new CSSMediaQuerySourceData(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 DEFINE_INLINE_TRACE() | 103 DEFINE_INLINE_TRACE() |
| 104 { | 104 { |
| 105 visitor->trace(expData); | 105 visitor->trace(expData); |
| 106 } | 106 } |
| 107 | 107 |
| 108 HeapVector<CSSMediaQueryExpSourceData> expData; | 108 HeapVector<CSSMediaQueryExpSourceData> expData; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 struct CSSMediaSourceData : public GarbageCollected<CSSMediaSourceData> { | 111 struct CSSMediaSourceData : public GarbageCollected<CSSMediaSourceData> { |
| 112 static RawPtr<CSSMediaSourceData> create() | 112 static CSSMediaSourceData* create() |
| 113 { | 113 { |
| 114 return new CSSMediaSourceData(); | 114 return new CSSMediaSourceData(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 DEFINE_INLINE_TRACE() | 117 DEFINE_INLINE_TRACE() |
| 118 { | 118 { |
| 119 visitor->trace(queryData); | 119 visitor->trace(queryData); |
| 120 } | 120 } |
| 121 | 121 |
| 122 HeapVector<Member<CSSMediaQuerySourceData>> queryData; | 122 HeapVector<Member<CSSMediaQuerySourceData>> queryData; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 struct CSSRuleSourceData; | 125 struct CSSRuleSourceData; |
| 126 using RuleSourceDataList = HeapVector<Member<CSSRuleSourceData>>; | 126 using RuleSourceDataList = HeapVector<Member<CSSRuleSourceData>>; |
| 127 using SelectorRangeList = HeapVector<SourceRange>; | 127 using SelectorRangeList = HeapVector<SourceRange>; |
| 128 | 128 |
| 129 struct CSSRuleSourceData : public GarbageCollected<CSSRuleSourceData> { | 129 struct CSSRuleSourceData : public GarbageCollected<CSSRuleSourceData> { |
| 130 static RawPtr<CSSRuleSourceData> create(StyleRule::RuleType type) | 130 static CSSRuleSourceData* create(StyleRule::RuleType type) |
| 131 { | 131 { |
| 132 return new CSSRuleSourceData(type); | 132 return new CSSRuleSourceData(type); |
| 133 } | 133 } |
| 134 | 134 |
| 135 CSSRuleSourceData(StyleRule::RuleType type) | 135 CSSRuleSourceData(StyleRule::RuleType type) |
| 136 : type(type) | 136 : type(type) |
| 137 { | 137 { |
| 138 if (type == StyleRule::Style || type == StyleRule::FontFace || type == S
tyleRule::Page || type == StyleRule::Keyframe) | 138 if (type == StyleRule::Style || type == StyleRule::FontFace || type == S
tyleRule::Page || type == StyleRule::Keyframe) |
| 139 styleSourceData = CSSStyleSourceData::create(); | 139 styleSourceData = CSSStyleSourceData::create(); |
| 140 if (type == StyleRule::Media || type == StyleRule::Import) | 140 if (type == StyleRule::Media || type == StyleRule::Import) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 164 Member<CSSMediaSourceData> mediaSourceData; | 164 Member<CSSMediaSourceData> mediaSourceData; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| 168 | 168 |
| 169 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::SourceRange); | 169 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::SourceRange); |
| 170 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSPropertySourceData); | 170 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSPropertySourceData); |
| 171 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSMediaQueryExpSourceData); | 171 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSMediaQueryExpSourceData); |
| 172 | 172 |
| 173 #endif // CSSPropertySourceData_h | 173 #endif // CSSPropertySourceData_h |
| OLD | NEW |