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/StyleRule.h" | 10 #include "core/css/StyleRule.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 Vector<CSSParserToken> tokens; | 35 Vector<CSSParserToken> tokens; |
36 CSSTokenizer::tokenize(selector, tokens); | 36 CSSTokenizer::tokenize(selector, tokens); |
37 CSSSelectorParser::parseSelector(tokens, m_bisonParser.m_context, select
orList); | 37 CSSSelectorParser::parseSelector(tokens, m_bisonParser.m_context, select
orList); |
38 return; | 38 return; |
39 } | 39 } |
40 m_bisonParser.parseSelector(selector, selectorList); | 40 m_bisonParser.parseSelector(selector, selectorList); |
41 } | 41 } |
42 | 42 |
43 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex
t& context, StyleSheetContents* styleSheet, const String& rule) | 43 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex
t& context, StyleSheetContents* styleSheet, const String& rule) |
44 { | 44 { |
| 45 if (RuntimeEnabledFeatures::newCSSParserEnabled()) |
| 46 return CSSParserImpl::parseRule(rule, context); |
45 return BisonCSSParser(context).parseRule(styleSheet, rule); | 47 return BisonCSSParser(context).parseRule(styleSheet, rule); |
46 } | 48 } |
47 | 49 |
48 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text, const TextPosition& startPosition, CSSParserObse
rver* observer, bool logErrors) | 50 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents*
styleSheet, const String& text, const TextPosition& startPosition, CSSParserObse
rver* observer, bool logErrors) |
49 { | 51 { |
50 BisonCSSParser(context).parseSheet(styleSheet, text, startPosition, observer
, logErrors); | 52 BisonCSSParser(context).parseSheet(styleSheet, text, startPosition, observer
, logErrors); |
51 } | 53 } |
52 | 54 |
53 bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID p
ropertyID, const String& string, bool important, CSSParserMode parserMode, Style
SheetContents* styleSheet) | 55 bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID p
ropertyID, const String& string, bool important, CSSParserMode parserMode, Style
SheetContents* styleSheet) |
54 { | 56 { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 { | 122 { |
121 return BisonCSSParser::colorFromRGBColorString(string); | 123 return BisonCSSParser::colorFromRGBColorString(string); |
122 } | 124 } |
123 | 125 |
124 bool CSSParser::parseSystemColor(RGBA32& color, const String& colorString) | 126 bool CSSParser::parseSystemColor(RGBA32& color, const String& colorString) |
125 { | 127 { |
126 return BisonCSSParser::parseSystemColor(color, colorString); | 128 return BisonCSSParser::parseSystemColor(color, colorString); |
127 } | 129 } |
128 | 130 |
129 } // namespace blink | 131 } // namespace blink |
OLD | NEW |