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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSPropertySourceData); | 83 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSPropertySourceData); |
84 | 84 |
85 namespace blink { | 85 namespace blink { |
86 | 86 |
87 class CSSStyleSourceData { | 87 class CSSStyleSourceData { |
88 USING_FAST_MALLOC(CSSStyleSourceData); | 88 USING_FAST_MALLOC(CSSStyleSourceData); |
89 | 89 |
90 public: | 90 public: |
91 static std::unique_ptr<CSSStyleSourceData> create() { | 91 static std::unique_ptr<CSSStyleSourceData> create() { |
92 return wrapUnique(new CSSStyleSourceData); | 92 return WTF::wrapUnique(new CSSStyleSourceData); |
93 } | 93 } |
94 | 94 |
95 Vector<CSSPropertySourceData> propertyData; | 95 Vector<CSSPropertySourceData> propertyData; |
96 }; | 96 }; |
97 | 97 |
98 class CSSMediaQueryExpSourceData { | 98 class CSSMediaQueryExpSourceData { |
99 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 99 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
100 | 100 |
101 public: | 101 public: |
102 CSSMediaQueryExpSourceData(const SourceRange& valueRange) | 102 CSSMediaQueryExpSourceData(const SourceRange& valueRange) |
103 : valueRange(valueRange) {} | 103 : valueRange(valueRange) {} |
104 | 104 |
105 SourceRange valueRange; | 105 SourceRange valueRange; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
109 | 109 |
110 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSMediaQueryExpSourceData); | 110 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSMediaQueryExpSourceData); |
111 | 111 |
112 namespace blink { | 112 namespace blink { |
113 | 113 |
114 class CSSMediaQuerySourceData { | 114 class CSSMediaQuerySourceData { |
115 public: | 115 public: |
116 static std::unique_ptr<CSSMediaQuerySourceData> create() { | 116 static std::unique_ptr<CSSMediaQuerySourceData> create() { |
117 return wrapUnique(new CSSMediaQuerySourceData); | 117 return WTF::wrapUnique(new CSSMediaQuerySourceData); |
118 } | 118 } |
119 | 119 |
120 Vector<CSSMediaQueryExpSourceData> expData; | 120 Vector<CSSMediaQueryExpSourceData> expData; |
121 }; | 121 }; |
122 | 122 |
123 class CSSMediaSourceData { | 123 class CSSMediaSourceData { |
124 USING_FAST_MALLOC(CSSMediaSourceData); | 124 USING_FAST_MALLOC(CSSMediaSourceData); |
125 | 125 |
126 public: | 126 public: |
127 static std::unique_ptr<CSSMediaSourceData> create() { | 127 static std::unique_ptr<CSSMediaSourceData> create() { |
128 return wrapUnique(new CSSMediaSourceData); | 128 return WTF::wrapUnique(new CSSMediaSourceData); |
129 } | 129 } |
130 | 130 |
131 Vector<std::unique_ptr<CSSMediaQuerySourceData>> queryData; | 131 Vector<std::unique_ptr<CSSMediaQuerySourceData>> queryData; |
132 }; | 132 }; |
133 | 133 |
134 class CSSRuleSourceData; | 134 class CSSRuleSourceData; |
135 using RuleSourceDataList = Vector<RefPtr<CSSRuleSourceData>>; | 135 using RuleSourceDataList = Vector<RefPtr<CSSRuleSourceData>>; |
136 using SelectorRangeList = Vector<SourceRange>; | 136 using SelectorRangeList = Vector<SourceRange>; |
137 | 137 |
138 class CSSRuleSourceData : public RefCounted<CSSRuleSourceData> { | 138 class CSSRuleSourceData : public RefCounted<CSSRuleSourceData> { |
(...skipping 29 matching lines...) Expand all Loading... |
168 type == StyleRule::Page || type == StyleRule::Keyframe) | 168 type == StyleRule::Page || type == StyleRule::Keyframe) |
169 styleSourceData = CSSStyleSourceData::create(); | 169 styleSourceData = CSSStyleSourceData::create(); |
170 if (type == StyleRule::Media || type == StyleRule::Import) | 170 if (type == StyleRule::Media || type == StyleRule::Import) |
171 mediaSourceData = CSSMediaSourceData::create(); | 171 mediaSourceData = CSSMediaSourceData::create(); |
172 } | 172 } |
173 }; | 173 }; |
174 | 174 |
175 } // namespace blink | 175 } // namespace blink |
176 | 176 |
177 #endif // CSSPropertySourceData_h | 177 #endif // CSSPropertySourceData_h |
OLD | NEW |