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

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

Issue 149363002: Web Animations API: Implement step-middle and steps(x, middle) timing functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add comment to timing-functions test re. invalidity of step-middle in CSS Created 6 years, 10 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 public: 82 public:
83 BisonCSSParser(const CSSParserContext&, UseCounter* = 0); 83 BisonCSSParser(const CSSParserContext&, UseCounter* = 0);
84 84
85 ~BisonCSSParser(); 85 ~BisonCSSParser();
86 86
87 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals e); 87 void parseSheet(StyleSheetContents*, const String&, const TextPosition& star tPosition = TextPosition::minimumPosition(), CSSParserObserver* = 0, bool = fals e);
88 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&); 88 PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&);
89 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin g&); 89 PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const Strin g&);
90 bool parseSupportsCondition(const String&); 90 bool parseSupportsCondition(const String&);
91 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, CSSParserMode, StyleSheetContents*); 91 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, CSSParserMode, StyleSheetContents*, bool parseStepMiddleTimin gFunction = false);
92 static bool parseColor(RGBA32& color, const String&, bool strict = false); 92 static bool parseColor(RGBA32& color, const String&, bool strict = false);
93 static bool parseSystemColor(RGBA32& color, const String&, Document*); 93 static bool parseSystemColor(RGBA32& color, const String&, Document*);
94 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); 94 static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&);
95 static PassRefPtr<CSSValue> parseAnimationTimingFunctionValue(const String&) ; 95 static PassRefPtr<CSSValue> parseAnimationTimingFunctionValue(const String&, bool parseStepMiddleTimingFunction = false);
96 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse rValue*); 96 PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, CSSParse rValue*);
97 bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObse rver*, StyleSheetContents* contextStyleSheet); 97 bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObse rver*, StyleSheetContents* contextStyleSheet);
98 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con st String&, Element*); 98 static PassRefPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(con st String&, Element*);
99 PassRefPtr<MediaQuerySet> parseMediaQueryList(const String&); 99 PassRefPtr<MediaQuerySet> parseMediaQueryList(const String&);
100 PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&); 100 PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&);
101 101
102 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo ol important, bool implicit = false); 102 void addPropertyWithPrefixingVariant(CSSPropertyID, PassRefPtr<CSSValue>, bo ol important, bool implicit = false);
103 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i mplicit = false); 103 void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool i mplicit = false);
104 void rollbackLastProperties(int num); 104 void rollbackLastProperties(int num);
105 bool hasProperties() const { return !m_parsedProperties.isEmpty(); } 105 bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 unsigned m_numParsedPropertiesBeforeMarginBox; 376 unsigned m_numParsedPropertiesBeforeMarginBox;
377 377
378 int m_inParseShorthand; 378 int m_inParseShorthand;
379 CSSPropertyID m_currentShorthand; 379 CSSPropertyID m_currentShorthand;
380 bool m_implicitShorthand; 380 bool m_implicitShorthand;
381 381
382 bool m_hasFontFaceOnlyValues; 382 bool m_hasFontFaceOnlyValues;
383 bool m_hadSyntacticallyValidCSSRule; 383 bool m_hadSyntacticallyValidCSSRule;
384 bool m_logErrors; 384 bool m_logErrors;
385 bool m_ignoreErrors; 385 bool m_ignoreErrors;
386 bool m_parseStepMiddleTimingFunction;
386 387
387 AtomicString m_defaultNamespace; 388 AtomicString m_defaultNamespace;
388 389
389 // tokenizer methods and data 390 // tokenizer methods and data
390 CSSParserObserver* m_observer; 391 CSSParserObserver* m_observer;
391 392
392 // Local functions which just call into CSSParserObserver if non-null. 393 // Local functions which just call into CSSParserObserver if non-null.
393 void startRule(); 394 void startRule();
394 void endRule(bool valid); 395 void endRule(bool valid);
395 void startRuleHeader(CSSRuleSourceData::Type); 396 void startRuleHeader(CSSRuleSourceData::Type);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 bool isValidNthToken(const CSSParserString&); 630 bool isValidNthToken(const CSSParserString&);
630 631
631 inline int cssyylex(void* yylval, BisonCSSParser* parser) 632 inline int cssyylex(void* yylval, BisonCSSParser* parser)
632 { 633 {
633 return parser->m_tokenizer.lex(yylval); 634 return parser->m_tokenizer.lex(yylval);
634 } 635 }
635 636
636 } // namespace WebCore 637 } // namespace WebCore
637 638
638 #endif // CSSParser_h 639 #endif // CSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698