| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 uint32_t bitfields; | 62 uint32_t bitfields; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_
stay_small); | 65 COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_
stay_small); |
| 66 | 66 |
| 67 bool CSSValue::isImplicitInitialValue() const | 67 bool CSSValue::isImplicitInitialValue() const |
| 68 { | 68 { |
| 69 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit(); | 69 return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 CSSValue::Type CSSValue::cssValueType() const | |
| 73 { | |
| 74 if (isInheritedValue()) | |
| 75 return CSS_INHERIT; | |
| 76 if (isPrimitiveValue()) | |
| 77 return CSS_PRIMITIVE_VALUE; | |
| 78 if (isValueList()) | |
| 79 return CSS_VALUE_LIST; | |
| 80 if (isInitialValue()) | |
| 81 return CSS_INITIAL; | |
| 82 return CSS_CUSTOM; | |
| 83 } | |
| 84 | |
| 85 bool CSSValue::hasFailedOrCanceledSubresources() const | 72 bool CSSValue::hasFailedOrCanceledSubresources() const |
| 86 { | 73 { |
| 87 if (isValueList()) | 74 if (isValueList()) |
| 88 return toCSSValueList(this)->hasFailedOrCanceledSubresources(); | 75 return toCSSValueList(this)->hasFailedOrCanceledSubresources(); |
| 89 if (classType() == FontFaceSrcClass) | 76 if (classType() == FontFaceSrcClass) |
| 90 return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources(); | 77 return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources(); |
| 91 if (classType() == ImageClass) | 78 if (classType() == ImageClass) |
| 92 return toCSSImageValue(this)->hasFailedOrCanceledSubresources(); | 79 return toCSSImageValue(this)->hasFailedOrCanceledSubresources(); |
| 93 if (classType() == CrossfadeClass) | 80 if (classType() == CrossfadeClass) |
| 94 return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources(); | 81 return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources(); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor); | 506 toCSSSVGDocumentValue(this)->traceAfterDispatch(visitor); |
| 520 return; | 507 return; |
| 521 case CSSContentDistributionClass: | 508 case CSSContentDistributionClass: |
| 522 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor); | 509 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor); |
| 523 return; | 510 return; |
| 524 } | 511 } |
| 525 ASSERT_NOT_REACHED(); | 512 ASSERT_NOT_REACHED(); |
| 526 } | 513 } |
| 527 | 514 |
| 528 } | 515 } |
| OLD | NEW |