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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); |
512 return; | 512 return; |
513 } | 513 } |
514 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); | 514 ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM()); |
515 | 515 |
516 switch (classType()) { | 516 switch (classType()) { |
517 case AspectRatioClass: | 517 case AspectRatioClass: |
518 static_cast<CSSAspectRatioValue*>(this)->traceAfterDispatch(visitor); | 518 toCSSAspectRatioValue(this)->traceAfterDispatch(visitor); |
519 return; | 519 return; |
520 case BorderImageSliceClass: | 520 case BorderImageSliceClass: |
521 static_cast<CSSBorderImageSliceValue*>(this)->traceAfterDispatch(visitor
); | 521 toCSSBorderImageSliceValue(this)->traceAfterDispatch(visitor); |
522 return; | 522 return; |
523 case CanvasClass: | 523 case CanvasClass: |
524 static_cast<CSSCanvasValue*>(this)->traceAfterDispatch(visitor); | 524 toCSSCanvasValue(this)->traceAfterDispatch(visitor); |
525 return; | 525 return; |
526 case CursorImageClass: | 526 case CursorImageClass: |
527 static_cast<CSSCursorImageValue*>(this)->traceAfterDispatch(visitor); | 527 toCSSCursorImageValue(this)->traceAfterDispatch(visitor); |
528 return; | 528 return; |
529 case FontClass: | 529 case FontClass: |
530 static_cast<CSSFontValue*>(this)->traceAfterDispatch(visitor); | 530 toCSSFontValue(this)->traceAfterDispatch(visitor); |
531 return; | 531 return; |
532 case FontFaceSrcClass: | 532 case FontFaceSrcClass: |
533 static_cast<CSSFontFaceSrcValue*>(this)->traceAfterDispatch(visitor); | 533 toCSSFontFaceSrcValue(this)->traceAfterDispatch(visitor); |
534 return; | 534 return; |
535 case FontFeatureClass: | 535 case FontFeatureClass: |
536 static_cast<CSSFontFeatureValue*>(this)->traceAfterDispatch(visitor); | 536 toCSSFontFeatureValue(this)->traceAfterDispatch(visitor); |
537 return; | 537 return; |
538 case FunctionClass: | 538 case FunctionClass: |
539 static_cast<CSSFunctionValue*>(this)->traceAfterDispatch(visitor); | 539 toCSSFunctionValue(this)->traceAfterDispatch(visitor); |
540 return; | 540 return; |
541 case LinearGradientClass: | 541 case LinearGradientClass: |
542 static_cast<CSSLinearGradientValue*>(this)->traceAfterDispatch(visitor); | 542 toCSSLinearGradientValue(this)->traceAfterDispatch(visitor); |
543 return; | 543 return; |
544 case RadialGradientClass: | 544 case RadialGradientClass: |
545 static_cast<CSSRadialGradientValue*>(this)->traceAfterDispatch(visitor); | 545 toCSSRadialGradientValue(this)->traceAfterDispatch(visitor); |
546 return; | 546 return; |
547 case CrossfadeClass: | 547 case CrossfadeClass: |
548 static_cast<CSSCrossfadeValue*>(this)->traceAfterDispatch(visitor); | 548 toCSSCrossfadeValue(this)->traceAfterDispatch(visitor); |
549 return; | 549 return; |
550 case ImageClass: | 550 case ImageClass: |
551 static_cast<CSSImageValue*>(this)->traceAfterDispatch(visitor); | 551 toCSSImageValue(this)->traceAfterDispatch(visitor); |
552 return; | 552 return; |
553 case InheritedClass: | 553 case InheritedClass: |
554 static_cast<CSSInheritedValue*>(this)->traceAfterDispatch(visitor); | 554 toCSSInheritedValue(this)->traceAfterDispatch(visitor); |
555 return; | 555 return; |
556 case InitialClass: | 556 case InitialClass: |
557 static_cast<CSSInitialValue*>(this)->traceAfterDispatch(visitor); | 557 toCSSInitialValue(this)->traceAfterDispatch(visitor); |
558 return; | 558 return; |
559 case GridLineNamesClass: | 559 case GridLineNamesClass: |
560 static_cast<CSSGridLineNamesValue*>(this)->traceAfterDispatch(visitor); | 560 toCSSGridLineNamesValue(this)->traceAfterDispatch(visitor); |
561 return; | 561 return; |
562 case GridTemplateAreasClass: | 562 case GridTemplateAreasClass: |
563 static_cast<CSSGridTemplateAreasValue*>(this)->traceAfterDispatch(visito
r); | 563 toCSSGridTemplateAreasValue(this)->traceAfterDispatch(visitor); |
564 return; | 564 return; |
565 case PrimitiveClass: | 565 case PrimitiveClass: |
566 static_cast<CSSPrimitiveValue*>(this)->traceAfterDispatch(visitor); | 566 toCSSPrimitiveValue(this)->traceAfterDispatch(visitor); |
567 return; | 567 return; |
568 case ReflectClass: | 568 case ReflectClass: |
569 static_cast<CSSReflectValue*>(this)->traceAfterDispatch(visitor); | 569 toCSSReflectValue(this)->traceAfterDispatch(visitor); |
570 return; | 570 return; |
571 case ShadowClass: | 571 case ShadowClass: |
572 static_cast<CSSShadowValue*>(this)->traceAfterDispatch(visitor); | 572 toCSSShadowValue(this)->traceAfterDispatch(visitor); |
573 return; | 573 return; |
574 case CubicBezierTimingFunctionClass: | 574 case CubicBezierTimingFunctionClass: |
575 static_cast<CSSCubicBezierTimingFunctionValue*>(this)->traceAfterDispatc
h(visitor); | 575 toCSSCubicBezierTimingFunctionValue(this)->traceAfterDispatch(visitor); |
576 return; | 576 return; |
577 case StepsTimingFunctionClass: | 577 case StepsTimingFunctionClass: |
578 static_cast<CSSStepsTimingFunctionValue*>(this)->traceAfterDispatch(visi
tor); | 578 toCSSStepsTimingFunctionValue(this)->traceAfterDispatch(visitor); |
579 return; | 579 return; |
580 case UnicodeRangeClass: | 580 case UnicodeRangeClass: |
581 static_cast<CSSUnicodeRangeValue*>(this)->traceAfterDispatch(visitor); | 581 toCSSUnicodeRangeValue(this)->traceAfterDispatch(visitor); |
582 return; | 582 return; |
583 case ValueListClass: | 583 case ValueListClass: |
584 static_cast<CSSValueList*>(this)->traceAfterDispatch(visitor); | 584 toCSSValueList(this)->traceAfterDispatch(visitor); |
585 return; | 585 return; |
586 case CSSTransformClass: | 586 case CSSTransformClass: |
587 static_cast<CSSTransformValue*>(this)->traceAfterDispatch(visitor); | 587 toCSSTransformValue(this)->traceAfterDispatch(visitor); |
588 return; | 588 return; |
589 case LineBoxContainClass: | 589 case LineBoxContainClass: |
590 static_cast<CSSLineBoxContainValue*>(this)->traceAfterDispatch(visitor); | 590 toCSSLineBoxContainValue(this)->traceAfterDispatch(visitor); |
591 return; | 591 return; |
592 case CalculationClass: | 592 case CalculationClass: |
593 static_cast<CSSCalcValue*>(this)->traceAfterDispatch(visitor); | 593 toCSSCalcValue(this)->traceAfterDispatch(visitor); |
594 return; | 594 return; |
595 case ImageSetClass: | 595 case ImageSetClass: |
596 static_cast<CSSImageSetValue*>(this)->traceAfterDispatch(visitor); | 596 toCSSImageSetValue(this)->traceAfterDispatch(visitor); |
597 return; | 597 return; |
598 case CSSFilterClass: | 598 case CSSFilterClass: |
599 static_cast<CSSFilterValue*>(this)->traceAfterDispatch(visitor); | 599 toCSSFilterValue(this)->traceAfterDispatch(visitor); |
600 return; | 600 return; |
601 case CSSArrayFunctionValueClass: | 601 case CSSArrayFunctionValueClass: |
602 static_cast<CSSArrayFunctionValue*>(this)->traceAfterDispatch(visitor); | 602 toCSSArrayFunctionValue(this)->traceAfterDispatch(visitor); |
603 return; | 603 return; |
604 case SVGPaintClass: | 604 case SVGPaintClass: |
605 static_cast<SVGPaint*>(this)->traceAfterDispatch(visitor); | 605 toSVGPaint(this)->traceAfterDispatch(visitor); |
606 return; | 606 return; |
607 case CSSSVGDocumentClass: | 607 case CSSSVGDocumentClass: |
608 static_cast<CSSSVGDocumentValue*>(this)->traceAfterDispatch(visitor); | 608 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor); |
609 return; | 609 return; |
610 } | 610 } |
611 ASSERT_NOT_REACHED(); | 611 ASSERT_NOT_REACHED(); |
612 } | 612 } |
613 | 613 |
614 PassRefPtrWillBeRawPtr<CSSValue> CSSValue::cloneForCSSOM() const | 614 PassRefPtrWillBeRawPtr<CSSValue> CSSValue::cloneForCSSOM() const |
615 { | 615 { |
616 switch (classType()) { | 616 switch (classType()) { |
617 case PrimitiveClass: | 617 case PrimitiveClass: |
618 return toCSSPrimitiveValue(this)->cloneForCSSOM(); | 618 return toCSSPrimitiveValue(this)->cloneForCSSOM(); |
(...skipping 12 matching lines...) Expand all 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 |