| 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 3132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3143 numericValue = consumeInteger(range); | 3143 numericValue = consumeInteger(range); |
| 3144 spanValue = consumeIdent<CSSValueSpan>(range); | 3144 spanValue = consumeIdent<CSSValueSpan>(range); |
| 3145 if (!spanValue && !numericValue) | 3145 if (!spanValue && !numericValue) |
| 3146 return gridLineName; | 3146 return gridLineName; |
| 3147 } else { | 3147 } else { |
| 3148 return nullptr; | 3148 return nullptr; |
| 3149 } | 3149 } |
| 3150 } | 3150 } |
| 3151 } | 3151 } |
| 3152 | 3152 |
| 3153 if (spanValue && !numericValue && !gridLineName) |
| 3154 return nullptr; // "span" keyword alone is invalid. |
| 3153 if (spanValue && numericValue && numericValue->getIntValue() < 0) | 3155 if (spanValue && numericValue && numericValue->getIntValue() < 0) |
| 3154 return nullptr; // Negative numbers are not allowed for span. | 3156 return nullptr; // Negative numbers are not allowed for span. |
| 3155 if (numericValue && numericValue->getIntValue() == 0) | 3157 if (numericValue && numericValue->getIntValue() == 0) |
| 3156 return nullptr; // An <integer> value of zero makes the declaration inva
lid. | 3158 return nullptr; // An <integer> value of zero makes the declaration inva
lid. |
| 3157 | 3159 |
| 3158 CSSValueList* values = CSSValueList::createSpaceSeparated(); | 3160 CSSValueList* values = CSSValueList::createSpaceSeparated(); |
| 3159 if (spanValue) | 3161 if (spanValue) |
| 3160 values->append(spanValue); | 3162 values->append(spanValue); |
| 3161 if (numericValue) | 3163 if (numericValue) |
| 3162 values->append(numericValue); | 3164 values->append(numericValue); |
| (...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5031 case CSSPropertyGridTemplate: | 5033 case CSSPropertyGridTemplate: |
| 5032 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); | 5034 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); |
| 5033 case CSSPropertyGrid: | 5035 case CSSPropertyGrid: |
| 5034 return consumeGridShorthand(important); | 5036 return consumeGridShorthand(important); |
| 5035 default: | 5037 default: |
| 5036 return false; | 5038 return false; |
| 5037 } | 5039 } |
| 5038 } | 5040 } |
| 5039 | 5041 |
| 5040 } // namespace blink | 5042 } // namespace blink |
| OLD | NEW |