| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return CSS_INHERIT; | 93 return CSS_INHERIT; |
| 94 if (isPrimitiveValue()) | 94 if (isPrimitiveValue()) |
| 95 return CSS_PRIMITIVE_VALUE; | 95 return CSS_PRIMITIVE_VALUE; |
| 96 if (isValueList()) | 96 if (isValueList()) |
| 97 return CSS_VALUE_LIST; | 97 return CSS_VALUE_LIST; |
| 98 if (isInitialValue()) | 98 if (isInitialValue()) |
| 99 return CSS_INITIAL; | 99 return CSS_INITIAL; |
| 100 return CSS_CUSTOM; | 100 return CSS_CUSTOM; |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool CSSValue::hasFailedOrCanceledSubresources() const | |
| 104 { | |
| 105 // This should get called for internal instances only. | |
| 106 ASSERT(!isCSSOMSafe()); | |
| 107 | |
| 108 if (isValueList()) | |
| 109 return toCSSValueList(this)->hasFailedOrCanceledSubresources(); | |
| 110 if (classType() == FontFaceSrcClass) | |
| 111 return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources(); | |
| 112 if (classType() == ImageClass) | |
| 113 return toCSSImageValue(this)->hasFailedOrCanceledSubresources(); | |
| 114 if (classType() == CrossfadeClass) | |
| 115 return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources(); | |
| 116 if (classType() == ImageSetClass) | |
| 117 return toCSSImageSetValue(this)->hasFailedOrCanceledSubresources(); | |
| 118 | |
| 119 return false; | |
| 120 } | |
| 121 | |
| 122 template<class ChildClassType> | 103 template<class ChildClassType> |
| 123 inline static bool compareCSSValues(const CSSValue& first, const CSSValue& secon
d) | 104 inline static bool compareCSSValues(const CSSValue& first, const CSSValue& secon
d) |
| 124 { | 105 { |
| 125 return static_cast<const ChildClassType&>(first).equals(static_cast<const Ch
ildClassType&>(second)); | 106 return static_cast<const ChildClassType&>(first).equals(static_cast<const Ch
ildClassType&>(second)); |
| 126 } | 107 } |
| 127 | 108 |
| 128 bool CSSValue::equals(const CSSValue& other) const | 109 bool CSSValue::equals(const CSSValue& other) const |
| 129 { | 110 { |
| 130 if (m_isTextClone) { | 111 if (m_isTextClone) { |
| 131 ASSERT(isCSSOMSafe()); | 112 ASSERT(isCSSOMSafe()); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 return toCSSTransformValue(this)->cloneForCSSOM(); | 345 return toCSSTransformValue(this)->cloneForCSSOM(); |
| 365 case ImageSetClass: | 346 case ImageSetClass: |
| 366 return toCSSImageSetValue(this)->cloneForCSSOM(); | 347 return toCSSImageSetValue(this)->cloneForCSSOM(); |
| 367 default: | 348 default: |
| 368 ASSERT(!isSubtypeExposedToCSSOM()); | 349 ASSERT(!isSubtypeExposedToCSSOM()); |
| 369 return TextCloneCSSValue::create(classType(), cssText()); | 350 return TextCloneCSSValue::create(classType(), cssText()); |
| 370 } | 351 } |
| 371 } | 352 } |
| 372 | 353 |
| 373 } | 354 } |
| OLD | NEW |