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

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

Issue 1221303013: Allow parsing SVG <paint> and <color> properties in the color fast-path (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #include "config.h" 5 #include "config.h"
6 #include "core/css/parser/CSSParserFastPaths.h" 6 #include "core/css/parser/CSSParserFastPaths.h"
7 7
8 #include "core/StylePropertyShorthand.h" 8 #include "core/StylePropertyShorthand.h"
9 #include "core/css/CSSFunctionValue.h" 9 #include "core/css/CSSFunctionValue.h"
10 #include "core/css/CSSValuePool.h" 10 #include "core/css/CSSValuePool.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 static inline bool isColorPropertyID(CSSPropertyID propertyId) 121 static inline bool isColorPropertyID(CSSPropertyID propertyId)
122 { 122 {
123 switch (propertyId) { 123 switch (propertyId) {
124 case CSSPropertyColor: 124 case CSSPropertyColor:
125 case CSSPropertyBackgroundColor: 125 case CSSPropertyBackgroundColor:
126 case CSSPropertyBorderBottomColor: 126 case CSSPropertyBorderBottomColor:
127 case CSSPropertyBorderLeftColor: 127 case CSSPropertyBorderLeftColor:
128 case CSSPropertyBorderRightColor: 128 case CSSPropertyBorderRightColor:
129 case CSSPropertyBorderTopColor: 129 case CSSPropertyBorderTopColor:
130 case CSSPropertyFill:
131 case CSSPropertyFloodColor:
132 case CSSPropertyLightingColor:
130 case CSSPropertyOutlineColor: 133 case CSSPropertyOutlineColor:
134 case CSSPropertyStopColor:
135 case CSSPropertyStroke:
131 case CSSPropertyWebkitBorderAfterColor: 136 case CSSPropertyWebkitBorderAfterColor:
132 case CSSPropertyWebkitBorderBeforeColor: 137 case CSSPropertyWebkitBorderBeforeColor:
133 case CSSPropertyWebkitBorderEndColor: 138 case CSSPropertyWebkitBorderEndColor:
134 case CSSPropertyWebkitBorderStartColor: 139 case CSSPropertyWebkitBorderStartColor:
135 case CSSPropertyWebkitColumnRuleColor: 140 case CSSPropertyWebkitColumnRuleColor:
136 case CSSPropertyWebkitTextEmphasisColor: 141 case CSSPropertyWebkitTextEmphasisColor:
137 case CSSPropertyWebkitTextFillColor: 142 case CSSPropertyWebkitTextFillColor:
138 case CSSPropertyWebkitTextStrokeColor: 143 case CSSPropertyWebkitTextStrokeColor:
139 case CSSPropertyTextDecorationColor: 144 case CSSPropertyTextDecorationColor:
140 return true; 145 return true;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 if (isColorPropertyID(propertyID)) 954 if (isColorPropertyID(propertyID))
950 return parseColor(string, isQuirksModeBehavior(parserMode)); 955 return parseColor(string, isQuirksModeBehavior(parserMode));
951 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing)) 956 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing))
952 return keyword.release(); 957 return keyword.release();
953 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string)) 958 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string))
954 return transform.release(); 959 return transform.release();
955 return nullptr; 960 return nullptr;
956 } 961 }
957 962
958 } // namespace blink 963 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698