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

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

Issue 1863793003: Make CSSValuePool thread local to ensure correct parsing in colors on workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with master Created 4 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 // 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"
11 #include "core/css/CSSValuePool.h"
11 #include "core/css/parser/CSSParserMode.h" 12 #include "core/css/parser/CSSParserMode.h"
12 #include "platform/graphics/Color.h" 13 #include "platform/graphics/Color.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class CSSParserObserver; 17 class CSSParserObserver;
17 class CSSParserTokenRange; 18 class CSSParserTokenRange;
18 class CSSSelectorList; 19 class CSSSelectorList;
19 class Element; 20 class Element;
20 class ImmutableStylePropertySet; 21 class ImmutableStylePropertySet;
(...skipping 26 matching lines...) Expand all
47 48
48 static RawPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const S tring&, Element*); 49 static RawPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const S tring&, Element*);
49 50
50 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&); 51 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&);
51 static RawPtr<StyleRuleKeyframe> parseKeyframeRule(const CSSParserContext&, const String&); 52 static RawPtr<StyleRuleKeyframe> parseKeyframeRule(const CSSParserContext&, const String&);
52 53
53 static bool parseSupportsCondition(const String&); 54 static bool parseSupportsCondition(const String&);
54 55
55 // The color will only be changed when string contains a valid CSS color, so callers 56 // The color will only be changed when string contains a valid CSS color, so callers
56 // can set it to a default color and ignore the boolean result. 57 // can set it to a default color and ignore the boolean result.
57 static bool parseColor(Color&, const String&, bool strict = false); 58 static bool parseColor(Color&, const String&, CSSValuePool*, bool strict = f alse);
58 static bool parseSystemColor(Color&, const String&); 59 static bool parseSystemColor(Color&, const String&);
59 60
60 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&); 61 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&);
61 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&); 62 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&);
62 63
63 private: 64 private:
64 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&); 65 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&);
65 }; 66 };
66 67
67 } // namespace blink 68 } // namespace blink
68 69
69 #endif // CSSParser_h 70 #endif // CSSParser_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValuePool.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698