| 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" |
| 11 #include "core/css/CSSValuePair.h" | 11 #include "core/css/CSSValuePair.h" |
| 12 #include "wtf/text/StringBuilder.h" | 12 #include "platform/wtf/text/StringBuilder.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 CSSValue* CSSPropertyFontUtils::ConsumeFontSize( | 16 CSSValue* CSSPropertyFontUtils::ConsumeFontSize( |
| 17 CSSParserTokenRange& range, | 17 CSSParserTokenRange& range, |
| 18 CSSParserMode css_parser_mode, | 18 CSSParserMode css_parser_mode, |
| 19 CSSPropertyParserHelpers::UnitlessQuirk unitless) { | 19 CSSPropertyParserHelpers::UnitlessQuirk unitless) { |
| 20 if (range.Peek().Id() >= CSSValueXxSmall && | 20 if (range.Peek().Id() >= CSSValueXxSmall && |
| 21 range.Peek().Id() <= CSSValueLarger) | 21 range.Peek().Id() <= CSSValueLarger) |
| 22 return CSSPropertyParserHelpers::ConsumeIdent(range); | 22 return CSSPropertyParserHelpers::ConsumeIdent(range); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |