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

Side by Side Diff: Source/core/css/CSSValue.cpp

Issue 24020008: Introduce CSS_VALUE_TYPE_CASTS macro to cast CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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) 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 case InitialClass: 381 case InitialClass:
382 delete static_cast<CSSInitialValue*>(this); 382 delete static_cast<CSSInitialValue*>(this);
383 return; 383 return;
384 case GridTemplateClass: 384 case GridTemplateClass:
385 delete static_cast<CSSGridTemplateValue*>(this); 385 delete static_cast<CSSGridTemplateValue*>(this);
386 return; 386 return;
387 case PrimitiveClass: 387 case PrimitiveClass:
388 delete toCSSPrimitiveValue(this); 388 delete toCSSPrimitiveValue(this);
389 return; 389 return;
390 case ReflectClass: 390 case ReflectClass:
391 delete static_cast<CSSReflectValue*>(this); 391 delete toCSSReflectValue(this);
392 return; 392 return;
393 case ShadowClass: 393 case ShadowClass:
394 delete static_cast<ShadowValue*>(this); 394 delete static_cast<ShadowValue*>(this);
395 return; 395 return;
396 case CubicBezierTimingFunctionClass: 396 case CubicBezierTimingFunctionClass:
397 delete static_cast<CSSCubicBezierTimingFunctionValue*>(this); 397 delete static_cast<CSSCubicBezierTimingFunctionValue*>(this);
398 return; 398 return;
399 case StepsTimingFunctionClass: 399 case StepsTimingFunctionClass:
400 delete static_cast<CSSStepsTimingFunctionValue*>(this); 400 delete static_cast<CSSStepsTimingFunctionValue*>(this);
401 return; 401 return;
402 case UnicodeRangeClass: 402 case UnicodeRangeClass:
403 delete static_cast<CSSUnicodeRangeValue*>(this); 403 delete static_cast<CSSUnicodeRangeValue*>(this);
404 return; 404 return;
405 case ValueListClass: 405 case ValueListClass:
406 delete toCSSValueList(this); 406 delete toCSSValueList(this);
407 return; 407 return;
408 case CSSTransformClass: 408 case CSSTransformClass:
409 delete static_cast<CSSTransformValue*>(this); 409 delete static_cast<CSSTransformValue*>(this);
410 return; 410 return;
411 case LineBoxContainClass: 411 case LineBoxContainClass:
412 delete static_cast<CSSLineBoxContainValue*>(this); 412 delete static_cast<CSSLineBoxContainValue*>(this);
413 return; 413 return;
414 case CalculationClass: 414 case CalculationClass:
415 delete static_cast<CSSCalcValue*>(this); 415 delete static_cast<CSSCalcValue*>(this);
416 return; 416 return;
417 case ImageSetClass: 417 case ImageSetClass:
418 delete static_cast<CSSImageSetValue*>(this); 418 delete toCSSImageSetValue(this);
419 return; 419 return;
420 case CSSFilterClass: 420 case CSSFilterClass:
421 delete static_cast<CSSFilterValue*>(this); 421 delete static_cast<CSSFilterValue*>(this);
422 return; 422 return;
423 case CSSArrayFunctionValueClass: 423 case CSSArrayFunctionValueClass:
424 delete static_cast<CSSArrayFunctionValue*>(this); 424 delete static_cast<CSSArrayFunctionValue*>(this);
425 return; 425 return;
426 case CSSMixFunctionValueClass: 426 case CSSMixFunctionValueClass:
427 delete static_cast<CSSMixFunctionValue*>(this); 427 delete static_cast<CSSMixFunctionValue*>(this);
428 return; 428 return;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 return static_cast<const SVGColor*>(this)->cloneForCSSOM(); 469 return static_cast<const SVGColor*>(this)->cloneForCSSOM();
470 case SVGPaintClass: 470 case SVGPaintClass:
471 return static_cast<const SVGPaint*>(this)->cloneForCSSOM(); 471 return static_cast<const SVGPaint*>(this)->cloneForCSSOM();
472 default: 472 default:
473 ASSERT(!isSubtypeExposedToCSSOM()); 473 ASSERT(!isSubtypeExposedToCSSOM());
474 return TextCloneCSSValue::create(classType(), cssText()); 474 return TextCloneCSSValue::create(classType(), cssText());
475 } 475 }
476 } 476 }
477 477
478 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698