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

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

Issue 1322543004: CSSStyleSheet::insertRule should respect the default namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/core/css/StyleSheetContents.cpp ('k') | 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/StylePropertySet.h" 10 #include "core/css/StylePropertySet.h"
(...skipping 15 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/parser/CSSParserImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698