Chromium Code Reviews| 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; |
| 153 void accumulateLengthArray(CSSLengthArray&, double multiplier = 1) const; | 154 typedef BitVector CSSLengthTypeArray; |
|
samli
2014/12/22 03:38:04
Since we're only going to need to use this in one
| |
| 155 | |
| 156 void accumulateLengthArray(CSSLengthArray&, CSSLengthTypeArray&, double mult iplier = 1) const; | |
|
samli
2014/12/22 03:38:04
Add an extra accumulateLengthArray that doesn't re
| |
| 154 | 157 |
| 155 // This enum follows the BisonCSSParser::Units enum augmented with UNIT_FREQ UENCY for frequencies. | 158 // This enum follows the BisonCSSParser::Units enum augmented with UNIT_FREQ UENCY for frequencies. |
| 156 enum UnitCategory { | 159 enum UnitCategory { |
| 157 UNumber, | 160 UNumber, |
| 158 UPercent, | 161 UPercent, |
| 159 ULength, | 162 ULength, |
| 160 UAngle, | 163 UAngle, |
| 161 UTime, | 164 UTime, |
| 162 UFrequency, | 165 UFrequency, |
| 163 UResolution, | 166 UResolution, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 CSSBasicShape* shape; | 381 CSSBasicShape* shape; |
| 379 CSSCalcValue* calc; | 382 CSSCalcValue* calc; |
| 380 Counter* counter; | 383 Counter* counter; |
| 381 Pair* pair; | 384 Pair* pair; |
| 382 Rect* rect; | 385 Rect* rect; |
| 383 Quad* quad; | 386 Quad* quad; |
| 384 } m_value; | 387 } m_value; |
| 385 }; | 388 }; |
| 386 | 389 |
| 387 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; | 390 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; |
| 391 typedef CSSPrimitiveValue::CSSLengthTypeArray CSSLengthTypeArray; | |
|
samli
2014/12/22 03:38:04
We definitely don't need this anymore :)
evemj (not active)
2014/12/22 06:09:05
Done.
| |
| 392 | |
| 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 |