| 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 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3252 case CSSPropertyAnimationFillMode: | 3252 case CSSPropertyAnimationFillMode: |
| 3253 case CSSPropertyAnimationIterationCount: | 3253 case CSSPropertyAnimationIterationCount: |
| 3254 case CSSPropertyAnimationName: | 3254 case CSSPropertyAnimationName: |
| 3255 case CSSPropertyAnimationPlayState: | 3255 case CSSPropertyAnimationPlayState: |
| 3256 case CSSPropertyTransitionProperty: | 3256 case CSSPropertyTransitionProperty: |
| 3257 case CSSPropertyAnimationTimingFunction: | 3257 case CSSPropertyAnimationTimingFunction: |
| 3258 case CSSPropertyTransitionTimingFunction: | 3258 case CSSPropertyTransitionTimingFunction: |
| 3259 return consumeAnimationPropertyList(property, m_range, m_context, unreso
lvedProperty == CSSPropertyAliasWebkitAnimationName); | 3259 return consumeAnimationPropertyList(property, m_range, m_context, unreso
lvedProperty == CSSPropertyAliasWebkitAnimationName); |
| 3260 case CSSPropertyGridColumnGap: | 3260 case CSSPropertyGridColumnGap: |
| 3261 case CSSPropertyGridRowGap: | 3261 case CSSPropertyGridRowGap: |
| 3262 return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative); | 3262 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNe
gative); |
| 3263 case CSSPropertyShapeMargin: | 3263 case CSSPropertyShapeMargin: |
| 3264 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNe
gative); | 3264 return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNe
gative); |
| 3265 case CSSPropertyShapeImageThreshold: | 3265 case CSSPropertyShapeImageThreshold: |
| 3266 return consumeNumber(m_range, ValueRangeAll); | 3266 return consumeNumber(m_range, ValueRangeAll); |
| 3267 case CSSPropertyWebkitBoxOrdinalGroup: | 3267 case CSSPropertyWebkitBoxOrdinalGroup: |
| 3268 case CSSPropertyOrphans: | 3268 case CSSPropertyOrphans: |
| 3269 case CSSPropertyWidows: | 3269 case CSSPropertyWidows: |
| 3270 return consumePositiveInteger(m_range); | 3270 return consumePositiveInteger(m_range); |
| 3271 case CSSPropertyTextDecorationColor: | 3271 case CSSPropertyTextDecorationColor: |
| 3272 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); | 3272 ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4691 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro
undRepeatX : CSSPropertyWebkitMaskRepeatX, property, *resultX, important, implic
it); | 4691 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro
undRepeatX : CSSPropertyWebkitMaskRepeatX, property, *resultX, important, implic
it); |
| 4692 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro
undRepeatY : CSSPropertyWebkitMaskRepeatY, property, *resultY, important, implic
it); | 4692 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro
undRepeatY : CSSPropertyWebkitMaskRepeatY, property, *resultY, important, implic
it); |
| 4693 return true; | 4693 return true; |
| 4694 } | 4694 } |
| 4695 case CSSPropertyBackground: | 4695 case CSSPropertyBackground: |
| 4696 return consumeBackgroundShorthand(backgroundShorthand(), important); | 4696 return consumeBackgroundShorthand(backgroundShorthand(), important); |
| 4697 case CSSPropertyWebkitMask: | 4697 case CSSPropertyWebkitMask: |
| 4698 return consumeBackgroundShorthand(webkitMaskShorthand(), important); | 4698 return consumeBackgroundShorthand(webkitMaskShorthand(), important); |
| 4699 case CSSPropertyGridGap: { | 4699 case CSSPropertyGridGap: { |
| 4700 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() && shorthandForPro
perty(CSSPropertyGridGap).length() == 2); | 4700 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() && shorthandForPro
perty(CSSPropertyGridGap).length() == 2); |
| 4701 CSSValue* rowGap = consumeLength(m_range, m_context.mode(), ValueRangeNo
nNegative); | 4701 CSSValue* rowGap = consumeLengthOrPercent(m_range, m_context.mode(), Val
ueRangeNonNegative); |
| 4702 CSSValue* columnGap = consumeLength(m_range, m_context.mode(), ValueRang
eNonNegative); | 4702 CSSValue* columnGap = consumeLengthOrPercent(m_range, m_context.mode(),
ValueRangeNonNegative); |
| 4703 if (!rowGap || !m_range.atEnd()) | 4703 if (!rowGap || !m_range.atEnd()) |
| 4704 return false; | 4704 return false; |
| 4705 if (!columnGap) | 4705 if (!columnGap) |
| 4706 columnGap = rowGap; | 4706 columnGap = rowGap; |
| 4707 addProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, *rowGap, importan
t); | 4707 addProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, *rowGap, importan
t); |
| 4708 addProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap, *columnGap, im
portant); | 4708 addProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap, *columnGap, im
portant); |
| 4709 return true; | 4709 return true; |
| 4710 } | 4710 } |
| 4711 case CSSPropertyGridColumn: | 4711 case CSSPropertyGridColumn: |
| 4712 case CSSPropertyGridRow: | 4712 case CSSPropertyGridRow: |
| 4713 return consumeGridItemPositionShorthand(property, important); | 4713 return consumeGridItemPositionShorthand(property, important); |
| 4714 case CSSPropertyGridArea: | 4714 case CSSPropertyGridArea: |
| 4715 return consumeGridAreaShorthand(important); | 4715 return consumeGridAreaShorthand(important); |
| 4716 case CSSPropertyGridTemplate: | 4716 case CSSPropertyGridTemplate: |
| 4717 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); | 4717 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); |
| 4718 case CSSPropertyGrid: | 4718 case CSSPropertyGrid: |
| 4719 return consumeGridShorthand(important); | 4719 return consumeGridShorthand(important); |
| 4720 default: | 4720 default: |
| 4721 return false; | 4721 return false; |
| 4722 } | 4722 } |
| 4723 } | 4723 } |
| 4724 | 4724 |
| 4725 } // namespace blink | 4725 } // namespace blink |
| OLD | NEW |