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 25 matching lines...) Expand all Loading... |
36 class CSSGridLineNamesValue; | 36 class CSSGridLineNamesValue; |
37 struct CSSParserString; | 37 struct CSSParserString; |
38 struct CSSParserValue; | 38 struct CSSParserValue; |
39 class CSSParserValueList; | 39 class CSSParserValueList; |
40 class CSSPrimitiveValue; | 40 class CSSPrimitiveValue; |
41 class CSSProperty; | 41 class CSSProperty; |
42 class CSSValue; | 42 class CSSValue; |
43 class CSSValueList; | 43 class CSSValueList; |
44 class StylePropertyShorthand; | 44 class StylePropertyShorthand; |
45 | 45 |
| 46 // TODO(rob.buis) to move to cpp file once legacy parser is removed. |
| 47 enum TrackSizeRestriction { FixedSizeOnly, AllowAll }; |
| 48 |
46 // Inputs: PropertyID, isImportant bool, CSSParserValueList. | 49 // Inputs: PropertyID, isImportant bool, CSSParserValueList. |
47 // Outputs: Vector of CSSProperties | 50 // Outputs: Vector of CSSProperties |
48 | 51 |
49 class CSSPropertyParser { | 52 class CSSPropertyParser { |
50 STACK_ALLOCATED(); | 53 STACK_ALLOCATED(); |
51 public: | 54 public: |
52 | 55 |
53 enum Units { | 56 enum Units { |
54 FUnknown = 0x0000, | 57 FUnknown = 0x0000, |
55 FInteger = 0x0001, | 58 FInteger = 0x0001, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool parseShorthand(CSSPropertyID, bool important); | 108 bool parseShorthand(CSSPropertyID, bool important); |
106 bool consumeShorthandGreedily(const StylePropertyShorthand&, bool important)
; | 109 bool consumeShorthandGreedily(const StylePropertyShorthand&, bool important)
; |
107 bool consume4Values(const StylePropertyShorthand&, bool important); | 110 bool consume4Values(const StylePropertyShorthand&, bool important); |
108 | 111 |
109 // Legacy parsing allows <string>s for animation-name | 112 // Legacy parsing allows <string>s for animation-name |
110 bool consumeAnimationShorthand(const StylePropertyShorthand&, bool useLegacy
Parsing, bool important); | 113 bool consumeAnimationShorthand(const StylePropertyShorthand&, bool useLegacy
Parsing, bool important); |
111 bool consumeBackgroundShorthand(const StylePropertyShorthand&, bool importan
t); | 114 bool consumeBackgroundShorthand(const StylePropertyShorthand&, bool importan
t); |
112 | 115 |
113 bool consumeColumns(bool important); | 116 bool consumeColumns(bool important); |
114 | 117 |
115 enum TrackSizeRestriction { FixedSizeOnly, AllowAll }; | |
116 bool consumeGridItemPositionShorthand(CSSPropertyID, bool important); | 118 bool consumeGridItemPositionShorthand(CSSPropertyID, bool important); |
117 PassRefPtrWillBeRawPtr<CSSValue> parseGridTemplateColumns(bool important); | 119 PassRefPtrWillBeRawPtr<CSSValue> parseGridTemplateColumns(bool important); |
118 bool parseGridTemplateRowsAndAreasAndColumns(bool important); | 120 bool parseGridTemplateRowsAndAreasAndColumns(bool important); |
119 bool parseGridTemplateShorthand(bool important); | 121 bool parseGridTemplateShorthand(bool important); |
120 bool parseGridShorthand(bool important); | 122 bool parseGridShorthand(bool important); |
121 bool consumeGridAreaShorthand(bool important); | 123 bool consumeGridAreaShorthand(bool important); |
122 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList(); | 124 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList(); |
123 bool parseGridTrackRepeatFunction(CSSValueList&, bool& isAutoRepeat); | 125 bool parseGridTrackRepeatFunction(CSSValueList&, bool& isAutoRepeat); |
124 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inpu
tList, TrackSizeRestriction = AllowAll); | 126 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inpu
tList, TrackSizeRestriction = AllowAll); |
125 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*,
TrackSizeRestriction = AllowAll); | 127 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*,
TrackSizeRestriction = AllowAll); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 CSSPropertyID m_currentShorthand; | 196 CSSPropertyID m_currentShorthand; |
195 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; | 197 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; |
196 }; | 198 }; |
197 | 199 |
198 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); | 200 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); |
199 CSSValueID cssValueKeywordID(const CSSParserString&); | 201 CSSValueID cssValueKeywordID(const CSSParserString&); |
200 | 202 |
201 } // namespace blink | 203 } // namespace blink |
202 | 204 |
203 #endif // CSSPropertyParser_h | 205 #endif // CSSPropertyParser_h |
OLD | NEW |