| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
|  | 2 // Use of this source code is governed by a BSD-style license that can be | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef CSSParser_h | 
|  | 6 #define CSSParser_h | 
|  | 7 | 
|  | 8 #include "core/css/parser/BisonCSSParser.h" | 
|  | 9 | 
|  | 10 namespace blink { | 
|  | 11 | 
|  | 12 // This class serves as the public API for the css/parser subsystem | 
|  | 13 | 
|  | 14 // FIXME: This should probably be a static-only class or a singleton class | 
|  | 15 class CSSParser { | 
|  | 16     STACK_ALLOCATED(); | 
|  | 17 public: | 
|  | 18     explicit CSSParser(const CSSParserContext&); | 
|  | 19 | 
|  | 20     bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObse
    rver*, StyleSheetContents* contextStyleSheet); | 
|  | 21     void parseSelector(const String&, CSSSelectorList&); | 
|  | 22 | 
|  | 23     static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const CSSParserContex
    t&, StyleSheetContents*, const String&); | 
|  | 24     static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S
    tring&, const TextPosition& startPosition, CSSParserObserver*, bool logErrors = 
    false); | 
|  | 25     // FIXME: Unify these two into a single function | 
|  | 26     static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
    &, bool important, CSSParserMode, StyleSheetContents*); | 
|  | 27     static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String
    &, bool important, const Document&); | 
|  | 28 | 
|  | 29     static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec
    laration(const String&, Element*); | 
|  | 30 | 
|  | 31     static PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&); | 
|  | 32     static PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(const CSSPars
    erContext&, StyleSheetContents*, const String&); | 
|  | 33 | 
|  | 34     static bool parseSupportsCondition(const String&); | 
|  | 35 | 
|  | 36     static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&); | 
|  | 37     static PassRefPtr<CSSValue> parseAnimationTimingFunctionValue(const String&)
    ; | 
|  | 38 | 
|  | 39     static bool parseColor(RGBA32& color, const String&, bool strict = false); | 
|  | 40     static bool parseSystemColor(RGBA32& color, const String&); | 
|  | 41     static StyleColor colorFromRGBColorString(const String&); | 
|  | 42 | 
|  | 43 private: | 
|  | 44     BisonCSSParser m_bisonParser; | 
|  | 45 }; | 
|  | 46 | 
|  | 47 CSSPropertyID cssPropertyID(const String&); | 
|  | 48 | 
|  | 49 } // namespace blink | 
|  | 50 | 
|  | 51 #endif // CSSParser_h | 
|  | 52 | 
| OLD | NEW | 
|---|