| 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 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. | 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #define CSSPropertyParser_h | 24 #define CSSPropertyParser_h |
| 25 | 25 |
| 26 #include "core/css/CSSFilterValue.h" | 26 #include "core/css/CSSFilterValue.h" |
| 27 #include "core/css/CSSGradientValue.h" | 27 #include "core/css/CSSGradientValue.h" |
| 28 #include "core/css/CSSGridTemplateAreasValue.h" | 28 #include "core/css/CSSGridTemplateAreasValue.h" |
| 29 #include "core/css/CSSPropertySourceData.h" | 29 #include "core/css/CSSPropertySourceData.h" |
| 30 #include "platform/Length.h" | 30 #include "platform/Length.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class BorderImageParseContext; |
| 34 class CSSBorderImageSliceValue; | 35 class CSSBorderImageSliceValue; |
| 35 class CSSBasicShape; | 36 class CSSBasicShape; |
| 36 class CSSBasicShapeInset; | 37 class CSSBasicShapeInset; |
| 37 class CSSGradientValue; | 38 class CSSGradientValue; |
| 38 class CSSGridLineNamesValue; | 39 class CSSGridLineNamesValue; |
| 39 class CSSLineBoxContainValue; | 40 class CSSLineBoxContainValue; |
| 40 struct CSSParserString; | 41 struct CSSParserString; |
| 41 struct CSSParserValue; | 42 struct CSSParserValue; |
| 42 class CSSParserValueList; | 43 class CSSParserValueList; |
| 43 class CSSPrimitiveValue; | 44 class CSSPrimitiveValue; |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 346 |
| 346 bool shouldAcceptUnitLessValues(CSSParserValue*, Units, CSSParserMode); | 347 bool shouldAcceptUnitLessValues(CSSParserValue*, Units, CSSParserMode); |
| 347 | 348 |
| 348 inline bool validUnit(CSSParserValue* value, Units unitflags, ReleaseParsedC
alcValueCondition releaseCalc = DoNotReleaseParsedCalcValue) { return validUnit(
value, unitflags, m_context.mode(), releaseCalc); } | 349 inline bool validUnit(CSSParserValue* value, Units unitflags, ReleaseParsedC
alcValueCondition releaseCalc = DoNotReleaseParsedCalcValue) { return validUnit(
value, unitflags, m_context.mode(), releaseCalc); } |
| 349 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue
Condition releaseCalc = DoNotReleaseParsedCalcValue); | 350 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue
Condition releaseCalc = DoNotReleaseParsedCalcValue); |
| 350 | 351 |
| 351 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&); | 352 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&); |
| 352 int colorIntFromValue(CSSParserValue*); | 353 int colorIntFromValue(CSSParserValue*); |
| 353 bool isCalculation(CSSParserValue*); | 354 bool isCalculation(CSSParserValue*); |
| 354 | 355 |
| 356 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&); |
| 357 |
| 358 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop&
); |
| 359 |
| 360 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu
e>, bool important); |
| 361 |
| 355 private: | 362 private: |
| 356 // Inputs: | 363 // Inputs: |
| 357 CSSParserValueList* m_valueList; | 364 CSSParserValueList* m_valueList; |
| 358 const CSSParserContext& m_context; | 365 const CSSParserContext& m_context; |
| 359 const bool m_inViewport; | 366 const bool m_inViewport; |
| 360 | 367 |
| 361 // Outputs: | 368 // Outputs: |
| 362 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; | 369 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; |
| 363 CSSRuleSourceData::Type m_ruleType; | 370 CSSRuleSourceData::Type m_ruleType; |
| 364 | 371 |
| 365 // Locals during parsing: | 372 // Locals during parsing: |
| 366 int m_inParseShorthand; | 373 int m_inParseShorthand; |
| 367 CSSPropertyID m_currentShorthand; | 374 CSSPropertyID m_currentShorthand; |
| 368 bool m_implicitShorthand; | 375 bool m_implicitShorthand; |
| 369 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; | 376 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; |
| 370 | |
| 371 // FIXME: There is probably a small set of APIs we could expose for these | |
| 372 // classes w/o needing to make them friends. | |
| 373 friend class ShadowParseContext; | |
| 374 friend class BorderImageParseContext; | |
| 375 friend class BorderImageSliceParseContext; | |
| 376 friend class BorderImageQuadParseContext; | |
| 377 friend class TransformOperationInfo; | |
| 378 friend bool parseDeprecatedGradientColorStop(CSSPropertyParser*, CSSParserVa
lue*, CSSGradientColorStop&); | |
| 379 friend PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGradientColorOrKeyword
(CSSPropertyParser*, CSSParserValue*); | |
| 380 }; | 377 }; |
| 381 | 378 |
| 382 CSSPropertyID cssPropertyID(const CSSParserString&); | 379 CSSPropertyID cssPropertyID(const CSSParserString&); |
| 383 CSSPropertyID cssPropertyID(const String&); | 380 CSSPropertyID cssPropertyID(const String&); |
| 384 CSSValueID cssValueKeywordID(const CSSParserString&); | 381 CSSValueID cssValueKeywordID(const CSSParserString&); |
| 385 | 382 |
| 386 } // namespace blink | 383 } // namespace blink |
| 387 | 384 |
| 388 #endif // CSSPropertyParser_h | 385 #endif // CSSPropertyParser_h |
| OLD | NEW |