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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "core/css/CSSReflectValue.h" | 49 #include "core/css/CSSReflectValue.h" |
50 #include "core/css/CSSSVGDocumentValue.h" | 50 #include "core/css/CSSSVGDocumentValue.h" |
51 #include "core/css/CSSShadowValue.h" | 51 #include "core/css/CSSShadowValue.h" |
52 #include "core/css/CSSTimingFunctionValue.h" | 52 #include "core/css/CSSTimingFunctionValue.h" |
53 #include "core/css/CSSUnicodeRangeValue.h" | 53 #include "core/css/CSSUnicodeRangeValue.h" |
54 #include "core/css/CSSUnsetValue.h" | 54 #include "core/css/CSSUnsetValue.h" |
55 #include "core/css/CSSValueList.h" | 55 #include "core/css/CSSValueList.h" |
56 | 56 |
57 namespace blink { | 57 namespace blink { |
58 | 58 |
59 struct SameSizeAsCSSValue : public RefCountedWillBeGarbageCollectedFinalized<Sam
eSizeAsCSSValue> { | 59 struct SameSizeAsCSSValue : public RefCounted<SameSizeAsCSSValue> { |
60 uint32_t bitfields; | 60 uint32_t bitfields; |
61 }; | 61 }; |
62 | 62 |
63 static_assert(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), "CSSValue should s
tay small"); | 63 static_assert(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), "CSSValue should s
tay small"); |
64 | 64 |
65 bool CSSValue::isImplicitInitialValue() const | 65 bool CSSValue::isImplicitInitialValue() const |
66 { | 66 { |
67 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit(); | 67 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit(); |
68 } | 68 } |
69 | 69 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 case CSSSVGDocumentClass: | 395 case CSSSVGDocumentClass: |
396 toCSSSVGDocumentValue(this)->~CSSSVGDocumentValue(); | 396 toCSSSVGDocumentValue(this)->~CSSSVGDocumentValue(); |
397 return; | 397 return; |
398 case CSSContentDistributionClass: | 398 case CSSContentDistributionClass: |
399 toCSSContentDistributionValue(this)->~CSSContentDistributionValue(); | 399 toCSSContentDistributionValue(this)->~CSSContentDistributionValue(); |
400 return; | 400 return; |
401 } | 401 } |
402 ASSERT_NOT_REACHED(); | 402 ASSERT_NOT_REACHED(); |
403 } | 403 } |
404 | 404 |
405 DEFINE_TRACE(CSSValue) | |
406 { | |
407 switch (classType()) { | |
408 case BorderImageSliceClass: | |
409 toCSSBorderImageSliceValue(this)->traceAfterDispatch(visitor); | |
410 return; | |
411 case CanvasClass: | |
412 toCSSCanvasValue(this)->traceAfterDispatch(visitor); | |
413 return; | |
414 case CounterClass: | |
415 toCSSCounterValue(this)->traceAfterDispatch(visitor); | |
416 return; | |
417 case CursorImageClass: | |
418 toCSSCursorImageValue(this)->traceAfterDispatch(visitor); | |
419 return; | |
420 case FontFaceSrcClass: | |
421 toCSSFontFaceSrcValue(this)->traceAfterDispatch(visitor); | |
422 return; | |
423 case FontFeatureClass: | |
424 toCSSFontFeatureValue(this)->traceAfterDispatch(visitor); | |
425 return; | |
426 case FunctionClass: | |
427 toCSSFunctionValue(this)->traceAfterDispatch(visitor); | |
428 return; | |
429 case LinearGradientClass: | |
430 toCSSLinearGradientValue(this)->traceAfterDispatch(visitor); | |
431 return; | |
432 case RadialGradientClass: | |
433 toCSSRadialGradientValue(this)->traceAfterDispatch(visitor); | |
434 return; | |
435 case CrossfadeClass: | |
436 toCSSCrossfadeValue(this)->traceAfterDispatch(visitor); | |
437 return; | |
438 case ImageClass: | |
439 toCSSImageValue(this)->traceAfterDispatch(visitor); | |
440 return; | |
441 case InheritedClass: | |
442 toCSSInheritedValue(this)->traceAfterDispatch(visitor); | |
443 return; | |
444 case InitialClass: | |
445 toCSSInitialValue(this)->traceAfterDispatch(visitor); | |
446 return; | |
447 case UnsetClass: | |
448 toCSSUnsetValue(this)->traceAfterDispatch(visitor); | |
449 return; | |
450 case GridLineNamesClass: | |
451 toCSSGridLineNamesValue(this)->traceAfterDispatch(visitor); | |
452 return; | |
453 case GridTemplateAreasClass: | |
454 toCSSGridTemplateAreasValue(this)->traceAfterDispatch(visitor); | |
455 return; | |
456 case PathClass: | |
457 toCSSPathValue(this)->traceAfterDispatch(visitor); | |
458 return; | |
459 case PrimitiveClass: | |
460 toCSSPrimitiveValue(this)->traceAfterDispatch(visitor); | |
461 return; | |
462 case ReflectClass: | |
463 toCSSReflectValue(this)->traceAfterDispatch(visitor); | |
464 return; | |
465 case ShadowClass: | |
466 toCSSShadowValue(this)->traceAfterDispatch(visitor); | |
467 return; | |
468 case CubicBezierTimingFunctionClass: | |
469 toCSSCubicBezierTimingFunctionValue(this)->traceAfterDispatch(visitor); | |
470 return; | |
471 case StepsTimingFunctionClass: | |
472 toCSSStepsTimingFunctionValue(this)->traceAfterDispatch(visitor); | |
473 return; | |
474 case UnicodeRangeClass: | |
475 toCSSUnicodeRangeValue(this)->traceAfterDispatch(visitor); | |
476 return; | |
477 case ValueListClass: | |
478 toCSSValueList(this)->traceAfterDispatch(visitor); | |
479 return; | |
480 case LineBoxContainClass: | |
481 toCSSLineBoxContainValue(this)->traceAfterDispatch(visitor); | |
482 return; | |
483 case ImageSetClass: | |
484 toCSSImageSetValue(this)->traceAfterDispatch(visitor); | |
485 return; | |
486 case CSSSVGDocumentClass: | |
487 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor); | |
488 return; | |
489 case CSSContentDistributionClass: | |
490 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor); | |
491 return; | |
492 } | |
493 ASSERT_NOT_REACHED(); | |
494 } | |
495 | |
496 } | 405 } |
OLD | NEW |