| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 String cssText() const; | 70 String cssText() const; |
| 71 void setCSSText(const String&, ExceptionState&) { } // FIXME: Not implemente
d. | 71 void setCSSText(const String&, ExceptionState&) { } // FIXME: Not implemente
d. |
| 72 | 72 |
| 73 bool isPrimitiveValue() const { return m_classType == PrimitiveClass; } | 73 bool isPrimitiveValue() const { return m_classType == PrimitiveClass; } |
| 74 bool isValueList() const { return m_classType >= ValueListClass; } | 74 bool isValueList() const { return m_classType >= ValueListClass; } |
| 75 | 75 |
| 76 bool isBaseValueList() const { return m_classType == ValueListClass; } | 76 bool isBaseValueList() const { return m_classType == ValueListClass; } |
| 77 | 77 |
| 78 bool isAspectRatioValue() const { return m_classType == AspectRatioClass; } | 78 bool isAspectRatioValue() const { return m_classType == AspectRatioClass; } |
| 79 bool isBorderImageSliceValue() const { return m_classType == BorderImageSlic
eClass; } | 79 bool isBorderImageSliceValue() const { return m_classType == BorderImageSlic
eClass; } |
| 80 bool isCrossfadeValue() const { return m_classType == CrossfadeClass; } | |
| 81 bool isFontFeatureValue() const { return m_classType == FontFeatureClass; } | 80 bool isFontFeatureValue() const { return m_classType == FontFeatureClass; } |
| 82 bool isFontValue() const { return m_classType == FontClass; } | 81 bool isFontValue() const { return m_classType == FontClass; } |
| 83 bool isFontFaceSrcValue() const { return m_classType == FontFaceSrcClass; } | 82 bool isFontFaceSrcValue() const { return m_classType == FontFaceSrcClass; } |
| 84 bool isFunctionValue() const { return m_classType == FunctionClass; } | 83 bool isFunctionValue() const { return m_classType == FunctionClass; } |
| 85 bool isImageGeneratorValue() const { return m_classType >= CrossfadeClass &&
m_classType <= RadialGradientClass; } | 84 bool isImageGeneratorValue() const { return m_classType >= LinearGradientCla
ss && m_classType <= RadialGradientClass; } |
| 86 bool isGradientValue() const { return m_classType >= LinearGradientClass &&
m_classType <= RadialGradientClass; } | 85 bool isGradientValue() const { return m_classType >= LinearGradientClass &&
m_classType <= RadialGradientClass; } |
| 87 bool isImageSetValue() const { return m_classType == ImageSetClass; } | |
| 88 bool isImageValue() const { return m_classType == ImageClass; } | |
| 89 bool isImplicitInitialValue() const; | 86 bool isImplicitInitialValue() const; |
| 90 bool isInheritedValue() const { return m_classType == InheritedClass; } | 87 bool isInheritedValue() const { return m_classType == InheritedClass; } |
| 91 bool isInitialValue() const { return m_classType == InitialClass; } | 88 bool isInitialValue() const { return m_classType == InitialClass; } |
| 92 bool isLinearGradientValue() const { return m_classType == LinearGradientCla
ss; } | 89 bool isLinearGradientValue() const { return m_classType == LinearGradientCla
ss; } |
| 93 bool isRadialGradientValue() const { return m_classType == RadialGradientCla
ss; } | 90 bool isRadialGradientValue() const { return m_classType == RadialGradientCla
ss; } |
| 94 bool isShadowValue() const { return m_classType == ShadowClass; } | 91 bool isShadowValue() const { return m_classType == ShadowClass; } |
| 95 bool isTextCloneCSSValue() const { return m_isTextClone; } | 92 bool isTextCloneCSSValue() const { return m_isTextClone; } |
| 96 bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicB
ezierTimingFunctionClass; } | 93 bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicB
ezierTimingFunctionClass; } |
| 97 bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingF
unctionClass; } | 94 bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingF
unctionClass; } |
| 98 bool isTransformValue() const { return m_classType == CSSTransformClass; } | 95 bool isTransformValue() const { return m_classType == CSSTransformClass; } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 110 PassRefPtr<CSSValue> cloneForCSSOM() const; | 107 PassRefPtr<CSSValue> cloneForCSSOM() const; |
| 111 | 108 |
| 112 bool equals(const CSSValue&) const; | 109 bool equals(const CSSValue&) const; |
| 113 | 110 |
| 114 protected: | 111 protected: |
| 115 | 112 |
| 116 static const size_t ClassTypeBits = 6; | 113 static const size_t ClassTypeBits = 6; |
| 117 enum ClassType { | 114 enum ClassType { |
| 118 PrimitiveClass, | 115 PrimitiveClass, |
| 119 | 116 |
| 120 // Image classes. | |
| 121 ImageClass, | |
| 122 | |
| 123 // Image generator classes. | 117 // Image generator classes. |
| 124 CrossfadeClass, | |
| 125 LinearGradientClass, | 118 LinearGradientClass, |
| 126 RadialGradientClass, | 119 RadialGradientClass, |
| 127 | 120 |
| 128 // Timing function classes. | 121 // Timing function classes. |
| 129 CubicBezierTimingFunctionClass, | 122 CubicBezierTimingFunctionClass, |
| 130 StepsTimingFunctionClass, | 123 StepsTimingFunctionClass, |
| 131 | 124 |
| 132 // Other class types. | 125 // Other class types. |
| 133 AspectRatioClass, | 126 AspectRatioClass, |
| 134 BorderImageSliceClass, | 127 BorderImageSliceClass, |
| 135 FontFeatureClass, | 128 FontFeatureClass, |
| 136 FontClass, | 129 FontClass, |
| 137 FontFaceSrcClass, | 130 FontFaceSrcClass, |
| 138 FunctionClass, | 131 FunctionClass, |
| 139 | 132 |
| 140 InheritedClass, | 133 InheritedClass, |
| 141 InitialClass, | 134 InitialClass, |
| 142 | 135 |
| 143 ShadowClass, | 136 ShadowClass, |
| 144 UnicodeRangeClass, | 137 UnicodeRangeClass, |
| 145 LineBoxContainClass, | 138 LineBoxContainClass, |
| 146 CalculationClass, | 139 CalculationClass, |
| 147 | 140 |
| 148 // List class types must appear after ValueListClass. | 141 // List class types must appear after ValueListClass. |
| 149 ValueListClass, | 142 ValueListClass, |
| 150 ImageSetClass, | |
| 151 CSSFilterClass, | 143 CSSFilterClass, |
| 152 CSSTransformClass, | 144 CSSTransformClass, |
| 153 // Do not append non-list class types here. | 145 // Do not append non-list class types here. |
| 154 }; | 146 }; |
| 155 | 147 |
| 156 static const size_t ValueListSeparatorBits = 2; | 148 static const size_t ValueListSeparatorBits = 2; |
| 157 enum ValueListSeparator { | 149 enum ValueListSeparator { |
| 158 SpaceSeparator, | 150 SpaceSeparator, |
| 159 CommaSeparator, | 151 CommaSeparator, |
| 160 SlashSeparator | 152 SlashSeparator |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 { | 218 { |
| 227 return first ? second && first->equals(*second) : !second; | 219 return first ? second && first->equals(*second) : !second; |
| 228 } | 220 } |
| 229 | 221 |
| 230 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ | 222 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 231 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) | 223 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) |
| 232 | 224 |
| 233 } // namespace blink | 225 } // namespace blink |
| 234 | 226 |
| 235 #endif // SKY_ENGINE_CORE_CSS_CSSVALUE_H_ | 227 #endif // SKY_ENGINE_CORE_CSS_CSSVALUE_H_ |
| OLD | NEW |