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

Side by Side Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPaintStroke.cpp

Issue 2808383008: Added unresolved property argument to ParseSingleValue method (Closed)
Patch Set: Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/properties/CSSPropertyAPIPaintStroke.h" 5 #include "core/css/properties/CSSPropertyAPIPaintStroke.h"
6 6
7 #include "core/css/CSSURIValue.h" 7 #include "core/css/CSSURIValue.h"
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/css/CSSValueList.h" 9 #include "core/css/CSSValueList.h"
10 #include "core/css/parser/CSSParserContext.h" 10 #include "core/css/parser/CSSParserContext.h"
11 #include "core/css/parser/CSSPropertyParserHelpers.h" 11 #include "core/css/parser/CSSPropertyParserHelpers.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 const CSSValue* CSSPropertyAPIPaintStroke::parseSingleValue( 15 const CSSValue* CSSPropertyAPIPaintStroke::parseSingleValue(
16 CSSParserTokenRange& range, 16 CSSParserTokenRange& range,
17 const CSSParserContext& context) { 17 const CSSParserContext& context,
18 CSSPropertyID) {
18 if (range.Peek().Id() == CSSValueNone) 19 if (range.Peek().Id() == CSSValueNone)
19 return CSSPropertyParserHelpers::ConsumeIdent(range); 20 return CSSPropertyParserHelpers::ConsumeIdent(range);
20 CSSURIValue* url = CSSPropertyParserHelpers::ConsumeUrl(range, &context); 21 CSSURIValue* url = CSSPropertyParserHelpers::ConsumeUrl(range, &context);
21 if (url) { 22 if (url) {
22 CSSValue* parsed_value = nullptr; 23 CSSValue* parsed_value = nullptr;
23 if (range.Peek().Id() == CSSValueNone) { 24 if (range.Peek().Id() == CSSValueNone) {
24 parsed_value = CSSPropertyParserHelpers::ConsumeIdent(range); 25 parsed_value = CSSPropertyParserHelpers::ConsumeIdent(range);
25 } else { 26 } else {
26 parsed_value = 27 parsed_value =
27 CSSPropertyParserHelpers::ConsumeColor(range, context.Mode()); 28 CSSPropertyParserHelpers::ConsumeColor(range, context.Mode());
28 } 29 }
29 if (parsed_value) { 30 if (parsed_value) {
30 CSSValueList* values = CSSValueList::CreateSpaceSeparated(); 31 CSSValueList* values = CSSValueList::CreateSpaceSeparated();
31 values->Append(*url); 32 values->Append(*url);
32 values->Append(*parsed_value); 33 values->Append(*parsed_value);
33 return values; 34 return values;
34 } 35 }
35 return url; 36 return url;
36 } 37 }
37 return CSSPropertyParserHelpers::ConsumeColor(range, context.Mode()); 38 return CSSPropertyParserHelpers::ConsumeColor(range, context.Mode());
38 } 39 }
39 40
40 } // namespace blink 41 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698