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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.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 CSSParserFastPaths_h 5 #ifndef CSSParserFastPaths_h
6 #define CSSParserFastPaths_h 6 #define CSSParserFastPaths_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CSSValueKeywords.h" 9 #include "core/CSSValueKeywords.h"
10 #include "core/css/CSSValuePool.h"
10 #include "platform/graphics/Color.h" 11 #include "platform/graphics/Color.h"
11 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
12 #include "wtf/Allocator.h" 13 #include "wtf/Allocator.h"
13 #include "wtf/Forward.h" 14 #include "wtf/Forward.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class CSSValue; 18 class CSSValue;
18 19
19 class CSSParserFastPaths { 20 class CSSParserFastPaths {
20 STATIC_ONLY(CSSParserFastPaths); 21 STATIC_ONLY(CSSParserFastPaths);
21 public: 22 public:
22 // Parses simple values like '10px' or 'green', but makes no guarantees 23 // Parses simple values like '10px' or 'green', but makes no guarantees
23 // about handling any property completely. 24 // about handling any property completely.
24 static RawPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, CSSPar serMode); 25 static RawPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, CSSPar serMode, CSSValuePool* localCSSValuePool = nullptr);
25 26
26 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar ser 27 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar ser
27 static bool isKeywordPropertyID(CSSPropertyID); 28 static bool isKeywordPropertyID(CSSPropertyID);
28 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID); 29 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID);
29 30
30 static RawPtr<CSSValue> parseColor(const String&, CSSParserMode); 31 static RawPtr<CSSValue> parseColor(const String&, CSSParserMode, CSSValuePoo l*);
31 }; 32 };
32 33
33 } // namespace blink 34 } // namespace blink
34 35
35 #endif // CSSParserFastPaths_h 36 #endif // CSSParserFastPaths_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698