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.
8 #include "core/css/parser/BisonCSSParser.h"
12 // This class serves as the public API for the css/parser subsystem
14 // FIXME: This should probably be a static-only class or a singleton class
18 explicit CSSParser(const CSSParserContext&);
20 bool parseDeclaration(MutableStylePropertySet*, const String&, CSSParserObserver*, StyleSheetContents* contextStyleSheet);
21 void parseSelector(const String&, CSSSelectorList&);
23 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const CSSParserContext&, StyleSheetContents*, const String&);
24 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const String&, const TextPosition& startPosition, CSSParserObserver*, bool logErrors = false);
25 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool important, CSSParserMode, StyleSheetContents*);
27 // This is for non-shorthands only
28 static PassRefPtrWillBeRawPtr<CSSValue> parseSingleValue(CSSPropertyID, const String&, const CSSParserContext& = strictCSSParserContext());
30 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const String&, Element*);
32 static PassOwnPtr<Vector<double> > parseKeyframeKeyList(const String&);
33 static PassRefPtrWillBeRawPtr<StyleKeyframe> parseKeyframeRule(const CSSParserContext&, StyleSheetContents*, const String&);
35 static bool parseSupportsCondition(const String&);
37 static bool parseColor(RGBA32& color, const String&, bool strict = false);
38 static bool parseSystemColor(RGBA32& color, const String&);
39 static StyleColor colorFromRGBColorString(const String&);
42 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String&, bool important, const CSSParserContext&);
44 BisonCSSParser m_bisonParser;
47 CSSPropertyID cssPropertyID(const String&);