| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |