OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/parser/CSSPropertyParser.h" | 5 #include "core/css/parser/CSSPropertyParser.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
9 #include "core/css/CSSBasicShapeValues.h" | 9 #include "core/css/CSSBasicShapeValues.h" |
10 #include "core/css/CSSBorderImage.h" | 10 #include "core/css/CSSBorderImage.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 291 } |
292 | 292 |
293 static CSSIdentifierValue* ConsumeFontVariantCSS21(CSSParserTokenRange& range) { | 293 static CSSIdentifierValue* ConsumeFontVariantCSS21(CSSParserTokenRange& range) { |
294 return ConsumeIdent<CSSValueNormal, CSSValueSmallCaps>(range); | 294 return ConsumeIdent<CSSValueNormal, CSSValueSmallCaps>(range); |
295 } | 295 } |
296 | 296 |
297 static CSSValue* ConsumeFontVariantList(CSSParserTokenRange& range) { | 297 static CSSValue* ConsumeFontVariantList(CSSParserTokenRange& range) { |
298 CSSValueList* values = CSSValueList::CreateCommaSeparated(); | 298 CSSValueList* values = CSSValueList::CreateCommaSeparated(); |
299 do { | 299 do { |
300 if (range.Peek().Id() == CSSValueAll) { | 300 if (range.Peek().Id() == CSSValueAll) { |
301 // FIXME: CSSPropertyParser::parseFontVariant() implements | 301 // FIXME: CSSPropertyParser::ParseFontVariant() implements |
302 // the old css3 draft: | 302 // the old css3 draft: |
303 // http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/#font-variant | 303 // http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/#font-variant |
304 // 'all' is only allowed in @font-face and with no other values. | 304 // 'all' is only allowed in @font-face and with no other values. |
305 if (values->length()) | 305 if (values->length()) |
306 return nullptr; | 306 return nullptr; |
307 return ConsumeIdent(range); | 307 return ConsumeIdent(range); |
308 } | 308 } |
309 CSSIdentifierValue* font_variant = ConsumeFontVariantCSS21(range); | 309 CSSIdentifierValue* font_variant = ConsumeFontVariantCSS21(range); |
310 if (font_variant) | 310 if (font_variant) |
311 values->Append(*font_variant); | 311 values->Append(*font_variant); |
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3635 case CSSPropertyPlaceItems: | 3635 case CSSPropertyPlaceItems: |
3636 return ConsumePlaceItemsShorthand(important); | 3636 return ConsumePlaceItemsShorthand(important); |
3637 case CSSPropertyPlaceSelf: | 3637 case CSSPropertyPlaceSelf: |
3638 return ConsumePlaceSelfShorthand(important); | 3638 return ConsumePlaceSelfShorthand(important); |
3639 default: | 3639 default: |
3640 return false; | 3640 return false; |
3641 } | 3641 } |
3642 } | 3642 } |
3643 | 3643 |
3644 } // namespace blink | 3644 } // namespace blink |
OLD | NEW |