| 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, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef CSSPrimitiveValue_h | 22 #ifndef CSSPrimitiveValue_h |
| 23 #define CSSPrimitiveValue_h | 23 #define CSSPrimitiveValue_h |
| 24 | 24 |
| 25 #include "core/CSSPropertyNames.h" | 25 #include "core/CSSPropertyNames.h" |
| 26 #include "core/CSSValueKeywords.h" | 26 #include "core/CSSValueKeywords.h" |
| 27 #include "core/css/CSSValue.h" | 27 #include "core/css/CSSValue.h" |
| 28 #include "platform/graphics/Color.h" | 28 #include "platform/graphics/Color.h" |
| 29 #include "wtf/BitVector.h" |
| 29 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
| 30 #include "wtf/MathExtras.h" | 31 #include "wtf/MathExtras.h" |
| 31 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class CSSBasicShape; | 36 class CSSBasicShape; |
| 36 class CSSCalcValue; | 37 class CSSCalcValue; |
| 37 class CSSToLengthConversionData; | 38 class CSSToLengthConversionData; |
| 38 class Counter; | 39 class Counter; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 UnitTypeViewportWidth, | 144 UnitTypeViewportWidth, |
| 144 UnitTypeViewportHeight, | 145 UnitTypeViewportHeight, |
| 145 UnitTypeViewportMin, | 146 UnitTypeViewportMin, |
| 146 UnitTypeViewportMax, | 147 UnitTypeViewportMax, |
| 147 | 148 |
| 148 // This value must come after the last length unit type to enable iterat
ion over the length unit types. | 149 // This value must come after the last length unit type to enable iterat
ion over the length unit types. |
| 149 LengthUnitTypeCount, | 150 LengthUnitTypeCount, |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 typedef Vector<double, CSSPrimitiveValue::LengthUnitTypeCount> CSSLengthArra
y; | 153 typedef Vector<double, CSSPrimitiveValue::LengthUnitTypeCount> CSSLengthArra
y; |
| 154 typedef BitVector CSSLengthTypeArray; |
| 155 |
| 153 void accumulateLengthArray(CSSLengthArray&, double multiplier = 1) const; | 156 void accumulateLengthArray(CSSLengthArray&, double multiplier = 1) const; |
| 157 void accumulateLengthArray(CSSLengthArray&, CSSLengthTypeArray&, double mult
iplier = 1) const; |
| 154 | 158 |
| 155 // This enum follows the BisonCSSParser::Units enum augmented with UNIT_FREQ
UENCY for frequencies. | 159 // This enum follows the BisonCSSParser::Units enum augmented with UNIT_FREQ
UENCY for frequencies. |
| 156 enum UnitCategory { | 160 enum UnitCategory { |
| 157 UNumber, | 161 UNumber, |
| 158 UPercent, | 162 UPercent, |
| 159 ULength, | 163 ULength, |
| 160 UAngle, | 164 UAngle, |
| 161 UTime, | 165 UTime, |
| 162 UFrequency, | 166 UFrequency, |
| 163 UResolution, | 167 UResolution, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 CSSBasicShape* shape; | 382 CSSBasicShape* shape; |
| 379 CSSCalcValue* calc; | 383 CSSCalcValue* calc; |
| 380 Counter* counter; | 384 Counter* counter; |
| 381 Pair* pair; | 385 Pair* pair; |
| 382 Rect* rect; | 386 Rect* rect; |
| 383 Quad* quad; | 387 Quad* quad; |
| 384 } m_value; | 388 } m_value; |
| 385 }; | 389 }; |
| 386 | 390 |
| 387 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; | 391 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; |
| 392 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; |
| 388 | 393 |
| 389 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 394 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
| 390 | 395 |
| 391 } // namespace blink | 396 } // namespace blink |
| 392 | 397 |
| 393 #endif // CSSPrimitiveValue_h | 398 #endif // CSSPrimitiveValue_h |
| OLD | NEW |