| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 { | 42 { |
| 43 CSSTokenizer::Scope scope(selector); | 43 CSSTokenizer::Scope scope(selector); |
| 44 return CSSParserImpl::parsePageSelector(scope.tokenRange(), styleSheetConten
ts); | 44 return CSSParserImpl::parsePageSelector(scope.tokenRange(), styleSheetConten
ts); |
| 45 } | 45 } |
| 46 | 46 |
| 47 StyleRuleBase* CSSParser::parseRule(const CSSParserContext& context, StyleSheetC
ontents* styleSheet, const String& rule) | 47 StyleRuleBase* CSSParser::parseRule(const CSSParserContext& context, StyleSheetC
ontents* styleSheet, const String& rule) |
| 48 { | 48 { |
| 49 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al
lowImportRules); | 49 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al
lowImportRules); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text) | 52 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text, bool deferPropertyParsing) |
| 53 { | 53 { |
| 54 return CSSParserImpl::parseStyleSheet(text, context, styleSheet); | 54 return CSSParserImpl::parseStyleSheet(text, context, styleSheet, deferProper
tyParsing); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void CSSParser::parseSheetForInspector(const CSSParserContext& context, StyleShe
etContents* styleSheet, const String& text, CSSParserObserver& observer) | 57 void CSSParser::parseSheetForInspector(const CSSParserContext& context, StyleShe
etContents* styleSheet, const String& text, CSSParserObserver& observer) |
| 58 { | 58 { |
| 59 return CSSParserImpl::parseStyleSheetForInspector(text, context, styleSheet,
observer); | 59 return CSSParserImpl::parseStyleSheetForInspector(text, context, styleSheet,
observer); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID u
nresolvedProperty, const String& string, bool important, StyleSheetContents* sty
leSheet) | 62 bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID u
nresolvedProperty, const String& string, bool important, StyleSheetContents* sty
leSheet) |
| 63 { | 63 { |
| 64 if (string.isEmpty()) | 64 if (string.isEmpty()) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 builder.append(" : "); | 175 builder.append(" : "); |
| 176 builder.append(propertyValue); | 176 builder.append(propertyValue); |
| 177 builder.append("; }"); | 177 builder.append("; }"); |
| 178 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); | 178 StyleRuleBase* rule = parseRule(context, nullptr, builder.toString()); |
| 179 if (!rule || !rule->isFontFaceRule()) | 179 if (!rule || !rule->isFontFaceRule()) |
| 180 return nullptr; | 180 return nullptr; |
| 181 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI
D); | 181 return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyI
D); |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| OLD | NEW |