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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp

Issue 1729013002: blink: Rename enums and functions to not collide with chromium style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-3: . Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return m_images.get(size); 120 return m_images.get(size);
121 } 121 }
122 122
123 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima ge) 123 void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima ge)
124 { 124 {
125 m_images.add(size, image); 125 m_images.add(size, image);
126 } 126 }
127 127
128 PassRefPtr<Image> CSSImageGeneratorValue::image(const LayoutObject* layoutObject , const IntSize& size) 128 PassRefPtr<Image> CSSImageGeneratorValue::image(const LayoutObject* layoutObject , const IntSize& size)
129 { 129 {
130 switch (classType()) { 130 switch (getClassType()) {
131 case CrossfadeClass: 131 case CrossfadeClass:
132 return toCSSCrossfadeValue(this)->image(layoutObject, size); 132 return toCSSCrossfadeValue(this)->image(layoutObject, size);
133 case LinearGradientClass: 133 case LinearGradientClass:
134 return toCSSLinearGradientValue(this)->image(layoutObject, size); 134 return toCSSLinearGradientValue(this)->image(layoutObject, size);
135 case RadialGradientClass: 135 case RadialGradientClass:
136 return toCSSRadialGradientValue(this)->image(layoutObject, size); 136 return toCSSRadialGradientValue(this)->image(layoutObject, size);
137 default: 137 default:
138 ASSERT_NOT_REACHED(); 138 ASSERT_NOT_REACHED();
139 } 139 }
140 return nullptr; 140 return nullptr;
141 } 141 }
142 142
143 bool CSSImageGeneratorValue::isFixedSize() const 143 bool CSSImageGeneratorValue::isFixedSize() const
144 { 144 {
145 switch (classType()) { 145 switch (getClassType()) {
146 case CrossfadeClass: 146 case CrossfadeClass:
147 return toCSSCrossfadeValue(this)->isFixedSize(); 147 return toCSSCrossfadeValue(this)->isFixedSize();
148 case LinearGradientClass: 148 case LinearGradientClass:
149 return toCSSLinearGradientValue(this)->isFixedSize(); 149 return toCSSLinearGradientValue(this)->isFixedSize();
150 case RadialGradientClass: 150 case RadialGradientClass:
151 return toCSSRadialGradientValue(this)->isFixedSize(); 151 return toCSSRadialGradientValue(this)->isFixedSize();
152 default: 152 default:
153 ASSERT_NOT_REACHED(); 153 ASSERT_NOT_REACHED();
154 } 154 }
155 return false; 155 return false;
156 } 156 }
157 157
158 IntSize CSSImageGeneratorValue::fixedSize(const LayoutObject* layoutObject) 158 IntSize CSSImageGeneratorValue::fixedSize(const LayoutObject* layoutObject)
159 { 159 {
160 switch (classType()) { 160 switch (getClassType()) {
161 case CrossfadeClass: 161 case CrossfadeClass:
162 return toCSSCrossfadeValue(this)->fixedSize(layoutObject); 162 return toCSSCrossfadeValue(this)->fixedSize(layoutObject);
163 case LinearGradientClass: 163 case LinearGradientClass:
164 return toCSSLinearGradientValue(this)->fixedSize(layoutObject); 164 return toCSSLinearGradientValue(this)->fixedSize(layoutObject);
165 case RadialGradientClass: 165 case RadialGradientClass:
166 return toCSSRadialGradientValue(this)->fixedSize(layoutObject); 166 return toCSSRadialGradientValue(this)->fixedSize(layoutObject);
167 default: 167 default:
168 ASSERT_NOT_REACHED(); 168 ASSERT_NOT_REACHED();
169 } 169 }
170 return IntSize(); 170 return IntSize();
171 } 171 }
172 172
173 bool CSSImageGeneratorValue::isPending() const 173 bool CSSImageGeneratorValue::isPending() const
174 { 174 {
175 switch (classType()) { 175 switch (getClassType()) {
176 case CrossfadeClass: 176 case CrossfadeClass:
177 return toCSSCrossfadeValue(this)->isPending(); 177 return toCSSCrossfadeValue(this)->isPending();
178 case LinearGradientClass: 178 case LinearGradientClass:
179 return toCSSLinearGradientValue(this)->isPending(); 179 return toCSSLinearGradientValue(this)->isPending();
180 case RadialGradientClass: 180 case RadialGradientClass:
181 return toCSSRadialGradientValue(this)->isPending(); 181 return toCSSRadialGradientValue(this)->isPending();
182 default: 182 default:
183 ASSERT_NOT_REACHED(); 183 ASSERT_NOT_REACHED();
184 } 184 }
185 return false; 185 return false;
186 } 186 }
187 187
188 bool CSSImageGeneratorValue::knownToBeOpaque(const LayoutObject* layoutObject) c onst 188 bool CSSImageGeneratorValue::knownToBeOpaque(const LayoutObject* layoutObject) c onst
189 { 189 {
190 switch (classType()) { 190 switch (getClassType()) {
191 case CrossfadeClass: 191 case CrossfadeClass:
192 return toCSSCrossfadeValue(this)->knownToBeOpaque(layoutObject); 192 return toCSSCrossfadeValue(this)->knownToBeOpaque(layoutObject);
193 case LinearGradientClass: 193 case LinearGradientClass:
194 return toCSSLinearGradientValue(this)->knownToBeOpaque(layoutObject); 194 return toCSSLinearGradientValue(this)->knownToBeOpaque(layoutObject);
195 case RadialGradientClass: 195 case RadialGradientClass:
196 return toCSSRadialGradientValue(this)->knownToBeOpaque(layoutObject); 196 return toCSSRadialGradientValue(this)->knownToBeOpaque(layoutObject);
197 default: 197 default:
198 ASSERT_NOT_REACHED(); 198 ASSERT_NOT_REACHED();
199 } 199 }
200 return false; 200 return false;
201 } 201 }
202 202
203 void CSSImageGeneratorValue::loadSubimages(Document* document) 203 void CSSImageGeneratorValue::loadSubimages(Document* document)
204 { 204 {
205 switch (classType()) { 205 switch (getClassType()) {
206 case CrossfadeClass: 206 case CrossfadeClass:
207 toCSSCrossfadeValue(this)->loadSubimages(document); 207 toCSSCrossfadeValue(this)->loadSubimages(document);
208 break; 208 break;
209 case LinearGradientClass: 209 case LinearGradientClass:
210 toCSSLinearGradientValue(this)->loadSubimages(document); 210 toCSSLinearGradientValue(this)->loadSubimages(document);
211 break; 211 break;
212 case RadialGradientClass: 212 case RadialGradientClass:
213 toCSSRadialGradientValue(this)->loadSubimages(document); 213 toCSSRadialGradientValue(this)->loadSubimages(document);
214 break; 214 break;
215 default: 215 default:
216 ASSERT_NOT_REACHED(); 216 ASSERT_NOT_REACHED();
217 } 217 }
218 } 218 }
219 219
220 } // namespace blink 220 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFace.cpp ('k') | third_party/WebKit/Source/core/css/CSSPropertySourceData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698