OLD | NEW |
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/CSSPropertyAPIContent.h" | 5 #include "core/css/properties/CSSPropertyAPIContent.h" |
6 | 6 |
7 #include "core/CSSValueKeywords.h" | 7 #include "core/CSSValueKeywords.h" |
8 #include "core/css/CSSCounterValue.h" | 8 #include "core/css/CSSCounterValue.h" |
9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
10 #include "core/css/CSSStringValue.h" | 10 #include "core/css/CSSStringValue.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 if ((id != CSSValueNone && | 60 if ((id != CSSValueNone && |
61 (id < CSSValueDisc || id > CSSValueKatakanaIroha))) | 61 (id < CSSValueDisc || id > CSSValueKatakanaIroha))) |
62 return nullptr; | 62 return nullptr; |
63 list_style = CSSPropertyParserHelpers::ConsumeIdent(args); | 63 list_style = CSSPropertyParserHelpers::ConsumeIdent(args); |
64 } else { | 64 } else { |
65 list_style = CSSIdentifierValue::Create(CSSValueDecimal); | 65 list_style = CSSIdentifierValue::Create(CSSValueDecimal); |
66 } | 66 } |
67 | 67 |
68 if (!args.AtEnd()) | 68 if (!args.AtEnd()) |
69 return nullptr; | 69 return nullptr; |
70 return CSSCounterValue::Create(identifier, list_style, separator); | 70 return blink::CSSCounterValue::Create(identifier, list_style, separator); |
71 } | 71 } |
72 | 72 |
73 } // namespace | 73 } // namespace |
74 | 74 |
75 const CSSValue* CSSPropertyAPIContent::parseSingleValue( | 75 const CSSValue* CSSPropertyAPIContent::parseSingleValue( |
76 CSSParserTokenRange& range, | 76 CSSParserTokenRange& range, |
77 const CSSParserContext& context, | 77 const CSSParserContext& context, |
78 const CSSParserLocalContext&) { | 78 const CSSParserLocalContext&) { |
79 if (CSSPropertyParserHelpers::IdentMatches<CSSValueNone, CSSValueNormal>( | 79 if (CSSPropertyParserHelpers::IdentMatches<CSSValueNone, CSSValueNormal>( |
80 range.Peek().Id())) | 80 range.Peek().Id())) |
(...skipping 25 matching lines...) Expand all Loading... |
106 if (!parsed_value) | 106 if (!parsed_value) |
107 return nullptr; | 107 return nullptr; |
108 } | 108 } |
109 values->Append(*parsed_value); | 109 values->Append(*parsed_value); |
110 } while (!range.AtEnd()); | 110 } while (!range.AtEnd()); |
111 | 111 |
112 return values; | 112 return values; |
113 } | 113 } |
114 | 114 |
115 } // namespace blink | 115 } // namespace blink |
OLD | NEW |