OLD | NEW |
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 { | 401 { |
402 if (m_isTextClone) { | 402 if (m_isTextClone) { |
403 ASSERT(isCSSOMSafe()); | 403 ASSERT(isCSSOMSafe()); |
404 static_cast<TextCloneCSSValue*>(this)->~TextCloneCSSValue(); | 404 static_cast<TextCloneCSSValue*>(this)->~TextCloneCSSValue(); |
405 return; | 405 return; |
406 } | 406 } |
407 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); | 407 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); |
408 | 408 |
409 switch (classType()) { | 409 switch (classType()) { |
410 case AspectRatioClass: | 410 case AspectRatioClass: |
411 static_cast<CSSAspectRatioValue*>(this)->~CSSAspectRatioValue(); | 411 toCSSAspectRatioValue(this)->~CSSAspectRatioValue(); |
412 return; | 412 return; |
413 case BorderImageSliceClass: | 413 case BorderImageSliceClass: |
414 static_cast<CSSBorderImageSliceValue*>(this)->~CSSBorderImageSliceValue(
); | 414 toCSSBorderImageSliceValue(this)->~CSSBorderImageSliceValue(); |
415 return; | 415 return; |
416 case CanvasClass: | 416 case CanvasClass: |
417 static_cast<CSSCanvasValue*>(this)->~CSSCanvasValue(); | 417 toCSSCanvasValue(this)->~CSSCanvasValue(); |
418 return; | 418 return; |
419 case CursorImageClass: | 419 case CursorImageClass: |
420 static_cast<CSSCursorImageValue*>(this)->~CSSCursorImageValue(); | 420 toCSSCursorImageValue(this)->~CSSCursorImageValue(); |
421 return; | 421 return; |
422 case FontClass: | 422 case FontClass: |
423 static_cast<CSSFontValue*>(this)->~CSSFontValue(); | 423 toCSSFontValue(this)->~CSSFontValue(); |
424 return; | 424 return; |
425 case FontFaceSrcClass: | 425 case FontFaceSrcClass: |
426 static_cast<CSSFontFaceSrcValue*>(this)->~CSSFontFaceSrcValue(); | 426 toCSSFontFaceSrcValue(this)->~CSSFontFaceSrcValue(); |
427 return; | 427 return; |
428 case FontFeatureClass: | 428 case FontFeatureClass: |
429 static_cast<CSSFontFeatureValue*>(this)->~CSSFontFeatureValue(); | 429 toCSSFontFeatureValue(this)->~CSSFontFeatureValue(); |
430 return; | 430 return; |
431 case FunctionClass: | 431 case FunctionClass: |
432 static_cast<CSSFunctionValue*>(this)->~CSSFunctionValue(); | 432 toCSSFunctionValue(this)->~CSSFunctionValue(); |
433 return; | 433 return; |
434 case LinearGradientClass: | 434 case LinearGradientClass: |
435 static_cast<CSSLinearGradientValue*>(this)->~CSSLinearGradientValue(); | 435 toCSSLinearGradientValue(this)->~CSSLinearGradientValue(); |
436 return; | 436 return; |
437 case RadialGradientClass: | 437 case RadialGradientClass: |
438 static_cast<CSSRadialGradientValue*>(this)->~CSSRadialGradientValue(); | 438 toCSSRadialGradientValue(this)->~CSSRadialGradientValue(); |
439 return; | 439 return; |
440 case CrossfadeClass: | 440 case CrossfadeClass: |
441 static_cast<CSSCrossfadeValue*>(this)->~CSSCrossfadeValue(); | 441 toCSSCrossfadeValue(this)->~CSSCrossfadeValue(); |
442 return; | 442 return; |
443 case ImageClass: | 443 case ImageClass: |
444 static_cast<CSSImageValue*>(this)->~CSSImageValue(); | 444 toCSSImageValue(this)->~CSSImageValue(); |
445 return; | 445 return; |
446 case InheritedClass: | 446 case InheritedClass: |
447 static_cast<CSSInheritedValue*>(this)->~CSSInheritedValue(); | 447 toCSSInheritedValue(this)->~CSSInheritedValue(); |
448 return; | 448 return; |
449 case InitialClass: | 449 case InitialClass: |
450 static_cast<CSSInitialValue*>(this)->~CSSInitialValue(); | 450 toCSSInitialValue(this)->~CSSInitialValue(); |
451 return; | 451 return; |
452 case GridLineNamesClass: | 452 case GridLineNamesClass: |
453 static_cast<CSSGridLineNamesValue*>(this)->~CSSGridLineNamesValue(); | 453 toCSSGridLineNamesValue(this)->~CSSGridLineNamesValue(); |
454 return; | 454 return; |
455 case GridTemplateAreasClass: | 455 case GridTemplateAreasClass: |
456 static_cast<CSSGridTemplateAreasValue*>(this)->~CSSGridTemplateAreasValu
e(); | 456 toCSSGridTemplateAreasValue(this)->~CSSGridTemplateAreasValue(); |
457 return; | 457 return; |
458 case PrimitiveClass: | 458 case PrimitiveClass: |
459 static_cast<CSSPrimitiveValue*>(this)->~CSSPrimitiveValue(); | 459 toCSSPrimitiveValue(this)->~CSSPrimitiveValue(); |
460 return; | 460 return; |
461 case ReflectClass: | 461 case ReflectClass: |
462 static_cast<CSSReflectValue*>(this)->~CSSReflectValue(); | 462 toCSSReflectValue(this)->~CSSReflectValue(); |
463 return; | 463 return; |
464 case ShadowClass: | 464 case ShadowClass: |
465 static_cast<CSSShadowValue*>(this)->~CSSShadowValue(); | 465 toCSSShadowValue(this)->~CSSShadowValue(); |
466 return; | 466 return; |
467 case CubicBezierTimingFunctionClass: | 467 case CubicBezierTimingFunctionClass: |
468 static_cast<CSSCubicBezierTimingFunctionValue*>(this)->~CSSCubicBezierTi
mingFunctionValue(); | 468 toCSSCubicBezierTimingFunctionValue(this)->~CSSCubicBezierTimingFunction
Value(); |
469 return; | 469 return; |
470 case StepsTimingFunctionClass: | 470 case StepsTimingFunctionClass: |
471 static_cast<CSSStepsTimingFunctionValue*>(this)->~CSSStepsTimingFunction
Value(); | 471 toCSSStepsTimingFunctionValue(this)->~CSSStepsTimingFunctionValue(); |
472 return; | 472 return; |
473 case UnicodeRangeClass: | 473 case UnicodeRangeClass: |
474 static_cast<CSSUnicodeRangeValue*>(this)->~CSSUnicodeRangeValue(); | 474 toCSSUnicodeRangeValue(this)->~CSSUnicodeRangeValue(); |
475 return; | 475 return; |
476 case ValueListClass: | 476 case ValueListClass: |
477 static_cast<CSSValueList*>(this)->~CSSValueList(); | 477 toCSSValueList(this)->~CSSValueList(); |
478 return; | 478 return; |
479 case CSSTransformClass: | 479 case CSSTransformClass: |
480 static_cast<CSSTransformValue*>(this)->~CSSTransformValue(); | 480 toCSSTransformValue(this)->~CSSTransformValue(); |
481 return; | 481 return; |
482 case LineBoxContainClass: | 482 case LineBoxContainClass: |
483 static_cast<CSSLineBoxContainValue*>(this)->~CSSLineBoxContainValue(); | 483 toCSSLineBoxContainValue(this)->~CSSLineBoxContainValue(); |
484 return; | 484 return; |
485 case CalculationClass: | 485 case CalculationClass: |
486 static_cast<CSSCalcValue*>(this)->~CSSCalcValue(); | 486 toCSSCalcValue(this)->~CSSCalcValue(); |
487 return; | 487 return; |
488 case ImageSetClass: | 488 case ImageSetClass: |
489 static_cast<CSSImageSetValue*>(this)->~CSSImageSetValue(); | 489 toCSSImageSetValue(this)->~CSSImageSetValue(); |
490 return; | 490 return; |
491 case CSSFilterClass: | 491 case CSSFilterClass: |
492 static_cast<CSSFilterValue*>(this)->~CSSFilterValue(); | 492 toCSSFilterValue(this)->~CSSFilterValue(); |
493 return; | 493 return; |
494 case CSSArrayFunctionValueClass: | 494 case CSSArrayFunctionValueClass: |
495 static_cast<CSSArrayFunctionValue*>(this)->~CSSArrayFunctionValue(); | 495 toCSSArrayFunctionValue(this)->~CSSArrayFunctionValue(); |
496 return; | 496 return; |
497 case SVGPaintClass: | 497 case SVGPaintClass: |
498 static_cast<SVGPaint*>(this)->~SVGPaint(); | 498 toSVGPaint(this)->~SVGPaint(); |
499 return; | 499 return; |
500 case CSSSVGDocumentClass: | 500 case CSSSVGDocumentClass: |
501 static_cast<CSSSVGDocumentValue*>(this)->~CSSSVGDocumentValue(); | 501 toCSSSVGDocumentValue(this)->~CSSSVGDocumentValue(); |
502 return; | 502 return; |
503 } | 503 } |
504 ASSERT_NOT_REACHED(); | 504 ASSERT_NOT_REACHED(); |
505 } | 505 } |
506 | 506 |
507 void CSSValue::trace(Visitor* visitor) | 507 void CSSValue::trace(Visitor* visitor) |
508 { | 508 { |
509 if (m_isTextClone) { | 509 if (m_isTextClone) { |
510 ASSERT(isCSSOMSafe()); | 510 ASSERT(isCSSOMSafe()); |
511 static_cast<TextCloneCSSValue*>(this)->traceAfterDispatch(visitor); | 511 static_cast<TextCloneCSSValue*>(this)->traceAfterDispatch(visitor); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 return toCSSImageSetValue(this)->cloneForCSSOM(); | 631 return toCSSImageSetValue(this)->cloneForCSSOM(); |
632 case SVGPaintClass: | 632 case SVGPaintClass: |
633 return toSVGPaint(this)->cloneForCSSOM(); | 633 return toSVGPaint(this)->cloneForCSSOM(); |
634 default: | 634 default: |
635 ASSERT(!isSubtypeExposedToCSSOM()); | 635 ASSERT(!isSubtypeExposedToCSSOM()); |
636 return TextCloneCSSValue::create(classType(), cssText()); | 636 return TextCloneCSSValue::create(classType(), cssText()); |
637 } | 637 } |
638 } | 638 } |
639 | 639 |
640 } | 640 } |
OLD | NEW |