| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 bool isFunctionValue() const { return m_classType == FunctionClass; } | 82 bool isFunctionValue() const { return m_classType == FunctionClass; } |
| 83 bool isImageGeneratorValue() const { return m_classType >= LinearGradientCla
ss && m_classType <= RadialGradientClass; } | 83 bool isImageGeneratorValue() const { return m_classType >= LinearGradientCla
ss && m_classType <= RadialGradientClass; } |
| 84 bool isGradientValue() const { return m_classType >= LinearGradientClass &&
m_classType <= RadialGradientClass; } | 84 bool isGradientValue() const { return m_classType >= LinearGradientClass &&
m_classType <= RadialGradientClass; } |
| 85 bool isImplicitInitialValue() const; | 85 bool isImplicitInitialValue() const; |
| 86 bool isInheritedValue() const { return m_classType == InheritedClass; } | 86 bool isInheritedValue() const { return m_classType == InheritedClass; } |
| 87 bool isInitialValue() const { return m_classType == InitialClass; } | 87 bool isInitialValue() const { return m_classType == InitialClass; } |
| 88 bool isLinearGradientValue() const { return m_classType == LinearGradientCla
ss; } | 88 bool isLinearGradientValue() const { return m_classType == LinearGradientCla
ss; } |
| 89 bool isRadialGradientValue() const { return m_classType == RadialGradientCla
ss; } | 89 bool isRadialGradientValue() const { return m_classType == RadialGradientCla
ss; } |
| 90 bool isShadowValue() const { return m_classType == ShadowClass; } | 90 bool isShadowValue() const { return m_classType == ShadowClass; } |
| 91 bool isTextCloneCSSValue() const { return m_isTextClone; } | 91 bool isTextCloneCSSValue() const { return m_isTextClone; } |
| 92 bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicB
ezierTimingFunctionClass; } | |
| 93 bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingF
unctionClass; } | |
| 94 bool isTransformValue() const { return m_classType == CSSTransformClass; } | 92 bool isTransformValue() const { return m_classType == CSSTransformClass; } |
| 95 bool isLineBoxContainValue() const { return m_classType == LineBoxContainCla
ss; } | 93 bool isLineBoxContainValue() const { return m_classType == LineBoxContainCla
ss; } |
| 96 bool isCalcValue() const {return m_classType == CalculationClass; } | 94 bool isCalcValue() const {return m_classType == CalculationClass; } |
| 97 bool isFilterValue() const { return m_classType == CSSFilterClass; } | 95 bool isFilterValue() const { return m_classType == CSSFilterClass; } |
| 98 bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass;
} | 96 bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass;
} |
| 99 | 97 |
| 100 bool isCSSOMSafe() const { return m_isCSSOMSafe; } | 98 bool isCSSOMSafe() const { return m_isCSSOMSafe; } |
| 101 bool isSubtypeExposedToCSSOM() const | 99 bool isSubtypeExposedToCSSOM() const |
| 102 { | 100 { |
| 103 return isPrimitiveValue() || isValueList(); | 101 return isPrimitiveValue() || isValueList(); |
| 104 } | 102 } |
| 105 | 103 |
| 106 PassRefPtr<CSSValue> cloneForCSSOM() const; | 104 PassRefPtr<CSSValue> cloneForCSSOM() const; |
| 107 | 105 |
| 108 bool equals(const CSSValue&) const; | 106 bool equals(const CSSValue&) const; |
| 109 | 107 |
| 110 protected: | 108 protected: |
| 111 | 109 |
| 112 static const size_t ClassTypeBits = 6; | 110 static const size_t ClassTypeBits = 6; |
| 113 enum ClassType { | 111 enum ClassType { |
| 114 PrimitiveClass, | 112 PrimitiveClass, |
| 115 | 113 |
| 116 // Image generator classes. | 114 // Image generator classes. |
| 117 LinearGradientClass, | 115 LinearGradientClass, |
| 118 RadialGradientClass, | 116 RadialGradientClass, |
| 119 | 117 |
| 120 // Timing function classes. | |
| 121 CubicBezierTimingFunctionClass, | |
| 122 StepsTimingFunctionClass, | |
| 123 | |
| 124 // Other class types. | 118 // Other class types. |
| 125 AspectRatioClass, | 119 AspectRatioClass, |
| 126 BorderImageSliceClass, | 120 BorderImageSliceClass, |
| 127 FontFeatureClass, | 121 FontFeatureClass, |
| 128 FontClass, | 122 FontClass, |
| 129 FunctionClass, | 123 FunctionClass, |
| 130 | 124 |
| 131 InheritedClass, | 125 InheritedClass, |
| 132 InitialClass, | 126 InitialClass, |
| 133 | 127 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 210 { |
| 217 return first ? second && first->equals(*second) : !second; | 211 return first ? second && first->equals(*second) : !second; |
| 218 } | 212 } |
| 219 | 213 |
| 220 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ | 214 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 221 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) | 215 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) |
| 222 | 216 |
| 223 } // namespace blink | 217 } // namespace blink |
| 224 | 218 |
| 225 #endif // SKY_ENGINE_CORE_CSS_CSSVALUE_H_ | 219 #endif // SKY_ENGINE_CORE_CSS_CSSVALUE_H_ |
| OLD | NEW |