| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/css/parser/CSSParser.h" | 6 #include "core/css/parser/CSSParser.h" |
| 7 | 7 |
| 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 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 void CSSParser::parseDeclarationListForInspector(const CSSParserContext& context
, const String& declaration, CSSParserObserver& observer) | 28 void CSSParser::parseDeclarationListForInspector(const CSSParserContext& context
, const String& declaration, CSSParserObserver& observer) |
| 29 { | 29 { |
| 30 CSSParserImpl::parseDeclarationListForInspector(declaration, context, observ
er); | 30 CSSParserImpl::parseDeclarationListForInspector(declaration, context, observ
er); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void CSSParser::parseSelector(const CSSParserContext& context, const String& sel
ector, CSSSelectorList& selectorList) | 33 void CSSParser::parseSelector(const CSSParserContext& context, const String& sel
ector, CSSSelectorList& selectorList) |
| 34 { | 34 { |
| 35 CSSTokenizer::Scope scope(selector); | 35 CSSTokenizer::Scope scope(selector); |
| 36 CSSSelectorParser::parseSelector(scope.tokenRange(), context, starAtom, null
ptr, selectorList); | 36 CSSSelectorParser::parseSelector(scope.tokenRange(), context, nullptr, selec
torList); |
| 37 } | 37 } |
| 38 | 38 |
| 39 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex
t& context, StyleSheetContents* styleSheet, const String& rule) | 39 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex
t& context, StyleSheetContents* styleSheet, const String& rule) |
| 40 { | 40 { |
| 41 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al
lowImportRules); | 41 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al
lowImportRules); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text) | 44 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text) |
| 45 { | 45 { |
| 46 return CSSParserImpl::parseStyleSheet(text, context, styleSheet); | 46 return CSSParserImpl::parseStyleSheet(text, context, styleSheet); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 builder.appendLiteral(" : "); | 158 builder.appendLiteral(" : "); |
| 159 builder.append(propertyValue); | 159 builder.append(propertyValue); |
| 160 builder.appendLiteral("; }"); | 160 builder.appendLiteral("; }"); |
| 161 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder
.toString()); | 161 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder
.toString()); |
| 162 if (!rule || !rule->isFontFaceRule()) | 162 if (!rule || !rule->isFontFaceRule()) |
| 163 return nullptr; | 163 return nullptr; |
| 164 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro
pertyID); | 164 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro
pertyID); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |