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 "core/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
8 #include "core/css/CSSBasicShapeValues.h" | 8 #include "core/css/CSSBasicShapeValues.h" |
9 #include "core/css/CSSBorderImage.h" | 9 #include "core/css/CSSBorderImage.h" |
10 #include "core/css/CSSContentDistributionValue.h" | 10 #include "core/css/CSSContentDistributionValue.h" |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 StringBuilder builder; | 633 StringBuilder builder; |
634 bool addedSpace = false; | 634 bool addedSpace = false; |
635 const CSSParserToken& firstToken = range.peek(); | 635 const CSSParserToken& firstToken = range.peek(); |
636 while (range.peek().type() == IdentToken) { | 636 while (range.peek().type() == IdentToken) { |
637 if (!builder.isEmpty()) { | 637 if (!builder.isEmpty()) { |
638 builder.append(' '); | 638 builder.append(' '); |
639 addedSpace = true; | 639 addedSpace = true; |
640 } | 640 } |
641 builder.append(range.consumeIncludingWhitespace().value()); | 641 builder.append(range.consumeIncludingWhitespace().value()); |
642 } | 642 } |
643 if (!addedSpace && isCSSWideKeyword(firstToken.id())) | 643 if (!addedSpace && isCSSWideKeyword(firstToken.value())) |
644 return String(); | 644 return String(); |
645 return builder.toString(); | 645 return builder.toString(); |
646 } | 646 } |
647 | 647 |
648 static CSSValue* consumeFamilyName(CSSParserTokenRange& range) | 648 static CSSValue* consumeFamilyName(CSSParserTokenRange& range) |
649 { | 649 { |
650 if (range.peek().type() == StringToken) | 650 if (range.peek().type() == StringToken) |
651 return CSSFontFamilyValue::create(range.consumeIncludingWhitespace().val
ue().toString()); | 651 return CSSFontFamilyValue::create(range.consumeIncludingWhitespace().val
ue().toString()); |
652 if (range.peek().type() != IdentToken) | 652 if (range.peek().type() != IdentToken) |
653 return nullptr; | 653 return nullptr; |
(...skipping 4124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4778 case CSSPropertyGridTemplate: | 4778 case CSSPropertyGridTemplate: |
4779 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); | 4779 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); |
4780 case CSSPropertyGrid: | 4780 case CSSPropertyGrid: |
4781 return consumeGridShorthand(important); | 4781 return consumeGridShorthand(important); |
4782 default: | 4782 default: |
4783 return false; | 4783 return false; |
4784 } | 4784 } |
4785 } | 4785 } |
4786 | 4786 |
4787 } // namespace blink | 4787 } // namespace blink |
OLD | NEW |