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

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

Issue 1457873002: Move cursor property into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 */ 21 */
22 22
23 #ifndef CSSPropertyParser_h 23 #ifndef CSSPropertyParser_h
24 #define CSSPropertyParser_h 24 #define CSSPropertyParser_h
25 25
26 #include "core/css/CSSColorValue.h" 26 #include "core/css/CSSColorValue.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/CSSImageValue.h"
29 #include "core/css/CSSPropertySourceData.h" 30 #include "core/css/CSSPropertySourceData.h"
30 #include "core/css/parser/CSSParserTokenRange.h" 31 #include "core/css/parser/CSSParserTokenRange.h"
31 #include "platform/Length.h" 32 #include "platform/Length.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 class BorderImageParseContext; 36 class BorderImageParseContext;
36 class CSSBorderImageSliceValue; 37 class CSSBorderImageSliceValue;
37 class CSSBasicShapeValue; 38 class CSSBasicShapeValue;
38 class CSSBasicShapeEllipseValue; 39 class CSSBasicShapeEllipseValue;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 148
148 void addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr <CSSValue> rval); 149 void addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr <CSSValue> rval);
149 150
150 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result); 151 bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result);
151 152
152 // Legacy parsing allows <string>s for animation-name 153 // Legacy parsing allows <string>s for animation-name
153 bool consumeAnimationShorthand(const StylePropertyShorthand&, bool useLegacy Parsing, bool important); 154 bool consumeAnimationShorthand(const StylePropertyShorthand&, bool useLegacy Parsing, bool important);
154 155
155 bool consumeColumns(bool important); 156 bool consumeColumns(bool important);
156 157
158 PassRefPtrWillBeRawPtr<CSSValue> consumeCursor(CSSParserTokenRange&);
159
157 PassRefPtrWillBeRawPtr<CSSValue> parseGridPosition(); 160 PassRefPtrWillBeRawPtr<CSSValue> parseGridPosition();
158 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti veValue>& numericValue, RefPtrWillBeRawPtr<CSSCustomIdentValue>& gridLineName); 161 bool parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimiti veValue>& numericValue, RefPtrWillBeRawPtr<CSSCustomIdentValue>& gridLineName);
159 bool parseGridItemPositionShorthand(CSSPropertyID, bool important); 162 bool parseGridItemPositionShorthand(CSSPropertyID, bool important);
160 bool parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue>, bool im portant); 163 bool parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue>, bool im portant);
161 bool parseGridTemplateShorthand(bool important); 164 bool parseGridTemplateShorthand(bool important);
162 bool parseGridShorthand(bool important); 165 bool parseGridShorthand(bool important);
163 bool parseGridAreaShorthand(bool important); 166 bool parseGridAreaShorthand(bool important);
164 bool parseGridGapShorthand(bool important); 167 bool parseGridGapShorthand(bool important);
165 bool parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>&); 168 bool parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>&);
166 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList(); 169 PassRefPtrWillBeRawPtr<CSSValue> parseGridTrackList();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 bool parseDeprecatedGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValu e>&); 223 bool parseDeprecatedGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValu e>&);
221 bool parseDeprecatedLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating); 224 bool parseDeprecatedLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating);
222 bool parseDeprecatedRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating); 225 bool parseDeprecatedRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<C SSValue>&, CSSGradientRepeat repeating);
223 bool parseLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating); 226 bool parseLinearGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
224 bool parseRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating); 227 bool parseRadialGradient(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&, CSSGradientRepeat repeating);
225 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex pectComma); 228 bool parseGradientColorStops(CSSParserValueList*, CSSGradientValue*, bool ex pectComma);
226 229
227 bool parseCrossfade(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&); 230 bool parseCrossfade(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
228 231
229 PassRefPtrWillBeRawPtr<CSSValue> parseImageSet(CSSParserValueList*); 232 PassRefPtrWillBeRawPtr<CSSValue> parseImageSet(CSSParserValueList*);
233 PassRefPtrWillBeRawPtr<CSSValue> consumeImageSet(CSSParserTokenRange&);
230 234
231 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter(); 235 PassRefPtrWillBeRawPtr<CSSValueList> parseFilter();
232 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars erValueList*, CSSValueID); 236 PassRefPtrWillBeRawPtr<CSSFunctionValue> parseBuiltinFilterArguments(CSSPars erValueList*, CSSValueID);
233 237
234 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin(); 238 PassRefPtrWillBeRawPtr<CSSValueList> parseTransformOrigin();
235 239
236 bool parseCalculation(CSSParserValue*, ValueRange); 240 bool parseCalculation(CSSParserValue*, ValueRange);
237 241
238 bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&) ; 242 bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&) ;
239 243
240 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar serValue*); 244 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSPar serValue*);
241 PassRefPtrWillBeRawPtr<CSSStringValue> createPrimitiveStringValue(CSSParserV alue*); 245 PassRefPtrWillBeRawPtr<CSSStringValue> createPrimitiveStringValue(CSSParserV alue*);
242 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> createPrimitiveCustomIdentValue( CSSParserValue*); 246 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> createPrimitiveCustomIdentValue( CSSParserValue*);
243 247
244 PassRefPtrWillBeRawPtr<CSSValue> createCSSImageValueWithReferrer(const Atomi cString& rawValue, const KURL&); 248 // TODO(rwlbuis): move to CSSPropertyParser.cpp once CSSParserToken conversi on is done.
249 inline PassRefPtrWillBeRawPtr<CSSValue> createCSSImageValueWithReferrer(cons t AtomicString& rawValue, const KURL& url)
250 {
251 RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue , url);
252 toCSSImageValue(imageValue.get())->setReferrer(m_context.referrer());
253 return imageValue;
254 }
245 255
246 PassRefPtrWillBeRawPtr<CSSBasicShapeInsetValue> parseInsetRoundedCorners(Pas sRefPtrWillBeRawPtr<CSSBasicShapeInsetValue>, CSSParserValueList*); 256 PassRefPtrWillBeRawPtr<CSSBasicShapeInsetValue> parseInsetRoundedCorners(Pas sRefPtrWillBeRawPtr<CSSBasicShapeInsetValue>, CSSParserValueList*);
247 257
248 PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcURI(); 258 PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcURI();
249 PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcLocal(); 259 PassRefPtrWillBeRawPtr<CSSValue> consumeFontFaceSrcLocal();
250 260
251 class ImplicitScope { 261 class ImplicitScope {
252 STACK_ALLOCATED(); 262 STACK_ALLOCATED();
253 WTF_MAKE_NONCOPYABLE(ImplicitScope); 263 WTF_MAKE_NONCOPYABLE(ImplicitScope);
254 public: 264 public:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 bool m_implicitShorthand; 342 bool m_implicitShorthand;
333 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; 343 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
334 }; 344 };
335 345
336 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); 346 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
337 CSSValueID cssValueKeywordID(const CSSParserString&); 347 CSSValueID cssValueKeywordID(const CSSParserString&);
338 348
339 } // namespace blink 349 } // namespace blink
340 350
341 #endif // CSSPropertyParser_h 351 #endif // CSSPropertyParser_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698