| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 struct CSSParserFunction; | 134 struct CSSParserFunction; |
| 135 | 135 |
| 136 struct CSSParserValue { | 136 struct CSSParserValue { |
| 137 CSSValueID id; | 137 CSSValueID id; |
| 138 bool isInt; | 138 bool isInt; |
| 139 union { | 139 union { |
| 140 double fValue; | 140 double fValue; |
| 141 int iValue; | 141 int iValue; |
| 142 CSSParserString string; | 142 CSSParserString string; |
| 143 CSSParserFunction* function; | 143 CSSParserFunction* function; |
| 144 CSSParserValueList* valueList; |
| 144 }; | 145 }; |
| 145 enum { | 146 enum { |
| 146 Operator = 0x100000, | 147 Operator = 0x100000, |
| 147 Function = 0x100001, | 148 Function = 0x100001, |
| 148 Q_EMS = 0x100002 | 149 ValueList = 0x100002, |
| 150 Q_EMS = 0x100003, |
| 149 }; | 151 }; |
| 150 int unit; | 152 int unit; |
| 151 | 153 |
| 152 inline void setFromNumber(double value, int unit = CSSPrimitiveValue::CSS_NU
MBER); | 154 inline void setFromNumber(double value, int unit = CSSPrimitiveValue::CSS_NU
MBER); |
| 153 inline void setFromFunction(CSSParserFunction*); | 155 inline void setFromFunction(CSSParserFunction*); |
| 156 inline void setFromValueList(PassOwnPtr<CSSParserValueList>); |
| 154 | 157 |
| 155 PassRefPtr<CSSValue> createCSSValue(); | 158 PassRefPtr<CSSValue> createCSSValue(); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 class CSSParserValueList { | 161 class CSSParserValueList { |
| 159 WTF_MAKE_FAST_ALLOCATED; | 162 WTF_MAKE_FAST_ALLOCATED; |
| 160 public: | 163 public: |
| 161 CSSParserValueList() | 164 CSSParserValueList() |
| 162 : m_current(0) | 165 : m_current(0) |
| 163 { | 166 { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 this->unit = unit; | 261 this->unit = unit; |
| 259 } | 262 } |
| 260 | 263 |
| 261 inline void CSSParserValue::setFromFunction(CSSParserFunction* function) | 264 inline void CSSParserValue::setFromFunction(CSSParserFunction* function) |
| 262 { | 265 { |
| 263 id = CSSValueInvalid; | 266 id = CSSValueInvalid; |
| 264 this->function = function; | 267 this->function = function; |
| 265 unit = Function; | 268 unit = Function; |
| 266 } | 269 } |
| 267 | 270 |
| 271 inline void CSSParserValue::setFromValueList(PassOwnPtr<CSSParserValueList> valu
eList) |
| 272 { |
| 273 id = CSSValueInvalid; |
| 274 this->valueList = valueList.leakPtr(); |
| 275 unit = ValueList; |
| 276 } |
| 277 |
| 268 } | 278 } |
| 269 | 279 |
| 270 #endif | 280 #endif |
| OLD | NEW |