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

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

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 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 #include "core/css/parser/CSSParser.h" 5 #include "core/css/parser/CSSParser.h"
6 6
7 #include "core/css/CSSColorValue.h" 7 #include "core/css/CSSColorValue.h"
8 #include "core/css/CSSKeyframeRule.h" 8 #include "core/css/CSSKeyframeRule.h"
9 #include "core/css/StyleColor.h" 9 #include "core/css/StyleColor.h"
10 #include "core/css/StylePropertySet.h" 10 #include "core/css/StylePropertySet.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (!CSSPropertyParser::isSystemColor(id)) 164 if (!CSSPropertyParser::isSystemColor(id))
165 return false; 165 return false;
166 166
167 color = LayoutTheme::theme().systemColor(id); 167 color = LayoutTheme::theme().systemColor(id);
168 return true; 168 return true;
169 } 169 }
170 170
171 CSSValue* CSSParser::parseFontFaceDescriptor(CSSPropertyID propertyID, const Str ing& propertyValue, const CSSParserContext& context) 171 CSSValue* CSSParser::parseFontFaceDescriptor(CSSPropertyID propertyID, const Str ing& propertyValue, const CSSParserContext& context)
172 { 172 {
173 StringBuilder builder; 173 StringBuilder builder;
174 builder.appendLiteral("@font-face { "); 174 builder.append("@font-face { ");
175 builder.append(getPropertyNameString(propertyID)); 175 builder.append(getPropertyNameString(propertyID));
176 builder.appendLiteral(" : "); 176 builder.append(" : ");
177 builder.append(propertyValue); 177 builder.append(propertyValue);
178 builder.appendLiteral("; }"); 178 builder.append("; }");
179 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); 179 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString());
180 if (!rule || !rule->isFontFaceRule()) 180 if (!rule || !rule->isFontFaceRule())
181 return nullptr; 181 return nullptr;
182 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI D); 182 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI D);
183 } 183 }
184 184
185 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRuleKeyframe.cpp ('k') | third_party/WebKit/Source/core/dom/DatasetDOMStringMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698