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/CSSPropertyFontUtils.h" | 5 #include "core/css/properties/CSSPropertyFontUtils.h" |
6 | 6 |
7 #include "core/css/CSSFontFamilyValue.h" | 7 #include "core/css/CSSFontFamilyValue.h" |
8 #include "core/css/CSSFontFeatureValue.h" | 8 #include "core/css/CSSFontFeatureValue.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/CSSValueList.h" | 10 #include "core/css/CSSValueList.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 tag_value = clampTo<int>(range.ConsumeIncludingWhitespace().NumericValue()); | 154 tag_value = clampTo<int>(range.ConsumeIncludingWhitespace().NumericValue()); |
155 if (tag_value < 0) | 155 if (tag_value < 0) |
156 return nullptr; | 156 return nullptr; |
157 } else if (range.Peek().Id() == CSSValueOn || | 157 } else if (range.Peek().Id() == CSSValueOn || |
158 range.Peek().Id() == CSSValueOff) { | 158 range.Peek().Id() == CSSValueOff) { |
159 tag_value = range.ConsumeIncludingWhitespace().Id() == CSSValueOn; | 159 tag_value = range.ConsumeIncludingWhitespace().Id() == CSSValueOn; |
160 } | 160 } |
161 return CSSFontFeatureValue::Create(tag, tag_value); | 161 return CSSFontFeatureValue::Create(tag, tag_value); |
162 } | 162 } |
163 | 163 |
| 164 CSSIdentifierValue* CSSPropertyFontUtils::ConsumeFontVariantCSS21( |
| 165 CSSParserTokenRange& range) { |
| 166 return CSSPropertyParserHelpers::ConsumeIdent<CSSValueNormal, |
| 167 CSSValueSmallCaps>(range); |
| 168 } |
| 169 |
164 } // namespace blink | 170 } // namespace blink |
OLD | NEW |