| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 StyleRuleBase* CSSParser::parseRule(const CSSParserContext& context, | 56 StyleRuleBase* CSSParser::parseRule(const CSSParserContext& context, |
| 57 StyleSheetContents* styleSheet, | 57 StyleSheetContents* styleSheet, |
| 58 const String& rule) { | 58 const String& rule) { |
| 59 return CSSParserImpl::parseRule(rule, context, styleSheet, | 59 return CSSParserImpl::parseRule(rule, context, styleSheet, |
| 60 CSSParserImpl::AllowImportRules); | 60 CSSParserImpl::AllowImportRules); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void CSSParser::parseSheet(const CSSParserContext& context, | 63 void CSSParser::parseSheet(const CSSParserContext& context, |
| 64 StyleSheetContents* styleSheet, | 64 StyleSheetContents* styleSheet, |
| 65 const String& text) { | 65 const String& text, |
| 66 return CSSParserImpl::parseStyleSheet(text, context, styleSheet); | 66 bool deferPropertyParsing) { |
| 67 return CSSParserImpl::parseStyleSheet(text, context, styleSheet, |
| 68 deferPropertyParsing); |
| 67 } | 69 } |
| 68 | 70 |
| 69 void CSSParser::parseSheetForInspector(const CSSParserContext& context, | 71 void CSSParser::parseSheetForInspector(const CSSParserContext& context, |
| 70 StyleSheetContents* styleSheet, | 72 StyleSheetContents* styleSheet, |
| 71 const String& text, | 73 const String& text, |
| 72 CSSParserObserver& observer) { | 74 CSSParserObserver& observer) { |
| 73 return CSSParserImpl::parseStyleSheetForInspector(text, context, styleSheet, | 75 return CSSParserImpl::parseStyleSheetForInspector(text, context, styleSheet, |
| 74 observer); | 76 observer); |
| 75 } | 77 } |
| 76 | 78 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 builder.append(propertyValue); | 216 builder.append(propertyValue); |
| 215 builder.append("; }"); | 217 builder.append("; }"); |
| 216 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); | 218 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); |
| 217 if (!rule || !rule->isFontFaceRule()) | 219 if (!rule || !rule->isFontFaceRule()) |
| 218 return nullptr; | 220 return nullptr; |
| 219 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue( | 221 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue( |
| 220 propertyID); | 222 propertyID); |
| 221 } | 223 } |
| 222 | 224 |
| 223 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |