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

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

Issue 1320013005: Make CSSParserMode parameter not optional for MutableStylePropertySet::create() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/css/resolver/MatchResultTest.cpp » ('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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 { 71 {
72 return CSSParserImpl::parseValue(declaration, unresolvedProperty, string, im portant, context); 72 return CSSParserImpl::parseValue(declaration, unresolvedProperty, string, im portant, context);
73 } 73 }
74 74
75 PassRefPtrWillBeRawPtr<CSSValue> CSSParser::parseSingleValue(CSSPropertyID prope rtyID, const String& string, const CSSParserContext& context) 75 PassRefPtrWillBeRawPtr<CSSValue> CSSParser::parseSingleValue(CSSPropertyID prope rtyID, const String& string, const CSSParserContext& context)
76 { 76 {
77 if (string.isEmpty()) 77 if (string.isEmpty())
78 return nullptr; 78 return nullptr;
79 if (RefPtrWillBeRawPtr<CSSValue> value = CSSParserFastPaths::maybeParseValue (propertyID, string, context.mode())) 79 if (RefPtrWillBeRawPtr<CSSValue> value = CSSParserFastPaths::maybeParseValue (propertyID, string, context.mode()))
80 return value; 80 return value;
81 RefPtrWillBeRawPtr<MutableStylePropertySet> stylePropertySet = MutableStyleP ropertySet::create(); 81 RefPtrWillBeRawPtr<MutableStylePropertySet> stylePropertySet = MutableStyleP ropertySet::create(HTMLQuirksMode);
82 bool changed = parseValue(stylePropertySet.get(), propertyID, string, false, context); 82 bool changed = parseValue(stylePropertySet.get(), propertyID, string, false, context);
83 ASSERT_UNUSED(changed, changed == stylePropertySet->hasProperty(propertyID)) ; 83 ASSERT_UNUSED(changed, changed == stylePropertySet->hasProperty(propertyID)) ;
84 return stylePropertySet->getPropertyCSSValue(propertyID); 84 return stylePropertySet->getPropertyCSSValue(propertyID);
85 } 85 }
86 86
87 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDec laration(const String& styleString, Element* element) 87 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDec laration(const String& styleString, Element* element)
88 { 88 {
89 return CSSParserImpl::parseInlineStyleDeclaration(styleString, element); 89 return CSSParserImpl::parseInlineStyleDeclaration(styleString, element);
90 } 90 }
91 91
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 builder.appendLiteral(" : "); 157 builder.appendLiteral(" : ");
158 builder.append(propertyValue); 158 builder.append(propertyValue);
159 builder.appendLiteral("; }"); 159 builder.appendLiteral("; }");
160 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder .toString()); 160 RefPtrWillBeRawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder .toString());
161 if (!rule || !rule->isFontFaceRule()) 161 if (!rule || !rule->isFontFaceRule())
162 return nullptr; 162 return nullptr;
163 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro pertyID); 163 return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(pro pertyID);
164 } 164 }
165 165
166 } // namespace blink 166 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/css/resolver/MatchResultTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698