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

Side by Side Diff: sky/engine/core/css/CSSValue.cpp

Issue 876913002: Remove CSSCanvas values. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/css/CSSValue.h ('k') | sky/engine/core/css/parser/BisonCSSParser-in.cpp » ('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 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) 2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org)
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 */ 25 */
26 26
27 #include "sky/engine/config.h" 27 #include "sky/engine/config.h"
28 #include "sky/engine/core/css/CSSValue.h" 28 #include "sky/engine/core/css/CSSValue.h"
29 29
30 #include "sky/engine/core/css/CSSAspectRatioValue.h" 30 #include "sky/engine/core/css/CSSAspectRatioValue.h"
31 #include "sky/engine/core/css/CSSBorderImageSliceValue.h" 31 #include "sky/engine/core/css/CSSBorderImageSliceValue.h"
32 #include "sky/engine/core/css/CSSCalculationValue.h" 32 #include "sky/engine/core/css/CSSCalculationValue.h"
33 #include "sky/engine/core/css/CSSCanvasValue.h"
34 #include "sky/engine/core/css/CSSCrossfadeValue.h" 33 #include "sky/engine/core/css/CSSCrossfadeValue.h"
35 #include "sky/engine/core/css/CSSCursorImageValue.h" 34 #include "sky/engine/core/css/CSSCursorImageValue.h"
36 #include "sky/engine/core/css/CSSFilterValue.h" 35 #include "sky/engine/core/css/CSSFilterValue.h"
37 #include "sky/engine/core/css/CSSFontFaceSrcValue.h" 36 #include "sky/engine/core/css/CSSFontFaceSrcValue.h"
38 #include "sky/engine/core/css/CSSFontFeatureValue.h" 37 #include "sky/engine/core/css/CSSFontFeatureValue.h"
39 #include "sky/engine/core/css/CSSFontValue.h" 38 #include "sky/engine/core/css/CSSFontValue.h"
40 #include "sky/engine/core/css/CSSFunctionValue.h" 39 #include "sky/engine/core/css/CSSFunctionValue.h"
41 #include "sky/engine/core/css/CSSGradientValue.h" 40 #include "sky/engine/core/css/CSSGradientValue.h"
42 #include "sky/engine/core/css/CSSImageSetValue.h" 41 #include "sky/engine/core/css/CSSImageSetValue.h"
43 #include "sky/engine/core/css/CSSImageValue.h" 42 #include "sky/engine/core/css/CSSImageValue.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ASSERT(isCSSOMSafe()); 111 ASSERT(isCSSOMSafe());
113 return toTextCloneCSSValue(this)->cssText() == other.cssText(); 112 return toTextCloneCSSValue(this)->cssText() == other.cssText();
114 } 113 }
115 114
116 if (m_classType == other.m_classType) { 115 if (m_classType == other.m_classType) {
117 switch (m_classType) { 116 switch (m_classType) {
118 case AspectRatioClass: 117 case AspectRatioClass:
119 return compareCSSValues<CSSAspectRatioValue>(*this, other); 118 return compareCSSValues<CSSAspectRatioValue>(*this, other);
120 case BorderImageSliceClass: 119 case BorderImageSliceClass:
121 return compareCSSValues<CSSBorderImageSliceValue>(*this, other); 120 return compareCSSValues<CSSBorderImageSliceValue>(*this, other);
122 case CanvasClass:
123 return compareCSSValues<CSSCanvasValue>(*this, other);
124 case CursorImageClass: 121 case CursorImageClass:
125 return compareCSSValues<CSSCursorImageValue>(*this, other); 122 return compareCSSValues<CSSCursorImageValue>(*this, other);
126 case FontClass: 123 case FontClass:
127 return compareCSSValues<CSSFontValue>(*this, other); 124 return compareCSSValues<CSSFontValue>(*this, other);
128 case FontFaceSrcClass: 125 case FontFaceSrcClass:
129 return compareCSSValues<CSSFontFaceSrcValue>(*this, other); 126 return compareCSSValues<CSSFontFaceSrcValue>(*this, other);
130 case FontFeatureClass: 127 case FontFeatureClass:
131 return compareCSSValues<CSSFontFeatureValue>(*this, other); 128 return compareCSSValues<CSSFontFeatureValue>(*this, other);
132 case FunctionClass: 129 case FunctionClass:
133 return compareCSSValues<CSSFunctionValue>(*this, other); 130 return compareCSSValues<CSSFunctionValue>(*this, other);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 ASSERT(isCSSOMSafe()); 179 ASSERT(isCSSOMSafe());
183 return toTextCloneCSSValue(this)->cssText(); 180 return toTextCloneCSSValue(this)->cssText();
184 } 181 }
185 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); 182 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());
186 183
187 switch (classType()) { 184 switch (classType()) {
188 case AspectRatioClass: 185 case AspectRatioClass:
189 return toCSSAspectRatioValue(this)->customCSSText(); 186 return toCSSAspectRatioValue(this)->customCSSText();
190 case BorderImageSliceClass: 187 case BorderImageSliceClass:
191 return toCSSBorderImageSliceValue(this)->customCSSText(); 188 return toCSSBorderImageSliceValue(this)->customCSSText();
192 case CanvasClass:
193 return toCSSCanvasValue(this)->customCSSText();
194 case CursorImageClass: 189 case CursorImageClass:
195 return toCSSCursorImageValue(this)->customCSSText(); 190 return toCSSCursorImageValue(this)->customCSSText();
196 case FontClass: 191 case FontClass:
197 return toCSSFontValue(this)->customCSSText(); 192 return toCSSFontValue(this)->customCSSText();
198 case FontFaceSrcClass: 193 case FontFaceSrcClass:
199 return toCSSFontFaceSrcValue(this)->customCSSText(); 194 return toCSSFontFaceSrcValue(this)->customCSSText();
200 case FontFeatureClass: 195 case FontFeatureClass:
201 return toCSSFontFeatureValue(this)->customCSSText(); 196 return toCSSFontFeatureValue(this)->customCSSText();
202 case FunctionClass: 197 case FunctionClass:
203 return toCSSFunctionValue(this)->customCSSText(); 198 return toCSSFunctionValue(this)->customCSSText();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 244 }
250 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); 245 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());
251 246
252 switch (classType()) { 247 switch (classType()) {
253 case AspectRatioClass: 248 case AspectRatioClass:
254 delete toCSSAspectRatioValue(this); 249 delete toCSSAspectRatioValue(this);
255 return; 250 return;
256 case BorderImageSliceClass: 251 case BorderImageSliceClass:
257 delete toCSSBorderImageSliceValue(this); 252 delete toCSSBorderImageSliceValue(this);
258 return; 253 return;
259 case CanvasClass:
260 delete toCSSCanvasValue(this);
261 return;
262 case CursorImageClass: 254 case CursorImageClass:
263 delete toCSSCursorImageValue(this); 255 delete toCSSCursorImageValue(this);
264 return; 256 return;
265 case FontClass: 257 case FontClass:
266 delete toCSSFontValue(this); 258 delete toCSSFontValue(this);
267 return; 259 return;
268 case FontFaceSrcClass: 260 case FontFaceSrcClass:
269 delete toCSSFontFaceSrcValue(this); 261 delete toCSSFontFaceSrcValue(this);
270 return; 262 return;
271 case FontFeatureClass: 263 case FontFeatureClass:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 return toCSSTransformValue(this)->cloneForCSSOM(); 337 return toCSSTransformValue(this)->cloneForCSSOM();
346 case ImageSetClass: 338 case ImageSetClass:
347 return toCSSImageSetValue(this)->cloneForCSSOM(); 339 return toCSSImageSetValue(this)->cloneForCSSOM();
348 default: 340 default:
349 ASSERT(!isSubtypeExposedToCSSOM()); 341 ASSERT(!isSubtypeExposedToCSSOM());
350 return TextCloneCSSValue::create(classType(), cssText()); 342 return TextCloneCSSValue::create(classType(), cssText());
351 } 343 }
352 } 344 }
353 345
354 } 346 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSValue.h ('k') | sky/engine/core/css/parser/BisonCSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698