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

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

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some small fixes to (hopefully) fix some broken tests Created 5 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSParser_h 5 #ifndef CSSParser_h
6 #define CSSParser_h 6 #define CSSParser_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/css/CSSValue.h" 10 #include "core/css/CSSValue.h"
(...skipping 20 matching lines...) Expand all
31 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const CSSParserContex t&, const String&); 31 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const CSSParserContex t&, const String&);
32 // TODO(timloh): Split into parseSheet and parseSheetForInspector 32 // TODO(timloh): Split into parseSheet and parseSheetForInspector
33 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&, CSSParserObserver*); 33 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&, CSSParserObserver*);
34 static void parseSelector(const CSSParserContext&, const String&, CSSSelecto rList&); 34 static void parseSelector(const CSSParserContext&, const String&, CSSSelecto rList&);
35 // TODO(timloh): Split into parseDeclarationList and parseDeclarationListFor Inspector 35 // TODO(timloh): Split into parseDeclarationList and parseDeclarationListFor Inspector
36 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&, CSSParserObserver*); 36 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&, CSSParserObserver*);
37 // Returns whether anything was changed. 37 // Returns whether anything was changed.
38 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, CSSParserMode, StyleSheetContents*); 38 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, CSSParserMode, StyleSheetContents*);
39 39
40 // This is for non-shorthands only 40 // This is for non-shorthands only
41 static PassRefPtrWillBeRawPtr<CSSValue> parseSingleValue(CSSPropertyID, cons t String&, const CSSParserContext& = strictCSSParserContext()); 41 static NullableCSSValue parseSingleValue(CSSPropertyID, const String&, const CSSParserContext& = strictCSSParserContext());
42 42
43 static PassRefPtrWillBeRawPtr<CSSValue> parseFontFaceDescriptor(CSSPropertyI D, const String&, const CSSParserContext&); 43 static NullableCSSValue parseFontFaceDescriptor(CSSPropertyID, const String& , const CSSParserContext&);
44 44
45 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec laration(const String&, Element*); 45 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec laration(const String&, Element*);
46 46
47 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&); 47 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&);
48 static PassRefPtrWillBeRawPtr<StyleRuleKeyframe> parseKeyframeRule(const CSS ParserContext&, const String&); 48 static PassRefPtrWillBeRawPtr<StyleRuleKeyframe> parseKeyframeRule(const CSS ParserContext&, const String&);
49 49
50 static bool parseSupportsCondition(const String&); 50 static bool parseSupportsCondition(const String&);
51 51
52 // The color will only be changed when string contains a valid CSS color, so callers 52 // The color will only be changed when string contains a valid CSS color, so callers
53 // can set it to a default color and ignore the boolean result. 53 // can set it to a default color and ignore the boolean result.
54 static bool parseColor(RGBA32& color, const String&, bool strict = false); 54 static bool parseColor(RGBA32& color, const String&, bool strict = false);
55 static bool parseSystemColor(RGBA32& color, const String&); 55 static bool parseSystemColor(RGBA32& color, const String&);
56 static StyleColor colorFromRGBColorString(const String&); 56 static StyleColor colorFromRGBColorString(const String&);
57 57
58 private: 58 private:
59 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&); 59 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&);
60 }; 60 };
61 61
62 // TODO(timloh): It's weird that these are declared here but defined in CSSPrope rtyParser.h 62 // TODO(timloh): It's weird that these are declared here but defined in CSSPrope rtyParser.h
63 CSSPropertyID unresolvedCSSPropertyID(const String&); 63 CSSPropertyID unresolvedCSSPropertyID(const String&);
64 CSSPropertyID cssPropertyID(const String&); 64 CSSPropertyID cssPropertyID(const String&);
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // CSSParser_h 68 #endif // CSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698