Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Side by Side Diff: Source/core/css/parser/CSSPropertyParser.h

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some small fixes to (hopefully) fix some broken tests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 bool inShorthand() const { return m_inParseShorthand; } 89 bool inShorthand() const { return m_inParseShorthand; }
90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } 90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); }
91 91
92 bool parseViewportProperty(CSSPropertyID propId, bool important); 92 bool parseViewportProperty(CSSPropertyID propId, bool important);
93 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important); 93 bool parseViewportShorthand(CSSPropertyID propId, CSSPropertyID first, CSSPr opertyID second, bool important);
94 bool parseFontFaceDescriptor(CSSPropertyID); 94 bool parseFontFaceDescriptor(CSSPropertyID);
95 95
96 KURL completeURL(const String& url) const; 96 KURL completeURL(const String& url) const;
97 97
98 void addProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant, bool implicit = false); 98 void addProperty(CSSPropertyID, CSSValue, bool important, bool implicit = fa lse);
99 void rollbackLastProperties(int num); 99 void rollbackLastProperties(int num);
100 void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPt r<CSSValue>, bool); 100 void addExpandedPropertyForValue(CSSPropertyID propId, CSSValue, bool);
101 101
102 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ide nt, CSSParserValue*); 102 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ide nt, CSSParserValue*);
103 103
104 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor tant); 104 bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool impor tant);
105 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor tant); 105 bool parse4Values(CSSPropertyID, const CSSPropertyID* properties, bool impor tant);
106 PassRefPtrWillBeRawPtr<CSSValueList> parseContent(); 106 PassRefPtrWillBeRawPtr<CSSValueList> parseContent();
107 PassRefPtrWillBeRawPtr<CSSValue> parseQuotes(); 107 NullableCSSValue parseQuotes();
108 108
109 PassRefPtrWillBeRawPtr<CSSValue> parseAttr(CSSParserValueList* args); 109 NullableCSSValue parseAttr(CSSParserValueList* args);
110 110
111 PassRefPtrWillBeRawPtr<CSSValue> parseBackgroundColor(); 111 NullableCSSValue parseBackgroundColor();
112 112
113 bool parseFillImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); 113 bool parseFillImage(CSSParserValueList*, NullableCSSValue&);
114 114
115 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 }; 115 enum FillPositionFlag { InvalidFillPosition = 0, AmbiguousFillPosition = 1, XFillPosition = 2, YFillPosition = 4 };
116 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe yword = 1 }; 116 enum FillPositionParsingMode { ResolveValuesAsPercent = 0, ResolveValuesAsKe yword = 1 };
117 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSPars erValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillP ositionParsingMode = ResolveValuesAsPercent, Units = FUnknown); 117 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseFillPositionComponent(CSSPars erValueList*, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillP ositionParsingMode = ResolveValuesAsPercent, Units = FUnknown);
118 PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionX(CSSParserValueList*); 118 NullableCSSValue parseFillPositionX(CSSParserValueList*);
119 PassRefPtrWillBeRawPtr<CSSValue> parseFillPositionY(CSSParserValueList*); 119 NullableCSSValue parseFillPositionY(CSSParserValueList*);
120 void parse2ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal ue>&, RefPtrWillBeRawPtr<CSSValue>&, Units = FUnknown); 120 void parse2ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab leCSSValue&, Units = FUnknown);
121 bool isPotentialPositionValue(CSSParserValue*); 121 bool isPotentialPositionValue(CSSParserValue*);
122 void parseFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, R efPtrWillBeRawPtr<CSSValue>&, Units = FUnknown); 122 void parseFillPosition(CSSParserValueList*, NullableCSSValue&, NullableCSSVa lue&, Units = FUnknown);
123 void parse3ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal ue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>); 123 void parse3ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab leCSSValue&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<C SSPrimitiveValue>);
124 void parse4ValuesFillPosition(CSSParserValueList*, RefPtrWillBeRawPtr<CSSVal ue>&, RefPtrWillBeRawPtr<CSSValue>&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>); 124 void parse4ValuesFillPosition(CSSParserValueList*, NullableCSSValue&, Nullab leCSSValue&, PassRefPtrWillBeRawPtr<CSSPrimitiveValue>, PassRefPtrWillBeRawPtr<C SSPrimitiveValue>);
125 125
126 void parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSVa lue>&); 126 void parseFillRepeat(NullableCSSValue&, NullableCSSValue&);
127 PassRefPtrWillBeRawPtr<CSSValue> parseFillSize(CSSPropertyID); 127 NullableCSSValue parseFillSize(CSSPropertyID);
128 128
129 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp ertyID& propId2, RefPtrWillBeRawPtr<CSSValue>&, RefPtrWillBeRawPtr<CSSValue>&); 129 bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSProp ertyID& propId2, NullableCSSValue&, NullableCSSValue&);
130 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int numProperties, bool important); 130 bool parseFillShorthand(CSSPropertyID, const CSSPropertyID* properties, int numProperties, bool important);
131 131
132 void addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr <CSSValue> rval); 132 void addFillValue(NullableCSSValue& lval, CSSValue rval);
133 133
134 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDelay(); 134 NullableCSSValue parseAnimationDelay();
135 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDirection(); 135 NullableCSSValue parseAnimationDirection();
136 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationDuration(); 136 NullableCSSValue parseAnimationDuration();
137 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationFillMode(); 137 NullableCSSValue parseAnimationFillMode();
138 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationIterationCount(); 138 NullableCSSValue parseAnimationIterationCount();
139 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationName(bool allowQuotedName); 139 NullableCSSValue parseAnimationName(bool allowQuotedName);
140 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationPlayState(); 140 NullableCSSValue parseAnimationPlayState();
141 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationProperty(); 141 NullableCSSValue parseAnimationProperty();
142 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationTimingFunction(); 142 NullableCSSValue parseAnimationTimingFunction();
143 143
144 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result); 144 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result);
145 145
146 // Legacy parsing allows <string>s for animation-name 146 // Legacy parsing allows <string>s for animation-name
147 PassRefPtrWillBeRawPtr<CSSValue> parseAnimationProperty(CSSPropertyID, bool useLegacyParsing); 147 NullableCSSValue parseAnimationProperty(CSSPropertyID, bool useLegacyParsing );
148 PassRefPtrWillBeRawPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyI D, bool useLegacyParsing); 148 PassRefPtrWillBeRawPtr<CSSValueList> parseAnimationPropertyList(CSSPropertyI D, bool useLegacyParsing);
149 bool parseAnimationShorthand(bool useLegacyParsing, bool important); 149 bool parseAnimationShorthand(bool useLegacyParsing, bool important);
150 bool parseTransitionShorthand(bool important); 150 bool parseTransitionShorthand(bool important);
151 151
152 PassRefPtrWillBeRawPtr<CSSValue> parseColumnWidth(); 152 NullableCSSValue parseColumnWidth();
153 PassRefPtrWillBeRawPtr<CSSValue> parseColumnCount(); 153 NullableCSSValue parseColumnCount();
154 bool parseColumnsShorthand(bool important); 154 bool parseColumnsShorthand(bool important);
155 155
156 PassRefPtrWillBeRawPtr<CSSValue> parseGridPosition(); 156 NullableCSSValue parseGridPosition();
157 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti veValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gridLineName); 157 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti veValue>& numericValue, RefPtrWillBeRawPtr<CSSPrimitiveValue>& gridLineName);
158 bool parseGridItemPositionShorthand(CSSPropertyID, bool important); 158 bool parseGridItemPositionShorthand(CSSPropertyID, bool important);
159 bool parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue>, bool im portant); 159 bool parseGridTemplateRowsAndAreas(NullableCSSValue, bool important);
160 bool parseGridTemplateShorthand(bool important); 160 bool parseGridTemplateShorthand(bool important);
161 bool parseGridShorthand(bool important); 161 bool parseGridShorthand(bool important);
162 bool parseGridAreaShorthand(bool important); 162 bool parseGridAreaShorthand(bool important);
163 bool parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>&); 163 bool parseSingleGridAreaLonghand(NullableCSSValue&);
164 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList(); 164 NullableCSSValue parseGridTrackList();
165 bool parseGridTrackRepeatFunction(CSSValueList&); 165 bool parseGridTrackRepeatFunction(CSSValueList&);
166 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inpu tList); 166 NullableCSSValue parseGridTrackSize(CSSParserValueList& inputList);
167 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*); 167 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*);
168 bool parseGridTemplateAreasRow(NamedGridAreaMap&, const size_t, size_t&); 168 bool parseGridTemplateAreasRow(NamedGridAreaMap&, const size_t, size_t&);
169 PassRefPtrWillBeRawPtr<CSSValue> parseGridTemplateAreas(); 169 NullableCSSValue parseGridTemplateAreas();
170 void maybeParseGridLineNames(CSSParserValueList&, CSSValueList&, CSSGridLine NamesValue* = 0); 170 void maybeParseGridLineNames(CSSParserValueList&, CSSValueList&, CSSGridLine NamesValue* = 0);
171 PassRefPtrWillBeRawPtr<CSSValue> parseGridAutoFlow(CSSParserValueList&); 171 NullableCSSValue parseGridAutoFlow(CSSParserValueList&);
172 172
173 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseClipShape(); 173 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseClipShape();
174 174
175 bool parseLegacyPosition(CSSPropertyID, bool important); 175 bool parseLegacyPosition(CSSPropertyID, bool important);
176 bool parseItemPositionOverflowPosition(CSSPropertyID, bool important); 176 bool parseItemPositionOverflowPosition(CSSPropertyID, bool important);
177 PassRefPtrWillBeRawPtr<CSSValue> parseContentDistributionOverflowPosition(); 177 NullableCSSValue parseContentDistributionOverflowPosition();
178 178
179 PassRefPtrWillBeRawPtr<CSSValue> parseShapeProperty(CSSPropertyID propId); 179 NullableCSSValue parseShapeProperty(CSSPropertyID propId);
180 PassRefPtrWillBeRawPtr<CSSValue> parseBasicShapeAndOrBox(); 180 NullableCSSValue parseBasicShapeAndOrBox();
181 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBasicShape(); 181 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseBasicShape();
182 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*); 182 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseShapeRadius(CSSParserValue*);
183 183
184 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueLi st* args); 184 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeCircle(CSSParserValueLi st* args);
185 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueL ist* args); 185 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeEllipse(CSSParserValueL ist* args);
186 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueL ist* args); 186 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapePolygon(CSSParserValueL ist* args);
187 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueLis t* args); 187 PassRefPtrWillBeRawPtr<CSSBasicShape> parseBasicShapeInset(CSSParserValueLis t* args);
188 188
189 bool parseFont(bool important); 189 bool parseFont(bool important);
190 void parseSystemFont(bool important); 190 void parseSystemFont(bool important);
191 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFamily(); 191 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFamily();
192 192
193 PassRefPtrWillBeRawPtr<CSSValue> parseCounter(int defaultValue); 193 NullableCSSValue parseCounter(int defaultValue);
194 PassRefPtrWillBeRawPtr<CSSValue> parseCounterContent(CSSParserValueList* arg s, bool counters); 194 NullableCSSValue parseCounterContent(CSSParserValueList* args, bool counters );
195 195
196 bool parseColorParameters(CSSParserValue*, int* colorValues, bool parseAlpha ); 196 bool parseColorParameters(CSSParserValue*, int* colorValues, bool parseAlpha );
197 bool parseHSLParameters(CSSParserValue*, double* colorValues, bool parseAlph a); 197 bool parseHSLParameters(CSSParserValue*, double* colorValues, bool parseAlph a);
198 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(CSSParserValue* = 0, bo ol acceptQuirkyColors = false); 198 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseColor(CSSParserValue* = 0, bo ol acceptQuirkyColors = false);
199 bool parseColorFromValue(CSSParserValue*, RGBA32&, bool acceptQuirkyColors = false); 199 bool parseColorFromValue(CSSParserValue*, RGBA32&, bool acceptQuirkyColors = false);
200 200
201 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight(); 201 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight();
202 bool parseFontSize(bool important); 202 bool parseFontSize(bool important);
203 bool parseFontVariant(bool important); 203 bool parseFontVariant(bool important);
204 bool parseFontWeight(bool important); 204 bool parseFontWeight(bool important);
205 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceSrc(); 205 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceSrc();
206 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceUnicodeRange(); 206 PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceUnicodeRange();
207 207
208 bool parseSVGValue(CSSPropertyID propId, bool important); 208 bool parseSVGValue(CSSPropertyID propId, bool important);
209 PassRefPtrWillBeRawPtr<CSSValue> parseSVGStrokeDasharray(); 209 NullableCSSValue parseSVGStrokeDasharray();
210 210
211 PassRefPtrWillBeRawPtr<CSSValue> parsePaintOrder() const; 211 NullableCSSValue parsePaintOrder() const;
212 212
213 // CSS3 Parsing Routines (for properties specific to CSS3) 213 // CSS3 Parsing Routines (for properties specific to CSS3)
214 PassRefPtrWillBeRawPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPro pertyID); 214 PassRefPtrWillBeRawPtr<CSSValueList> parseShadow(CSSParserValueList*, CSSPro pertyID);
215 bool parseBorderImageShorthand(CSSPropertyID, bool important); 215 bool parseBorderImageShorthand(CSSPropertyID, bool important);
216 PassRefPtrWillBeRawPtr<CSSValue> parseBorderImage(CSSPropertyID); 216 NullableCSSValue parseBorderImage(CSSPropertyID);
217 bool parseBorderImageRepeat(RefPtrWillBeRawPtr<CSSValue>&); 217 bool parseBorderImageRepeat(NullableCSSValue&);
218 bool parseBorderImageSlice(CSSPropertyID, RefPtrWillBeRawPtr<CSSBorderImageS liceValue>&); 218 bool parseBorderImageSlice(CSSPropertyID, RefPtrWillBeRawPtr<CSSBorderImageS liceValue>&);
219 bool parseBorderImageWidth(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); 219 bool parseBorderImageWidth(RefPtrWillBeRawPtr<CSSPrimitiveValue>&);
220 bool parseBorderImageOutset(RefPtrWillBeRawPtr<CSSPrimitiveValue>&); 220 bool parseBorderImageOutset(RefPtrWillBeRawPtr<CSSPrimitiveValue>&);
221 bool parseBorderRadius(CSSPropertyID, bool important); 221 bool parseBorderRadius(CSSPropertyID, bool important);
222 222
223 PassRefPtrWillBeRawPtr<CSSValue> parseReflect(); 223 NullableCSSValue parseReflect();
224 224
225 bool parseFlex(CSSParserValueList* args, bool important); 225 bool parseFlex(CSSParserValueList* args, bool important);
226 226
227 PassRefPtrWillBeRawPtr<CSSValue> parseObjectPosition(); 227 NullableCSSValue parseObjectPosition();
228 228
229 // Image generators 229 // Image generators
230 bool parseCanvas(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); 230 bool parseCanvas(CSSParserValueList*, NullableCSSValue&);
231 231
232 bool parseDeprecatedGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValu e>&); 232 bool parseDeprecatedGradient(CSSParserValueList*, NullableCSSValue&);
233 bool parseDeprecatedLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating); 233 bool parseDeprecatedLinearGradient(CSSParserValueList*, NullableCSSValue&, C SSGradientRepeat repeating);
234 bool parseDeprecatedRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating); 234 bool parseDeprecatedRadialGradient(CSSParserValueList*, NullableCSSValue&, C SSGradientRepeat repeating);
235 bool parseLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating); 235 bool parseLinearGradient(CSSParserValueList*, NullableCSSValue&, CSSGradient Repeat repeating);
236 bool parseRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating); 236 bool parseRadialGradient(CSSParserValueList*, NullableCSSValue&, CSSGradient Repeat repeating);
237 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex pectComma); 237 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex pectComma);
238 238
239 bool parseCrossfade(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); 239 bool parseCrossfade(CSSParserValueList*, NullableCSSValue&);
240 240
241 PassRefPtrWillBeRawPtr<CSSValue> parseImageSet(CSSParserValueList*); 241 NullableCSSValue parseImageSet(CSSParserValueList*);
242 242
243 PassRefPtrWillBeRawPtr<CSSValue> parseWillChange(); 243 NullableCSSValue parseWillChange();
244 244
245 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter(); 245 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter();
246 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars erValueList*, CSSValueID); 246 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars erValueList*, CSSValueID);
247 247
248 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin(); 248 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin();
249 PassRefPtrWillBeRawPtr<CSSValueList> parseTransform(bool useLegacyParsing); 249 PassRefPtrWillBeRawPtr<CSSValueList> parseTransform(bool useLegacyParsing);
250 PassRefPtrWillBeRawPtr<CSSValue> parseTransformValue(bool useLegacyParsing, CSSParserValue*); 250 NullableCSSValue parseTransformValue(bool useLegacyParsing, CSSParserValue*) ;
251 251
252 PassRefPtrWillBeRawPtr<CSSValue> parseMotionPath(); 252 NullableCSSValue parseMotionPath();
253 PassRefPtrWillBeRawPtr<CSSValue> parseMotionRotation(); 253 NullableCSSValue parseMotionRotation();
254 254
255 PassRefPtrWillBeRawPtr<CSSValue> parseTextEmphasisStyle(); 255 NullableCSSValue parseTextEmphasisStyle();
256 256
257 PassRefPtrWillBeRawPtr<CSSValue> parseTouchAction(); 257 NullableCSSValue parseTouchAction();
258 PassRefPtrWillBeRawPtr<CSSValue> parseScrollBlocksOn(); 258 NullableCSSValue parseScrollBlocksOn();
259 259
260 void addTextDecorationProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu e>, bool important); 260 void addTextDecorationProperty(CSSPropertyID, CSSValue, bool important);
261 bool parseTextDecoration(CSSPropertyID propId, bool important); 261 bool parseTextDecoration(CSSPropertyID propId, bool important);
262 262
263 PassRefPtrWillBeRawPtr<CSSValue> parseTextIndent(); 263 NullableCSSValue parseTextIndent();
264 264
265 PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> parseLineBoxContain(); 265 PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> parseLineBoxContain();
266 bool parseCalculation(CSSParserValue*, ValueRange); 266 bool parseCalculation(CSSParserValue*, ValueRange);
267 267
268 bool parseFontFeatureTag(CSSValueList*); 268 bool parseFontFeatureTag(CSSValueList*);
269 PassRefPtrWillBeRawPtr<CSSValue> parseFontFeatureSettings(); 269 NullableCSSValue parseFontFeatureSettings();
270 270
271 bool parseFontVariantLigatures(bool important); 271 bool parseFontVariantLigatures(bool important);
272 272
273 bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&) ; 273 bool parseGeneratedImage(CSSParserValueList*, NullableCSSValue&);
274 274
275 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar serValue*); 275 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar serValue*);
276 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSPars erValue*); 276 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveStringValue(CSSPars erValue*);
277 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveCustomIdentValue(CS SParserValue*); 277 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveCustomIdentValue(CS SParserValue*);
278 278
279 PassRefPtrWillBeRawPtr<CSSValue> createCSSImageValueWithReferrer(const Strin g& rawValue, const KURL&); 279 CSSValue createCSSImageValueWithReferrer(const String& rawValue, const KURL& );
280 280
281 PassRefPtrWillBeRawPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtrWil lBeRawPtr<CSSBasicShapeInset>, CSSParserValueList*); 281 PassRefPtrWillBeRawPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtrWil lBeRawPtr<CSSBasicShapeInset>, CSSParserValueList*);
282 282
283 enum SizeParameterType { 283 enum SizeParameterType {
284 None, 284 None,
285 Auto, 285 Auto,
286 Length, 286 Length,
287 PageSize, 287 PageSize,
288 Orientation, 288 Orientation,
289 }; 289 };
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue Condition releaseCalc = DoNotReleaseParsedCalcValue); 352 bool validUnit(CSSParserValue*, Units, CSSParserMode, ReleaseParsedCalcValue Condition releaseCalc = DoNotReleaseParsedCalcValue);
353 353
354 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&); 354 bool parseBorderImageQuad(Units, RefPtrWillBeRawPtr<CSSPrimitiveValue>&);
355 int colorIntFromValue(CSSParserValue*); 355 int colorIntFromValue(CSSParserValue*);
356 bool isCalculation(CSSParserValue*); 356 bool isCalculation(CSSParserValue*);
357 357
358 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&); 358 bool buildBorderImageParseContext(CSSPropertyID, BorderImageParseContext&);
359 359
360 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop& ); 360 bool parseDeprecatedGradientColorStop(CSSParserValue*, CSSGradientColorStop& );
361 361
362 void commitBorderImageProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValu e>, bool important); 362 void commitBorderImageProperty(CSSPropertyID, NullableCSSValue, bool importa nt);
363 363
364 private: 364 private:
365 // Inputs: 365 // Inputs:
366 CSSParserValueList* m_valueList; 366 CSSParserValueList* m_valueList;
367 const CSSParserContext& m_context; 367 const CSSParserContext& m_context;
368 368
369 // Outputs: 369 // Outputs:
370 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties; 370 WillBeHeapVector<CSSProperty, 256>& m_parsedProperties;
371 StyleRule::Type m_ruleType; 371 StyleRule::Type m_ruleType;
372 372
373 // Locals during parsing: 373 // Locals during parsing:
374 int m_inParseShorthand; 374 int m_inParseShorthand;
375 CSSPropertyID m_currentShorthand; 375 CSSPropertyID m_currentShorthand;
376 bool m_implicitShorthand; 376 bool m_implicitShorthand;
377 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; 377 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
378 }; 378 };
379 379
380 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); 380 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
381 CSSPropertyID cssPropertyID(const String&); 381 CSSPropertyID cssPropertyID(const String&);
382 CSSValueID cssValueKeywordID(const CSSParserString&); 382 CSSValueID cssValueKeywordID(const CSSParserString&);
383 383
384 } // namespace blink 384 } // namespace blink
385 385
386 #endif // CSSPropertyParser_h 386 #endif // CSSPropertyParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698