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

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

Issue 1304623002: Make blink classes and structures in core/css fast-allocated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing (Fixed windows compile error) Created 5 years, 4 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
« no previous file with comments | « Source/core/css/StyleRuleImport.h ('k') | Source/core/css/parser/CSSParserObserverWrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/graphics/Color.h" 10 #include "platform/graphics/Color.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "wtf/Allocator.h"
12 #include "wtf/Forward.h" 13 #include "wtf/Forward.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class CSSValue; 17 class CSSValue;
17 18
18 class CSSParserFastPaths { 19 class CSSParserFastPaths {
20 STATIC_ONLY(CSSParserFastPaths);
19 public: 21 public:
20 // Parses simple values like '10px' or 'green', but makes no guarantees 22 // Parses simple values like '10px' or 'green', but makes no guarantees
21 // about handling any property completely. 23 // about handling any property completely.
22 static PassRefPtrWillBeRawPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, CSSParserMode); 24 static PassRefPtrWillBeRawPtr<CSSValue> maybeParseValue(CSSPropertyID, const String&, CSSParserMode);
23 25
24 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar ser 26 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar ser
25 static bool isKeywordPropertyID(CSSPropertyID); 27 static bool isKeywordPropertyID(CSSPropertyID);
26 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID); 28 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID);
27 29
28 static PassRefPtrWillBeRawPtr<CSSValue> parseColor(const String&, CSSParserM ode); 30 static PassRefPtrWillBeRawPtr<CSSValue> parseColor(const String&, CSSParserM ode);
29 }; 31 };
30 32
31 } // namespace blink 33 } // namespace blink
32 34
33 #endif // CSSParserFastPaths_h 35 #endif // CSSParserFastPaths_h
OLDNEW
« no previous file with comments | « Source/core/css/StyleRuleImport.h ('k') | Source/core/css/parser/CSSParserObserverWrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698