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

Side by Side Diff: Source/WebCore/css/CSSParser.h

Issue 13839016: Remove CSS_SHADERS compile-time flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class MediaQuerySet; 58 class MediaQuerySet;
59 class StyleKeyframe; 59 class StyleKeyframe;
60 class StylePropertySet; 60 class StylePropertySet;
61 class StylePropertyShorthand; 61 class StylePropertyShorthand;
62 class StyleRuleBase; 62 class StyleRuleBase;
63 class StyleRuleKeyframes; 63 class StyleRuleKeyframes;
64 class StyleKeyframe; 64 class StyleKeyframe;
65 class StyleSheetContents; 65 class StyleSheetContents;
66 class StyledElement; 66 class StyledElement;
67 67
68 #if ENABLE(CSS_SHADERS)
69 class WebKitCSSArrayFunctionValue; 68 class WebKitCSSArrayFunctionValue;
70 class WebKitCSSMixFunctionValue; 69 class WebKitCSSMixFunctionValue;
71 class WebKitCSSShaderValue; 70 class WebKitCSSShaderValue;
72 #endif
73 71
74 class CSSParser { 72 class CSSParser {
75 friend inline int cssyylex(void*, CSSParser*); 73 friend inline int cssyylex(void*, CSSParser*);
76 74
77 public: 75 public:
78 struct Location; 76 struct Location;
79 enum SyntaxErrorType { 77 enum SyntaxErrorType {
80 PropertyDeclarationError, 78 PropertyDeclarationError,
81 GeneralSyntaxError 79 GeneralSyntaxError
82 }; 80 };
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 PassRefPtr<CSSValue> parseImageResolution(CSSParserValueList*); 231 PassRefPtr<CSSValue> parseImageResolution(CSSParserValueList*);
234 #endif 232 #endif
235 233
236 #if ENABLE(CSS_IMAGE_SET) 234 #if ENABLE(CSS_IMAGE_SET)
237 PassRefPtr<CSSValue> parseImageSet(CSSParserValueList*); 235 PassRefPtr<CSSValue> parseImageSet(CSSParserValueList*);
238 #endif 236 #endif
239 237
240 #if ENABLE(CSS_FILTERS) 238 #if ENABLE(CSS_FILTERS)
241 PassRefPtr<CSSValueList> parseFilter(); 239 PassRefPtr<CSSValueList> parseFilter();
242 PassRefPtr<WebKitCSSFilterValue> parseBuiltinFilterArguments(CSSParserValueL ist*, WebKitCSSFilterValue::FilterOperationType); 240 PassRefPtr<WebKitCSSFilterValue> parseBuiltinFilterArguments(CSSParserValueL ist*, WebKitCSSFilterValue::FilterOperationType);
243 #if ENABLE(CSS_SHADERS)
244 PassRefPtr<WebKitCSSMixFunctionValue> parseMixFunction(CSSParserValue*); 241 PassRefPtr<WebKitCSSMixFunctionValue> parseMixFunction(CSSParserValue*);
245 PassRefPtr<WebKitCSSArrayFunctionValue> parseCustomFilterArrayFunction(CSSPa rserValue*); 242 PassRefPtr<WebKitCSSArrayFunctionValue> parseCustomFilterArrayFunction(CSSPa rserValue*);
246 PassRefPtr<CSSValueList> parseCustomFilterTransform(CSSParserValueList*); 243 PassRefPtr<CSSValueList> parseCustomFilterTransform(CSSParserValueList*);
247 PassRefPtr<CSSValueList> parseCustomFilterParameters(CSSParserValueList*); 244 PassRefPtr<CSSValueList> parseCustomFilterParameters(CSSParserValueList*);
248 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunctionWithAtRuleReferenc eSyntax(CSSParserValue*); 245 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunctionWithAtRuleReferenc eSyntax(CSSParserValue*);
249 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunctionWithInlineSyntax(C SSParserValue*); 246 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunctionWithInlineSyntax(C SSParserValue*);
250 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunction(CSSParserValue*); 247 PassRefPtr<WebKitCSSFilterValue> parseCustomFilterFunction(CSSParserValue*);
251 bool parseFilterRuleSrc(); 248 bool parseFilterRuleSrc();
252 PassRefPtr<WebKitCSSShaderValue> parseFilterRuleSrcUriAndFormat(CSSParserVal ueList*); 249 PassRefPtr<WebKitCSSShaderValue> parseFilterRuleSrcUriAndFormat(CSSParserVal ueList*);
253 #endif 250 #endif
254 #endif
255 251
256 static bool isBlendMode(int ident); 252 static bool isBlendMode(int ident);
257 static bool isCompositeOperator(int ident); 253 static bool isCompositeOperator(int ident);
258 254
259 PassRefPtr<CSSValueList> parseTransform(); 255 PassRefPtr<CSSValueList> parseTransform();
260 PassRefPtr<CSSValue> parseTransformValue(CSSParserValue*); 256 PassRefPtr<CSSValue> parseTransformValue(CSSParserValue*);
261 bool parseTransformOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CSSP ropertyID& propId2, CSSPropertyID& propId3, RefPtr<CSSValue>&, RefPtr<CSSValue>& , RefPtr<CSSValue>&); 257 bool parseTransformOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CSSP ropertyID& propId2, CSSPropertyID& propId3, RefPtr<CSSValue>&, RefPtr<CSSValue>& , RefPtr<CSSValue>&);
262 bool parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CS SPropertyID& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&); 258 bool parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID& propId1, CS SPropertyID& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&);
263 259
264 bool parseTextEmphasisStyle(bool important); 260 bool parseTextEmphasisStyle(bool important);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 StyleRuleBase* createMarginAtRule(CSSSelector::MarginBoxType); 311 StyleRuleBase* createMarginAtRule(CSSSelector::MarginBoxType);
316 #if ENABLE(CSS3_CONDITIONAL_RULES) 312 #if ENABLE(CSS3_CONDITIONAL_RULES)
317 StyleRuleBase* createSupportsRule(bool conditionIsSupported, RuleList*); 313 StyleRuleBase* createSupportsRule(bool conditionIsSupported, RuleList*);
318 void markSupportsRuleHeaderStart(); 314 void markSupportsRuleHeaderStart();
319 void markSupportsRuleHeaderEnd(); 315 void markSupportsRuleHeaderEnd();
320 PassRefPtr<CSSRuleSourceData> popSupportsRuleData(); 316 PassRefPtr<CSSRuleSourceData> popSupportsRuleData();
321 #endif 317 #endif
322 #if ENABLE(SHADOW_DOM) 318 #if ENABLE(SHADOW_DOM)
323 StyleRuleBase* createHostRule(RuleList* rules); 319 StyleRuleBase* createHostRule(RuleList* rules);
324 #endif 320 #endif
325 #if ENABLE(CSS_SHADERS)
326 StyleRuleBase* createFilterRule(const CSSParserString&); 321 StyleRuleBase* createFilterRule(const CSSParserString&);
327 #endif
328 322
329 void startDeclarationsForMarginBox(); 323 void startDeclarationsForMarginBox();
330 void endDeclarationsForMarginBox(); 324 void endDeclarationsForMarginBox();
331 325
332 MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserVal ueList*); 326 MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserVal ueList*);
333 PassOwnPtr<MediaQueryExp> sinkFloatingMediaQueryExp(MediaQueryExp*); 327 PassOwnPtr<MediaQueryExp> sinkFloatingMediaQueryExp(MediaQueryExp*);
334 Vector<OwnPtr<MediaQueryExp> >* createFloatingMediaQueryExpList(); 328 Vector<OwnPtr<MediaQueryExp> >* createFloatingMediaQueryExpList();
335 PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > sinkFloatingMediaQueryExpList(Ve ctor<OwnPtr<MediaQueryExp> >*); 329 PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > sinkFloatingMediaQueryExpList(Ve ctor<OwnPtr<MediaQueryExp> >*);
336 MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const String&, PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > >); 330 MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const String&, PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > >);
337 MediaQuery* createFloatingMediaQuery(PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > >); 331 MediaQuery* createFloatingMediaQuery(PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > >);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 unsigned m_numParsedPropertiesBeforeMarginBox; 378 unsigned m_numParsedPropertiesBeforeMarginBox;
385 379
386 int m_inParseShorthand; 380 int m_inParseShorthand;
387 CSSPropertyID m_currentShorthand; 381 CSSPropertyID m_currentShorthand;
388 bool m_implicitShorthand; 382 bool m_implicitShorthand;
389 383
390 bool m_hasFontFaceOnlyValues; 384 bool m_hasFontFaceOnlyValues;
391 bool m_hadSyntacticallyValidCSSRule; 385 bool m_hadSyntacticallyValidCSSRule;
392 bool m_logErrors; 386 bool m_logErrors;
393 387
394 #if ENABLE(CSS_SHADERS)
395 bool m_inFilterRule; 388 bool m_inFilterRule;
396 #endif
397 389
398 AtomicString m_defaultNamespace; 390 AtomicString m_defaultNamespace;
399 391
400 // tokenizer methods and data 392 // tokenizer methods and data
401 size_t m_parsedTextPrefixLength; 393 size_t m_parsedTextPrefixLength;
402 SourceRange m_selectorRange; 394 SourceRange m_selectorRange;
403 SourceRange m_propertyRange; 395 SourceRange m_propertyRange;
404 OwnPtr<RuleSourceDataList> m_currentRuleDataStack; 396 OwnPtr<RuleSourceDataList> m_currentRuleDataStack;
405 RefPtr<CSSRuleSourceData> m_currentRuleData; 397 RefPtr<CSSRuleSourceData> m_currentRuleData;
406 RuleSourceDataList* m_ruleSourceDataResult; 398 RuleSourceDataList* m_ruleSourceDataResult;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 } 720 }
729 721
730 inline int cssyylex(void* yylval, CSSParser* parser) 722 inline int cssyylex(void* yylval, CSSParser* parser)
731 { 723 {
732 return parser->lex(yylval); 724 return parser->lex(yylval);
733 } 725 }
734 726
735 } // namespace WebCore 727 } // namespace WebCore
736 728
737 #endif // CSSParser_h 729 #endif // CSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698