| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/css/parser/CSSPropertyParser.h" | 6 #include "core/css/parser/CSSPropertyParser.h" |
| 7 | 7 |
| 8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
| 9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
| 10 #include "core/css/CSSCustomIdentValue.h" | 10 #include "core/css/CSSCustomIdentValue.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 CSSPrimitiveValue::UnitType unitType = m_calcValue->isInt() ? CSSPrimiti
veValue::UnitType::Integer : CSSPrimitiveValue::UnitType::Number; | 163 CSSPrimitiveValue::UnitType unitType = m_calcValue->isInt() ? CSSPrimiti
veValue::UnitType::Integer : CSSPrimitiveValue::UnitType::Number; |
| 164 return cssValuePool().createValue(m_calcValue->doubleValue(), unitType); | 164 return cssValuePool().createValue(m_calcValue->doubleValue(), unitType); |
| 165 } | 165 } |
| 166 | 166 |
| 167 private: | 167 private: |
| 168 CSSParserTokenRange& m_sourceRange; | 168 CSSParserTokenRange& m_sourceRange; |
| 169 CSSParserTokenRange m_range; | 169 CSSParserTokenRange m_range; |
| 170 RefPtrWillBeMember<CSSCalcValue> m_calcValue; | 170 RefPtrWillBeMember<CSSCalcValue> m_calcValue; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeInteger(CSSParserTokenRa
nge& range, CSSParserMode cssParserMode, double minimumValue = -std::numeric_lim
its<double>::max()) | 173 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeInteger(CSSParserTokenRa
nge& range, double minimumValue = -std::numeric_limits<double>::max()) |
| 174 { | 174 { |
| 175 const CSSParserToken& token = range.peek(); | 175 const CSSParserToken& token = range.peek(); |
| 176 if (token.type() == NumberToken) { | 176 if (token.type() == NumberToken) { |
| 177 if (token.numericValueType() == NumberValueType || token.numericValue()
< minimumValue) | 177 if (token.numericValueType() == NumberValueType || token.numericValue()
< minimumValue) |
| 178 return nullptr; | 178 return nullptr; |
| 179 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); | 179 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); |
| 180 } | 180 } |
| 181 CalcParser calcParser(range); | 181 CalcParser calcParser(range); |
| 182 if (const CSSCalcValue* calculation = calcParser.value()) { | 182 if (const CSSCalcValue* calculation = calcParser.value()) { |
| 183 if (calculation->category() != CalcNumber || !calculation->isInt()) | 183 if (calculation->category() != CalcNumber || !calculation->isInt()) |
| 184 return nullptr; | 184 return nullptr; |
| 185 double value = calculation->doubleValue(); | 185 double value = calculation->doubleValue(); |
| 186 if (value < minimumValue) | 186 if (value < minimumValue) |
| 187 return nullptr; | 187 return nullptr; |
| 188 return calcParser.consumeNumber(); | 188 return calcParser.consumeNumber(); |
| 189 } | 189 } |
| 190 return nullptr; | 190 return nullptr; |
| 191 } | 191 } |
| 192 | 192 |
| 193 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumePositiveInteger(CSSParse
rTokenRange& range) |
| 194 { |
| 195 return consumeInteger(range, 1); |
| 196 } |
| 197 |
| 193 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeNumber(CSSParserTokenRan
ge& range, ValueRange valueRange) | 198 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeNumber(CSSParserTokenRan
ge& range, ValueRange valueRange) |
| 194 { | 199 { |
| 195 const CSSParserToken& token = range.peek(); | 200 const CSSParserToken& token = range.peek(); |
| 196 if (token.type() == NumberToken) { | 201 if (token.type() == NumberToken) { |
| 197 if (valueRange == ValueRangeNonNegative && token.numericValue() < 0) | 202 if (valueRange == ValueRangeNonNegative && token.numericValue() < 0) |
| 198 return nullptr; | 203 return nullptr; |
| 199 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); | 204 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); |
| 200 } | 205 } |
| 201 CalcParser calcParser(range, ValueRangeAll); | 206 CalcParser calcParser(range, ValueRangeAll); |
| 202 if (const CSSCalcValue* calculation = calcParser.value()) { | 207 if (const CSSCalcValue* calculation = calcParser.value()) { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 static PassRefPtrWillBeRawPtr<CSSValue> consumeSpacing(CSSParserTokenRange& rang
e, CSSParserMode cssParserMode) | 594 static PassRefPtrWillBeRawPtr<CSSValue> consumeSpacing(CSSParserTokenRange& rang
e, CSSParserMode cssParserMode) |
| 590 { | 595 { |
| 591 if (range.peek().id() == CSSValueNormal) | 596 if (range.peek().id() == CSSValueNormal) |
| 592 return consumeIdent(range); | 597 return consumeIdent(range); |
| 593 // TODO(timloh): Don't allow unitless values, and allow <percentage>s in wor
d-spacing. | 598 // TODO(timloh): Don't allow unitless values, and allow <percentage>s in wor
d-spacing. |
| 594 return consumeLength(range, cssParserMode, ValueRangeAll, UnitlessQuirk::All
ow); | 599 return consumeLength(range, cssParserMode, ValueRangeAll, UnitlessQuirk::All
ow); |
| 595 } | 600 } |
| 596 | 601 |
| 597 static PassRefPtrWillBeRawPtr<CSSValue> consumeTabSize(CSSParserTokenRange& rang
e, CSSParserMode cssParserMode) | 602 static PassRefPtrWillBeRawPtr<CSSValue> consumeTabSize(CSSParserTokenRange& rang
e, CSSParserMode cssParserMode) |
| 598 { | 603 { |
| 599 RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue = consumeInteger(range, cs
sParserMode, 0); | 604 RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue = consumeInteger(range, 0)
; |
| 600 if (parsedValue) | 605 if (parsedValue) |
| 601 return parsedValue; | 606 return parsedValue; |
| 602 return consumeLength(range, cssParserMode, ValueRangeNonNegative); | 607 return consumeLength(range, cssParserMode, ValueRangeNonNegative); |
| 603 } | 608 } |
| 604 | 609 |
| 605 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontSize(CSSParserTokenRange& ran
ge, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid) | 610 static PassRefPtrWillBeRawPtr<CSSValue> consumeFontSize(CSSParserTokenRange& ran
ge, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid) |
| 606 { | 611 { |
| 607 if (range.peek().id() >= CSSValueXxSmall && range.peek().id() <= CSSValueLar
ger) | 612 if (range.peek().id() >= CSSValueXxSmall && range.peek().id() <= CSSValueLar
ger) |
| 608 return consumeIdent(range); | 613 return consumeIdent(range); |
| 609 return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, u
nitless); | 614 return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, u
nitless); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 if (range.peek().id() == CSSValueNone) | 653 if (range.peek().id() == CSSValueNone) |
| 649 return consumeIdent(range); | 654 return consumeIdent(range); |
| 650 | 655 |
| 651 // TODO(rwlbuis): should be space separated list. | 656 // TODO(rwlbuis): should be space separated list. |
| 652 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; | 657 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; |
| 653 do { | 658 do { |
| 654 RefPtrWillBeRawPtr<CSSCustomIdentValue> counterName = consumeCustomIdent
(range); | 659 RefPtrWillBeRawPtr<CSSCustomIdentValue> counterName = consumeCustomIdent
(range); |
| 655 if (!counterName) | 660 if (!counterName) |
| 656 return nullptr; | 661 return nullptr; |
| 657 int i = defaultValue; | 662 int i = defaultValue; |
| 658 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> counterValue = consumeInteger(
range, cssParserMode)) | 663 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> counterValue = consumeInteger(
range)) |
| 659 i = clampTo<int>(counterValue->getDoubleValue()); | 664 i = clampTo<int>(counterValue->getDoubleValue()); |
| 660 list->append(CSSValuePair::create(counterName.release(), | 665 list->append(CSSValuePair::create(counterName.release(), |
| 661 cssValuePool().createValue(i, CSSPrimitiveValue::UnitType::Number), | 666 cssValuePool().createValue(i, CSSPrimitiveValue::UnitType::Number), |
| 662 CSSValuePair::DropIdenticalValues)); | 667 CSSValuePair::DropIdenticalValues)); |
| 663 } while (!range.atEnd()); | 668 } while (!range.atEnd()); |
| 664 return list.release(); | 669 return list.release(); |
| 665 } | 670 } |
| 666 | 671 |
| 667 static PassRefPtrWillBeRawPtr<CSSValue> consumePageSize(CSSParserTokenRange& ran
ge) | 672 static PassRefPtrWillBeRawPtr<CSSValue> consumePageSize(CSSParserTokenRange& ran
ge) |
| 668 { | 673 { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 if (!range.atEnd() && !consumePan(range, panX, panY)) | 873 if (!range.atEnd() && !consumePan(range, panX, panY)) |
| 869 return nullptr; | 874 return nullptr; |
| 870 | 875 |
| 871 if (panX) | 876 if (panX) |
| 872 list->append(panX.release()); | 877 list->append(panX.release()); |
| 873 if (panY) | 878 if (panY) |
| 874 list->append(panY.release()); | 879 list->append(panY.release()); |
| 875 return list.release(); | 880 return list.release(); |
| 876 } | 881 } |
| 877 | 882 |
| 878 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineClamp(CSSParserToken
Range& range, CSSParserMode cssParserMode) | 883 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeLineClamp(CSSParserToken
Range& range) |
| 879 { | 884 { |
| 880 if (range.peek().type() != PercentageToken && range.peek().type() != NumberT
oken) | 885 if (range.peek().type() != PercentageToken && range.peek().type() != NumberT
oken) |
| 881 return nullptr; | 886 return nullptr; |
| 882 RefPtrWillBeRawPtr<CSSPrimitiveValue> clampValue = consumePercent(range, Val
ueRangeNonNegative); | 887 RefPtrWillBeRawPtr<CSSPrimitiveValue> clampValue = consumePercent(range, Val
ueRangeNonNegative); |
| 883 if (clampValue) | 888 if (clampValue) |
| 884 return clampValue; | 889 return clampValue; |
| 885 // When specifying number of lines, don't allow 0 as a valid value. | 890 // When specifying number of lines, don't allow 0 as a valid value. |
| 886 return consumeInteger(range, cssParserMode, 1); | 891 return consumeInteger(range, 1); |
| 887 } | 892 } |
| 888 | 893 |
| 889 static PassRefPtrWillBeRawPtr<CSSValue> consumeLocale(CSSParserTokenRange& range
) | 894 static PassRefPtrWillBeRawPtr<CSSValue> consumeLocale(CSSParserTokenRange& range
) |
| 890 { | 895 { |
| 891 if (range.peek().id() == CSSValueAuto) | 896 if (range.peek().id() == CSSValueAuto) |
| 892 return consumeIdent(range); | 897 return consumeIdent(range); |
| 893 return consumeString(range); | 898 return consumeString(range); |
| 894 } | 899 } |
| 895 | 900 |
| 901 static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnWidth(CSSParserTokenRange&
range) |
| 902 { |
| 903 if (range.peek().id() == CSSValueAuto) |
| 904 return consumeIdent(range); |
| 905 // Always parse lengths in strict mode here, since it would be ambiguous oth
erwise when used in |
| 906 // the 'columns' shorthand property. |
| 907 RefPtrWillBeRawPtr<CSSPrimitiveValue> columnWidth = consumeLength(range, HTM
LStandardMode, ValueRangeNonNegative); |
| 908 if (!columnWidth || (!columnWidth->isCalculated() && columnWidth->getDoubleV
alue() == 0)) |
| 909 return nullptr; |
| 910 return columnWidth.release(); |
| 911 } |
| 912 |
| 913 static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnCount(CSSParserTokenRange&
range) |
| 914 { |
| 915 if (range.peek().id() == CSSValueAuto) |
| 916 return consumeIdent(range); |
| 917 return consumePositiveInteger(range); |
| 918 } |
| 919 |
| 920 static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnGap(CSSParserTokenRange& ra
nge, CSSParserMode cssParserMode) |
| 921 { |
| 922 if (range.peek().id() == CSSValueNormal) |
| 923 return consumeIdent(range); |
| 924 return consumeLength(range, cssParserMode, ValueRangeNonNegative); |
| 925 } |
| 926 |
| 927 static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnSpan(CSSParserTokenRange& r
ange, CSSParserMode cssParserMode) |
| 928 { |
| 929 CSSValueID id = range.peek().id(); |
| 930 if (id == CSSValueAll || id == CSSValueNone) |
| 931 return consumeIdent(range); |
| 932 if (range.peek().type() != NumberToken) |
| 933 return nullptr; |
| 934 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> spanValue = consumeInteger(range))
{ |
| 935 // 1 (will be dropped in the unprefixed property). |
| 936 if (spanValue->getIntValue() == 1) |
| 937 return spanValue.release(); |
| 938 } |
| 939 return nullptr; |
| 940 } |
| 941 |
| 896 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
ID propId) | 942 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSProperty
ID propId) |
| 897 { | 943 { |
| 898 m_range.consumeWhitespace(); | 944 m_range.consumeWhitespace(); |
| 899 switch (propId) { | 945 switch (propId) { |
| 900 case CSSPropertyWillChange: | 946 case CSSPropertyWillChange: |
| 901 return consumeWillChange(m_range); | 947 return consumeWillChange(m_range); |
| 902 case CSSPropertyPage: | 948 case CSSPropertyPage: |
| 903 return consumePage(m_range); | 949 return consumePage(m_range); |
| 904 case CSSPropertyQuotes: | 950 case CSSPropertyQuotes: |
| 905 return consumeQuotes(m_range); | 951 return consumeQuotes(m_range); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 case CSSPropertyWebkitMinLogicalWidth: | 996 case CSSPropertyWebkitMinLogicalWidth: |
| 951 case CSSPropertyWebkitMinLogicalHeight: | 997 case CSSPropertyWebkitMinLogicalHeight: |
| 952 case CSSPropertyWebkitLogicalWidth: | 998 case CSSPropertyWebkitLogicalWidth: |
| 953 case CSSPropertyWebkitLogicalHeight: | 999 case CSSPropertyWebkitLogicalHeight: |
| 954 return consumeWidthOrHeight(m_range, m_context); | 1000 return consumeWidthOrHeight(m_range, m_context); |
| 955 case CSSPropertyClip: | 1001 case CSSPropertyClip: |
| 956 return consumeClip(m_range, m_context.mode()); | 1002 return consumeClip(m_range, m_context.mode()); |
| 957 case CSSPropertyTouchAction: | 1003 case CSSPropertyTouchAction: |
| 958 return consumeTouchAction(m_range); | 1004 return consumeTouchAction(m_range); |
| 959 case CSSPropertyWebkitLineClamp: | 1005 case CSSPropertyWebkitLineClamp: |
| 960 return consumeLineClamp(m_range, m_context.mode()); | 1006 return consumeLineClamp(m_range); |
| 961 case CSSPropertyWebkitFontSizeDelta: | 1007 case CSSPropertyWebkitFontSizeDelta: |
| 962 return consumeLength(m_range, m_context.mode(), ValueRangeAll, UnitlessQ
uirk::Allow); | 1008 return consumeLength(m_range, m_context.mode(), ValueRangeAll, UnitlessQ
uirk::Allow); |
| 963 case CSSPropertyWebkitHyphenateCharacter: | 1009 case CSSPropertyWebkitHyphenateCharacter: |
| 964 case CSSPropertyWebkitLocale: | 1010 case CSSPropertyWebkitLocale: |
| 965 return consumeLocale(m_range); | 1011 return consumeLocale(m_range); |
| 1012 case CSSPropertyWebkitColumnWidth: |
| 1013 return consumeColumnWidth(m_range); |
| 1014 case CSSPropertyWebkitColumnCount: |
| 1015 return consumeColumnCount(m_range); |
| 1016 case CSSPropertyWebkitColumnGap: |
| 1017 return consumeColumnGap(m_range, m_context.mode()); |
| 1018 case CSSPropertyWebkitColumnSpan: |
| 1019 return consumeColumnSpan(m_range, m_context.mode()); |
| 966 default: | 1020 default: |
| 967 return nullptr; | 1021 return nullptr; |
| 968 } | 1022 } |
| 969 } | 1023 } |
| 970 | 1024 |
| 971 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceUnicodeRange(CSSParse
rTokenRange& range) | 1025 static PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceUnicodeRange(CSSParse
rTokenRange& range) |
| 972 { | 1026 { |
| 973 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); | 1027 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); |
| 974 | 1028 |
| 975 do { | 1029 do { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 if (!parsedValue || !m_range.atEnd()) | 1344 if (!parsedValue || !m_range.atEnd()) |
| 1291 return false; | 1345 return false; |
| 1292 addProperty(propId, parsedValue.release(), important); | 1346 addProperty(propId, parsedValue.release(), important); |
| 1293 return true; | 1347 return true; |
| 1294 } | 1348 } |
| 1295 default: | 1349 default: |
| 1296 return false; | 1350 return false; |
| 1297 } | 1351 } |
| 1298 } | 1352 } |
| 1299 | 1353 |
| 1354 static void consumeColumnWidthOrCount(CSSParserTokenRange& range, CSSParserMode
cssParserMode, RefPtrWillBeRawPtr<CSSValue> &columnWidth, RefPtrWillBeRawPtr<CSS
Value> &columnCount) |
| 1355 { |
| 1356 if (range.peek().id() == CSSValueAuto) { |
| 1357 consumeIdent(range); |
| 1358 return; |
| 1359 } |
| 1360 if (!columnWidth) { |
| 1361 if ((columnWidth = consumeColumnWidth(range))) |
| 1362 return; |
| 1363 } |
| 1364 if (!columnCount) |
| 1365 columnCount = consumeColumnCount(range); |
| 1366 } |
| 1367 |
| 1368 bool CSSPropertyParser::consumeColumns(bool important) |
| 1369 { |
| 1370 RefPtrWillBeRawPtr<CSSValue> columnWidth = nullptr; |
| 1371 RefPtrWillBeRawPtr<CSSValue> columnCount = nullptr; |
| 1372 consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, columnCoun
t); |
| 1373 consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, columnCoun
t); |
| 1374 if (!m_range.atEnd()) |
| 1375 return false; |
| 1376 if (!columnWidth) |
| 1377 columnWidth = cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1378 if (!columnCount) |
| 1379 columnCount = cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1380 addProperty(CSSPropertyWebkitColumnWidth, columnWidth.release(), important); |
| 1381 addProperty(CSSPropertyWebkitColumnCount, columnCount.release(), important); |
| 1382 return true; |
| 1383 } |
| 1384 |
| 1300 bool CSSPropertyParser::parseShorthand(CSSPropertyID propId, bool important) | 1385 bool CSSPropertyParser::parseShorthand(CSSPropertyID propId, bool important) |
| 1301 { | 1386 { |
| 1302 m_range.consumeWhitespace(); | 1387 m_range.consumeWhitespace(); |
| 1303 CSSPropertyID oldShorthand = m_currentShorthand; | 1388 CSSPropertyID oldShorthand = m_currentShorthand; |
| 1304 // TODO(rob.buis): Remove this when the legacy property parser is gone | 1389 // TODO(rob.buis): Remove this when the legacy property parser is gone |
| 1305 m_currentShorthand = propId; | 1390 m_currentShorthand = propId; |
| 1306 switch (propId) { | 1391 switch (propId) { |
| 1307 case CSSPropertyWebkitMarginCollapse: { | 1392 case CSSPropertyWebkitMarginCollapse: { |
| 1308 CSSValueID id = m_range.consumeIncludingWhitespace().id(); | 1393 CSSValueID id = m_range.consumeIncludingWhitespace().id(); |
| 1309 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebki
tMarginBeforeCollapse, id)) | 1394 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebki
tMarginBeforeCollapse, id)) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 return true; | 1428 return true; |
| 1344 } | 1429 } |
| 1345 case CSSPropertyFont: { | 1430 case CSSPropertyFont: { |
| 1346 const CSSParserToken& token = m_range.peek(); | 1431 const CSSParserToken& token = m_range.peek(); |
| 1347 if (token.id() >= CSSValueCaption && token.id() <= CSSValueStatusBar) | 1432 if (token.id() >= CSSValueCaption && token.id() <= CSSValueStatusBar) |
| 1348 return consumeSystemFont(important); | 1433 return consumeSystemFont(important); |
| 1349 return consumeFont(important); | 1434 return consumeFont(important); |
| 1350 } | 1435 } |
| 1351 case CSSPropertyBorderSpacing: | 1436 case CSSPropertyBorderSpacing: |
| 1352 return consumeBorderSpacing(important); | 1437 return consumeBorderSpacing(important); |
| 1438 case CSSPropertyWebkitColumns: { |
| 1439 // TODO(rwlbuis): investigate if this shorthand hack can be removed. |
| 1440 m_currentShorthand = oldShorthand; |
| 1441 return consumeColumns(important); |
| 1442 } |
| 1353 default: | 1443 default: |
| 1354 m_currentShorthand = oldShorthand; | 1444 m_currentShorthand = oldShorthand; |
| 1355 return false; | 1445 return false; |
| 1356 } | 1446 } |
| 1357 } | 1447 } |
| 1358 | 1448 |
| 1359 } // namespace blink | 1449 } // namespace blink |
| OLD | NEW |