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

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

Issue 1616423003: Fix selector namespace prefix resolution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issues Created 4 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
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 "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 13 matching lines...) Expand all
24 bool CSSParser::parseDeclarationList(const CSSParserContext& context, MutableSty lePropertySet* propertySet, const String& declaration) 24 bool CSSParser::parseDeclarationList(const CSSParserContext& context, MutableSty lePropertySet* propertySet, const String& declaration)
25 { 25 {
26 return CSSParserImpl::parseDeclarationList(propertySet, declaration, context ); 26 return CSSParserImpl::parseDeclarationList(propertySet, declaration, context );
27 } 27 }
28 28
29 void CSSParser::parseDeclarationListForInspector(const CSSParserContext& context , const String& declaration, CSSParserObserver& observer) 29 void CSSParser::parseDeclarationListForInspector(const CSSParserContext& context , const String& declaration, CSSParserObserver& observer)
30 { 30 {
31 CSSParserImpl::parseDeclarationListForInspector(declaration, context, observ er); 31 CSSParserImpl::parseDeclarationListForInspector(declaration, context, observ er);
32 } 32 }
33 33
34 CSSSelectorList CSSParser::parseSelector(const CSSParserContext& context, const String& selector) 34 CSSSelectorList CSSParser::parseSelector(const CSSParserContext& context, StyleS heetContents* styleSheetContents, const String& selector)
35 { 35 {
36 CSSTokenizer::Scope scope(selector); 36 CSSTokenizer::Scope scope(selector);
37 return CSSSelectorParser::parseSelector(scope.tokenRange(), context, nullptr ); 37 return CSSSelectorParser::parseSelector(scope.tokenRange(), context, styleSh eetContents);
38 } 38 }
39 39
40 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex t& context, StyleSheetContents* styleSheet, const String& rule) 40 PassRefPtrWillBeRawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContex t& context, StyleSheetContents* styleSheet, const String& rule)
41 { 41 {
42 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al lowImportRules); 42 return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::Al lowImportRules);
43 } 43 }
44 44
45 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents* styleSheet, const String& text) 45 void CSSParser::parseSheet(const CSSParserContext& context, StyleSheetContents* styleSheet, const String& text)
46 { 46 {
47 return CSSParserImpl::parseStyleSheet(text, context, styleSheet); 47 return CSSParserImpl::parseStyleSheet(text, context, styleSheet);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 builder.appendLiteral(" : "); 167 builder.appendLiteral(" : ");
168 builder.append(propertyValue); 168 builder.append(propertyValue);
169 builder.appendLiteral("; }"); 169 builder.appendLiteral("; }");
170 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder .toString()); 170 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder .toString());
171 if (!rule || !rule->isFontFaceRule()) 171 if (!rule || !rule->isFontFaceRule())
172 return nullptr; 172 return nullptr;
173 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro pertyID); 173 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro pertyID);
174 } 174 }
175 175
176 } // namespace blink 176 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParser.h ('k') | third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698