Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: Source/core/css/parser/CSSParser.cpp

Issue 799003003: CSS Parser: Implement parseRule (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@attoken
Patch Set: rebase/address comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698