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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 parsedLonghand[i] = true; | 1289 parsedLonghand[i] = true; |
1290 foundProperty = true; | 1290 foundProperty = true; |
1291 longhands[i]->append(*value); | 1291 longhands[i]->append(*value); |
1292 break; | 1292 break; |
1293 } | 1293 } |
1294 } | 1294 } |
1295 if (!foundProperty) | 1295 if (!foundProperty) |
1296 return false; | 1296 return false; |
1297 } while (!m_range.atEnd() && m_range.peek().type() != CommaToken); | 1297 } while (!m_range.atEnd() && m_range.peek().type() != CommaToken); |
1298 | 1298 |
1299 // TODO(timloh): This will make invalid longhands, see crbug.com/386459 | |
1300 for (size_t i = 0; i < longhandCount; ++i) { | 1299 for (size_t i = 0; i < longhandCount; ++i) { |
1301 if (!parsedLonghand[i]) | 1300 if (!parsedLonghand[i]) |
1302 longhands[i]->append(*CSSInitialValue::createLegacyImplicit()); | 1301 longhands[i]->append(*CSSPropertyMetadata::initialValue(shorthan
d.properties()[i])); |
1303 parsedLonghand[i] = false; | 1302 parsedLonghand[i] = false; |
1304 } | 1303 } |
1305 } while (consumeCommaIncludingWhitespace(m_range)); | 1304 } while (consumeCommaIncludingWhitespace(m_range)); |
1306 | 1305 |
1307 for (size_t i = 0; i < longhandCount; ++i) { | 1306 for (size_t i = 0; i < longhandCount; ++i) { |
1308 if (!isValidAnimationPropertyList(shorthand.properties()[i], *longhands[
i])) | 1307 if (!isValidAnimationPropertyList(shorthand.properties()[i], *longhands[
i])) |
1309 return false; | 1308 return false; |
1310 } | 1309 } |
1311 | 1310 |
1312 for (size_t i = 0; i < longhandCount; ++i) | 1311 for (size_t i = 0; i < longhandCount; ++i) |
(...skipping 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3923 foundLonghand = true; | 3922 foundLonghand = true; |
3924 } | 3923 } |
3925 if (!foundLonghand) | 3924 if (!foundLonghand) |
3926 return false; | 3925 return false; |
3927 } while (!m_range.atEnd()); | 3926 } while (!m_range.atEnd()); |
3928 | 3927 |
3929 for (size_t i = 0; i < shorthand.length(); ++i) { | 3928 for (size_t i = 0; i < shorthand.length(); ++i) { |
3930 if (longhands[i]) | 3929 if (longhands[i]) |
3931 addProperty(shorthandProperties[i], shorthand.id(), *longhands[i], i
mportant); | 3930 addProperty(shorthandProperties[i], shorthand.id(), *longhands[i], i
mportant); |
3932 else | 3931 else |
3933 addProperty(shorthandProperties[i], shorthand.id(), *CSSInitialValue
::createLegacyImplicit(), important); | 3932 addProperty(shorthandProperties[i], shorthand.id(), *CSSPropertyMeta
data::initialValue(shorthandProperties[i]), important); |
3934 } | 3933 } |
3935 return true; | 3934 return true; |
3936 } | 3935 } |
3937 | 3936 |
3938 bool CSSPropertyParser::consumeFlex(bool important) | 3937 bool CSSPropertyParser::consumeFlex(bool important) |
3939 { | 3938 { |
3940 static const double unsetValue = -1; | 3939 static const double unsetValue = -1; |
3941 double flexGrow = unsetValue; | 3940 double flexGrow = unsetValue; |
3942 double flexShrink = unsetValue; | 3941 double flexShrink = unsetValue; |
3943 CSSPrimitiveValue* flexBasis = nullptr; | 3942 CSSPrimitiveValue* flexBasis = nullptr; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4011 if (color) | 4010 if (color) |
4012 continue; | 4011 continue; |
4013 } | 4012 } |
4014 break; | 4013 break; |
4015 } | 4014 } |
4016 | 4015 |
4017 if (!width && !style && !color) | 4016 if (!width && !style && !color) |
4018 return false; | 4017 return false; |
4019 | 4018 |
4020 if (!width) | 4019 if (!width) |
4021 width = CSSInitialValue::createLegacyImplicit(); | 4020 width = CSSPropertyMetadata::initialValue(CSSPropertyBorderWidth); |
4022 if (!style) | 4021 if (!style) |
4023 style = CSSInitialValue::createLegacyImplicit(); | 4022 style = CSSPropertyMetadata::initialValue(CSSPropertyBorderStyle); |
4024 if (!color) | 4023 if (!color) |
4025 color = CSSInitialValue::createLegacyImplicit(); | 4024 color = CSSPropertyMetadata::initialValue(CSSPropertyBorderColor); |
4026 | 4025 |
4027 addExpandedPropertyForValue(CSSPropertyBorderWidth, *width, important); | 4026 addExpandedPropertyForValue(CSSPropertyBorderWidth, *width, important); |
4028 addExpandedPropertyForValue(CSSPropertyBorderStyle, *style, important); | 4027 addExpandedPropertyForValue(CSSPropertyBorderStyle, *style, important); |
4029 addExpandedPropertyForValue(CSSPropertyBorderColor, *color, important); | 4028 addExpandedPropertyForValue(CSSPropertyBorderColor, *color, important); |
4030 addExpandedPropertyForValue(CSSPropertyBorderImage, *CSSInitialValue::create
LegacyImplicit(), important); | 4029 addProperty(CSSPropertyBorderImageSource, CSSPropertyBorderImage, *CSSProper
tyMetadata::initialValue(CSSPropertyBorderImageSource), important); |
4031 | 4030 addProperty(CSSPropertyBorderImageSlice, CSSPropertyBorderImage, *CSSPropert
yMetadata::initialValue(CSSPropertyBorderImageSlice), important); |
| 4031 addProperty(CSSPropertyBorderImageWidth, CSSPropertyBorderImage, *CSSPropert
yMetadata::initialValue(CSSPropertyBorderImageWidth), important); |
| 4032 addProperty(CSSPropertyBorderImageOutset, CSSPropertyBorderImage, *CSSProper
tyMetadata::initialValue(CSSPropertyBorderImageOutset), important); |
| 4033 addProperty(CSSPropertyBorderImageRepeat, CSSPropertyBorderImage, *CSSProper
tyMetadata::initialValue(CSSPropertyBorderImageRepeat), important); |
4032 return m_range.atEnd(); | 4034 return m_range.atEnd(); |
4033 } | 4035 } |
4034 | 4036 |
4035 bool CSSPropertyParser::consume4Values(const StylePropertyShorthand& shorthand,
bool important) | 4037 bool CSSPropertyParser::consume4Values(const StylePropertyShorthand& shorthand,
bool important) |
4036 { | 4038 { |
4037 ASSERT(shorthand.length() == 4); | 4039 ASSERT(shorthand.length() == 4); |
4038 const CSSPropertyID* longhands = shorthand.properties(); | 4040 const CSSPropertyID* longhands = shorthand.properties(); |
4039 const CSSValue* top = parseSingleValue(longhands[0], shorthand.id()); | 4041 const CSSValue* top = parseSingleValue(longhands[0], shorthand.id()); |
4040 if (!top) | 4042 if (!top) |
4041 return false; | 4043 return false; |
(...skipping 25 matching lines...) Expand all Loading... |
4067 bool CSSPropertyParser::consumeBorderImage(CSSPropertyID property, bool importan
t) | 4069 bool CSSPropertyParser::consumeBorderImage(CSSPropertyID property, bool importan
t) |
4068 { | 4070 { |
4069 CSSValue* source = nullptr; | 4071 CSSValue* source = nullptr; |
4070 CSSValue* slice = nullptr; | 4072 CSSValue* slice = nullptr; |
4071 CSSValue* width = nullptr; | 4073 CSSValue* width = nullptr; |
4072 CSSValue* outset = nullptr; | 4074 CSSValue* outset = nullptr; |
4073 CSSValue* repeat = nullptr; | 4075 CSSValue* repeat = nullptr; |
4074 if (consumeBorderImageComponents(property, m_range, m_context, source, slice
, width, outset, repeat)) { | 4076 if (consumeBorderImageComponents(property, m_range, m_context, source, slice
, width, outset, repeat)) { |
4075 switch (property) { | 4077 switch (property) { |
4076 case CSSPropertyWebkitMaskBoxImage: | 4078 case CSSPropertyWebkitMaskBoxImage: |
4077 addProperty(CSSPropertyWebkitMaskBoxImageSource, CSSPropertyWebkitMa
skBoxImage, source ? *source : *CSSInitialValue::createLegacyImplicit(), importa
nt); | 4079 addProperty(CSSPropertyWebkitMaskBoxImageSource, CSSPropertyWebkitMa
skBoxImage, source ? *source : *CSSPropertyMetadata::initialValue(CSSPropertyWeb
kitMaskBoxImageSource), important); |
4078 addProperty(CSSPropertyWebkitMaskBoxImageSlice, CSSPropertyWebkitMas
kBoxImage, slice ? *slice : *CSSInitialValue::createLegacyImplicit(), important)
; | 4080 addProperty(CSSPropertyWebkitMaskBoxImageSlice, CSSPropertyWebkitMas
kBoxImage, slice ? *slice : *CSSPropertyMetadata::initialValue(CSSPropertyWebkit
MaskBoxImageSlice), important); |
4079 addProperty(CSSPropertyWebkitMaskBoxImageWidth, CSSPropertyWebkitMas
kBoxImage, width ? *width : *CSSInitialValue::createLegacyImplicit(), important)
; | 4081 addProperty(CSSPropertyWebkitMaskBoxImageWidth, CSSPropertyWebkitMas
kBoxImage, width ? *width : *CSSPropertyMetadata::initialValue(CSSPropertyWebkit
MaskBoxImageWidth), important); |
4080 addProperty(CSSPropertyWebkitMaskBoxImageOutset, CSSPropertyWebkitMa
skBoxImage, outset ? *outset : *CSSInitialValue::createLegacyImplicit(), importa
nt); | 4082 addProperty(CSSPropertyWebkitMaskBoxImageOutset, CSSPropertyWebkitMa
skBoxImage, outset ? *outset : *CSSPropertyMetadata::initialValue(CSSPropertyWeb
kitMaskBoxImageOutset), important); |
4081 addProperty(CSSPropertyWebkitMaskBoxImageRepeat, CSSPropertyWebkitMa
skBoxImage, repeat ? *repeat : *CSSInitialValue::createLegacyImplicit(), importa
nt); | 4083 addProperty(CSSPropertyWebkitMaskBoxImageRepeat, CSSPropertyWebkitMa
skBoxImage, repeat ? *repeat : *CSSPropertyMetadata::initialValue(CSSPropertyWeb
kitMaskBoxImageRepeat), important); |
4082 return true; | 4084 return true; |
4083 case CSSPropertyBorderImage: | 4085 case CSSPropertyBorderImage: |
4084 addProperty(CSSPropertyBorderImageSource, CSSPropertyBorderImage, so
urce ? *source : *CSSInitialValue::createLegacyImplicit(), important); | 4086 addProperty(CSSPropertyBorderImageSource, CSSPropertyBorderImage, so
urce ? *source : *CSSPropertyMetadata::initialValue(CSSPropertyBorderImageSource
), important); |
4085 addProperty(CSSPropertyBorderImageSlice, CSSPropertyBorderImage, sli
ce ? *slice : *CSSInitialValue::createLegacyImplicit(), important); | 4087 addProperty(CSSPropertyBorderImageSlice, CSSPropertyBorderImage, sli
ce ? *slice : *CSSPropertyMetadata::initialValue(CSSPropertyBorderImageSlice), i
mportant); |
4086 addProperty(CSSPropertyBorderImageWidth, CSSPropertyBorderImage, wid
th ? *width : *CSSInitialValue::createLegacyImplicit(), important); | 4088 addProperty(CSSPropertyBorderImageWidth, CSSPropertyBorderImage, wid
th ? *width : *CSSPropertyMetadata::initialValue(CSSPropertyBorderImageWidth), i
mportant); |
4087 addProperty(CSSPropertyBorderImageOutset, CSSPropertyBorderImage, ou
tset ? *outset : *CSSInitialValue::createLegacyImplicit(), important); | 4089 addProperty(CSSPropertyBorderImageOutset, CSSPropertyBorderImage, ou
tset ? *outset : *CSSPropertyMetadata::initialValue(CSSPropertyBorderImageOutset
), important); |
4088 addProperty(CSSPropertyBorderImageRepeat, CSSPropertyBorderImage, re
peat ? *repeat : *CSSInitialValue::createLegacyImplicit(), important); | 4090 addProperty(CSSPropertyBorderImageRepeat, CSSPropertyBorderImage, re
peat ? *repeat : *CSSPropertyMetadata::initialValue(CSSPropertyBorderImageRepeat
), important); |
4089 return true; | 4091 return true; |
4090 default: | 4092 default: |
4091 ASSERT_NOT_REACHED(); | 4093 ASSERT_NOT_REACHED(); |
4092 return false; | 4094 return false; |
4093 } | 4095 } |
4094 } | 4096 } |
4095 return false; | 4097 return false; |
4096 } | 4098 } |
4097 | 4099 |
4098 static inline CSSValueID mapFromPageBreakBetween(CSSValueID value) | 4100 static inline CSSValueID mapFromPageBreakBetween(CSSValueID value) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4266 if (valueY) { | 4268 if (valueY) { |
4267 parsedLonghand[i + 1] = true; | 4269 parsedLonghand[i + 1] = true; |
4268 addBackgroundValue(longhands[i + 1], valueY); | 4270 addBackgroundValue(longhands[i + 1], valueY); |
4269 } | 4271 } |
4270 } | 4272 } |
4271 } | 4273 } |
4272 if (!foundProperty) | 4274 if (!foundProperty) |
4273 return false; | 4275 return false; |
4274 } while (!m_range.atEnd() && m_range.peek().type() != CommaToken); | 4276 } while (!m_range.atEnd() && m_range.peek().type() != CommaToken); |
4275 | 4277 |
4276 // TODO(timloh): This will make invalid longhands, see crbug.com/386459 | |
4277 for (size_t i = 0; i < longhandCount; ++i) { | 4278 for (size_t i = 0; i < longhandCount; ++i) { |
4278 CSSPropertyID property = shorthand.properties()[i]; | 4279 CSSPropertyID property = shorthand.properties()[i]; |
4279 if (property == CSSPropertyBackgroundColor && !m_range.atEnd()) { | 4280 if (property == CSSPropertyBackgroundColor && !m_range.atEnd()) { |
4280 if (parsedLonghand[i]) | 4281 if (parsedLonghand[i]) |
4281 return false; // Colors are only allowed in the last layer. | 4282 return false; // Colors are only allowed in the last layer. |
4282 continue; | 4283 continue; |
4283 } | 4284 } |
4284 if ((property == CSSPropertyBackgroundClip || property == CSSPropert
yWebkitMaskClip) && !parsedLonghand[i] && originValue) { | 4285 if ((property == CSSPropertyBackgroundClip || property == CSSPropert
yWebkitMaskClip) && !parsedLonghand[i] && originValue) { |
4285 addBackgroundValue(longhands[i], originValue); | 4286 addBackgroundValue(longhands[i], originValue); |
4286 continue; | 4287 continue; |
4287 } | 4288 } |
4288 if (!parsedLonghand[i]) | 4289 if (!parsedLonghand[i]) |
4289 addBackgroundValue(longhands[i], CSSInitialValue::createLegacyIm
plicit()); | 4290 addBackgroundValue(longhands[i], CSSPropertyMetadata::initialVal
ue(property)); |
4290 } | 4291 } |
4291 } while (consumeCommaIncludingWhitespace(m_range)); | 4292 } while (consumeCommaIncludingWhitespace(m_range)); |
4292 if (!m_range.atEnd()) | 4293 if (!m_range.atEnd()) |
4293 return false; | 4294 return false; |
4294 | 4295 |
4295 for (size_t i = 0; i < longhandCount; ++i) { | 4296 for (size_t i = 0; i < longhandCount; ++i) { |
4296 CSSPropertyID property = shorthand.properties()[i]; | 4297 CSSPropertyID property = shorthand.properties()[i]; |
4297 if (property == CSSPropertyBackgroundSize && longhands[i] && m_context.u
seLegacyBackgroundSizeShorthandBehavior()) | 4298 if (property == CSSPropertyBackgroundSize && longhands[i] && m_context.u
seLegacyBackgroundSizeShorthandBehavior()) |
4298 continue; | 4299 continue; |
4299 addProperty(property, shorthand.id(), *longhands[i], important, implicit
); | 4300 addProperty(property, shorthand.id(), *longhands[i], important, implicit
); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4459 { | 4460 { |
4460 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 4461 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
4461 ASSERT(shorthandForProperty(CSSPropertyGrid).length() == 8); | 4462 ASSERT(shorthandForProperty(CSSPropertyGrid).length() == 8); |
4462 | 4463 |
4463 CSSParserTokenRange rangeCopy = m_range; | 4464 CSSParserTokenRange rangeCopy = m_range; |
4464 | 4465 |
4465 // 1- <grid-template> | 4466 // 1- <grid-template> |
4466 if (consumeGridTemplateShorthand(CSSPropertyGrid, important)) { | 4467 if (consumeGridTemplateShorthand(CSSPropertyGrid, important)) { |
4467 // It can only be specified the explicit or the implicit grid properties
in a single grid declaration. | 4468 // It can only be specified the explicit or the implicit grid properties
in a single grid declaration. |
4468 // The sub-properties not specified are set to their initial value, as n
ormal for shorthands. | 4469 // The sub-properties not specified are set to their initial value, as n
ormal for shorthands. |
4469 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *CSSInitialValue::
createLegacyImplicit(), important); | 4470 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *CSSPropertyMetada
ta::initialValue(CSSPropertyGridAutoFlow), important); |
4470 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *CSSInitialValu
e::createLegacyImplicit(), important); | 4471 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *CSSPropertyMet
adata::initialValue(CSSPropertyGridAutoColumns), important); |
4471 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *CSSInitialValue::
createLegacyImplicit(), important); | 4472 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *CSSPropertyMetada
ta::initialValue(CSSPropertyGridAutoRows), important); |
4472 addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSInitialValue:
:createLegacyImplicit(), important); | 4473 addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSPropertyMetad
ata::initialValue(CSSPropertyGridColumnGap), important); |
4473 addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSInitialValue::cr
eateLegacyImplicit(), important); | 4474 addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSPropertyMetadata
::initialValue(CSSPropertyGridRowGap), important); |
4474 return true; | 4475 return true; |
4475 } | 4476 } |
4476 | 4477 |
4477 m_range = rangeCopy; | 4478 m_range = rangeCopy; |
4478 | 4479 |
4479 // 2- <grid-auto-flow> [ <grid-auto-rows> [ / <grid-auto-columns> ]? ] | 4480 // 2- <grid-auto-flow> [ <grid-auto-rows> [ / <grid-auto-columns> ]? ] |
4480 CSSValueList* gridAutoFlow = consumeGridAutoFlow(m_range); | 4481 CSSValueList* gridAutoFlow = consumeGridAutoFlow(m_range); |
4481 if (!gridAutoFlow) | 4482 if (!gridAutoFlow) |
4482 return false; | 4483 return false; |
4483 | 4484 |
4484 CSSValue* autoColumnsValue = nullptr; | 4485 CSSValue* autoColumnsValue = nullptr; |
4485 CSSValue* autoRowsValue = nullptr; | 4486 CSSValue* autoRowsValue = nullptr; |
4486 | 4487 |
4487 if (!m_range.atEnd()) { | 4488 if (!m_range.atEnd()) { |
4488 autoRowsValue = consumeGridTrackList(m_range, m_context.mode(), GridAuto
); | 4489 autoRowsValue = consumeGridTrackList(m_range, m_context.mode(), GridAuto
); |
4489 if (!autoRowsValue) | 4490 if (!autoRowsValue) |
4490 return false; | 4491 return false; |
4491 if (consumeSlashIncludingWhitespace(m_range)) { | 4492 if (consumeSlashIncludingWhitespace(m_range)) { |
4492 autoColumnsValue = consumeGridTrackList(m_range, m_context.mode(), G
ridAuto); | 4493 autoColumnsValue = consumeGridTrackList(m_range, m_context.mode(), G
ridAuto); |
4493 if (!autoColumnsValue) | 4494 if (!autoColumnsValue) |
4494 return false; | 4495 return false; |
4495 } | 4496 } |
4496 if (!m_range.atEnd()) | 4497 if (!m_range.atEnd()) |
4497 return false; | 4498 return false; |
4498 } else { | 4499 } else { |
4499 // Other omitted values are set to their initial values. | 4500 // Other omitted values are set to their initial values. |
4500 autoColumnsValue = CSSInitialValue::createLegacyImplicit(); | 4501 autoColumnsValue = CSSPropertyMetadata::initialValue(CSSPropertyGridAuto
Columns); |
4501 autoRowsValue = CSSInitialValue::createLegacyImplicit(); | 4502 autoRowsValue = CSSPropertyMetadata::initialValue(CSSPropertyGridAutoRow
s); |
4502 } | 4503 } |
4503 | 4504 |
4504 // if <grid-auto-columns> value is omitted, it is set to the value specified
for grid-auto-rows. | 4505 // if <grid-auto-columns> value is omitted, it is set to the value specified
for grid-auto-rows. |
4505 if (!autoColumnsValue) | 4506 if (!autoColumnsValue) |
4506 autoColumnsValue = autoRowsValue; | 4507 autoColumnsValue = autoRowsValue; |
4507 | 4508 |
4508 // It can only be specified the explicit or the implicit grid properties in
a single grid declaration. | 4509 // It can only be specified the explicit or the implicit grid properties in
a single grid declaration. |
4509 // The sub-properties not specified are set to their initial value, as norma
l for shorthands. | 4510 // The sub-properties not specified are set to their initial value, as norma
l for shorthands. |
4510 addProperty(CSSPropertyGridTemplateColumns, CSSPropertyGrid, *CSSInitialValu
e::createLegacyImplicit(), important); | 4511 addProperty(CSSPropertyGridTemplateColumns, CSSPropertyGrid, *CSSPropertyMet
adata::initialValue(CSSPropertyGridTemplateColumns), important); |
4511 addProperty(CSSPropertyGridTemplateRows, CSSPropertyGrid, *CSSInitialValue::
createLegacyImplicit(), important); | 4512 addProperty(CSSPropertyGridTemplateRows, CSSPropertyGrid, *CSSPropertyMetada
ta::initialValue(CSSPropertyGridTemplateRows), important); |
4512 addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, *CSSInitialValue:
:createLegacyImplicit(), important); | 4513 addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, *CSSPropertyMetad
ata::initialValue(CSSPropertyGridTemplateAreas), important); |
4513 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *gridAutoFlow, importa
nt); | 4514 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *gridAutoFlow, importa
nt); |
4514 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *autoColumnsValue,
important); | 4515 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *autoColumnsValue,
important); |
4515 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *autoRowsValue, import
ant); | 4516 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *autoRowsValue, import
ant); |
4516 addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSInitialValue::cre
ateLegacyImplicit(), important); | 4517 addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSPropertyMetadata:
:initialValue(CSSPropertyGridColumnGap), important); |
4517 addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSInitialValue::create
LegacyImplicit(), important); | 4518 addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSPropertyMetadata::in
itialValue(CSSPropertyGridRowGap), important); |
4518 return true; | 4519 return true; |
4519 } | 4520 } |
4520 | 4521 |
4521 bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
portant) | 4522 bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool im
portant) |
4522 { | 4523 { |
4523 CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); | 4524 CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty); |
4524 | 4525 |
4525 switch (property) { | 4526 switch (property) { |
4526 case CSSPropertyWebkitMarginCollapse: { | 4527 case CSSPropertyWebkitMarginCollapse: { |
4527 CSSValueID id = m_range.consumeIncludingWhitespace().id(); | 4528 CSSValueID id = m_range.consumeIncludingWhitespace().id(); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4699 case CSSPropertyGridTemplate: | 4700 case CSSPropertyGridTemplate: |
4700 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); | 4701 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); |
4701 case CSSPropertyGrid: | 4702 case CSSPropertyGrid: |
4702 return consumeGridShorthand(important); | 4703 return consumeGridShorthand(important); |
4703 default: | 4704 default: |
4704 return false; | 4705 return false; |
4705 } | 4706 } |
4706 } | 4707 } |
4707 | 4708 |
4708 } // namespace blink | 4709 } // namespace blink |
OLD | NEW |