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

Side by Side Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.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/CSSPropertyAPIShapeOutside.h" 5 #include "core/css/properties/CSSPropertyAPIShapeOutside.h"
6 6
7 #include "core/css/CSSValueList.h" 7 #include "core/css/CSSValueList.h"
8 #include "core/css/parser/CSSParserContext.h" 8 #include "core/css/parser/CSSParserContext.h"
9 #include "core/css/parser/CSSPropertyParserHelpers.h" 9 #include "core/css/parser/CSSPropertyParserHelpers.h"
10 #include "core/css/properties/CSSPropertyShapeUtils.h" 10 #include "core/css/properties/CSSPropertyShapeUtils.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 using namespace CSSPropertyParserHelpers; 14 using namespace CSSPropertyParserHelpers;
15 15
16 const CSSValue* CSSPropertyAPIShapeOutside::parseSingleValue( 16 const CSSValue* CSSPropertyAPIShapeOutside::parseSingleValue(
17 CSSParserTokenRange& range, 17 CSSParserTokenRange& range,
18 const CSSParserContext& context) { 18 const CSSParserContext& context,
19 CSSPropertyID) {
19 if (CSSValue* image_value = ConsumeImageOrNone(range, &context)) 20 if (CSSValue* image_value = ConsumeImageOrNone(range, &context))
20 return image_value; 21 return image_value;
21 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 22 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
22 if (CSSValue* box_value = ConsumeShapeBox(range)) 23 if (CSSValue* box_value = ConsumeShapeBox(range))
23 list->Append(*box_value); 24 list->Append(*box_value);
24 if (CSSValue* shape_value = 25 if (CSSValue* shape_value =
25 CSSPropertyShapeUtils::ConsumeBasicShape(range, &context)) { 26 CSSPropertyShapeUtils::ConsumeBasicShape(range, &context)) {
26 list->Append(*shape_value); 27 list->Append(*shape_value);
27 if (list->length() < 2) { 28 if (list->length() < 2) {
28 if (CSSValue* box_value = ConsumeShapeBox(range)) 29 if (CSSValue* box_value = ConsumeShapeBox(range))
29 list->Append(*box_value); 30 list->Append(*box_value);
30 } 31 }
31 } 32 }
32 if (!list->length()) 33 if (!list->length())
33 return nullptr; 34 return nullptr;
34 return list; 35 return list;
35 } 36 }
36 37
37 } // namespace blink 38 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698