Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 1809223002: Remove some CSSParserMode parameters in CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 for (unsigned i = 0; i < 3; i++) { // 3 dimensions of rotation 613 for (unsigned i = 0; i < 3; i++) { // 3 dimensions of rotation
614 CSSValue* dimension = consumeNumber(range, ValueRangeAll); 614 CSSValue* dimension = consumeNumber(range, ValueRangeAll);
615 if (!dimension) 615 if (!dimension)
616 return nullptr; 616 return nullptr;
617 list->append(dimension); 617 list->append(dimension);
618 } 618 }
619 619
620 return list; 620 return list;
621 } 621 }
622 622
623 static CSSValueList* consumeScale(CSSParserTokenRange& range, CSSParserMode cssP arserMode) 623 static CSSValueList* consumeScale(CSSParserTokenRange& range)
624 { 624 {
625 ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled()); 625 ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
626 626
627 CSSValue* scale = consumeNumber(range, ValueRangeAll); 627 CSSValue* scale = consumeNumber(range, ValueRangeAll);
628 if (!scale) 628 if (!scale)
629 return nullptr; 629 return nullptr;
630 CSSValueList* list = CSSValueList::createSpaceSeparated(); 630 CSSValueList* list = CSSValueList::createSpaceSeparated();
631 list->append(scale); 631 list->append(scale);
632 scale = consumeNumber(range, ValueRangeAll); 632 scale = consumeNumber(range, ValueRangeAll);
633 if (scale) { 633 if (scale) {
(...skipping 18 matching lines...) Expand all
652 if (translate) { 652 if (translate) {
653 list->append(translate); 653 list->append(translate);
654 translate = consumeLength(range, cssParserMode, ValueRangeAll); 654 translate = consumeLength(range, cssParserMode, ValueRangeAll);
655 if (translate) 655 if (translate)
656 list->append(translate); 656 list->append(translate);
657 } 657 }
658 658
659 return list; 659 return list;
660 } 660 }
661 661
662 static CSSValue* consumeCounter(CSSParserTokenRange& range, CSSParserMode cssPar serMode, int defaultValue) 662 static CSSValue* consumeCounter(CSSParserTokenRange& range, int defaultValue)
663 { 663 {
664 if (range.peek().id() == CSSValueNone) 664 if (range.peek().id() == CSSValueNone)
665 return consumeIdent(range); 665 return consumeIdent(range);
666 666
667 CSSValueList* list = CSSValueList::createSpaceSeparated(); 667 CSSValueList* list = CSSValueList::createSpaceSeparated();
668 do { 668 do {
669 CSSCustomIdentValue* counterName = consumeCustomIdent(range); 669 CSSCustomIdentValue* counterName = consumeCustomIdent(range);
670 if (!counterName) 670 if (!counterName)
671 return nullptr; 671 return nullptr;
672 int i = defaultValue; 672 int i = defaultValue;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 return consumePositiveInteger(range); 931 return consumePositiveInteger(range);
932 } 932 }
933 933
934 static CSSValue* consumeColumnGap(CSSParserTokenRange& range, CSSParserMode cssP arserMode) 934 static CSSValue* consumeColumnGap(CSSParserTokenRange& range, CSSParserMode cssP arserMode)
935 { 935 {
936 if (range.peek().id() == CSSValueNormal) 936 if (range.peek().id() == CSSValueNormal)
937 return consumeIdent(range); 937 return consumeIdent(range);
938 return consumeLength(range, cssParserMode, ValueRangeNonNegative); 938 return consumeLength(range, cssParserMode, ValueRangeNonNegative);
939 } 939 }
940 940
941 static CSSValue* consumeColumnSpan(CSSParserTokenRange& range, CSSParserMode css ParserMode) 941 static CSSValue* consumeColumnSpan(CSSParserTokenRange& range)
942 { 942 {
943 return consumeIdent<CSSValueAll, CSSValueNone>(range); 943 return consumeIdent<CSSValueAll, CSSValueNone>(range);
944 } 944 }
945 945
946 static CSSValue* consumeZoom(CSSParserTokenRange& range, const CSSParserContext& context) 946 static CSSValue* consumeZoom(CSSParserTokenRange& range, const CSSParserContext& context)
947 { 947 {
948 const CSSParserToken& token = range.peek(); 948 const CSSParserToken& token = range.peek();
949 CSSPrimitiveValue* zoom = nullptr; 949 CSSPrimitiveValue* zoom = nullptr;
950 if (token.type() == IdentToken) { 950 if (token.type() == IdentToken) {
951 zoom = consumeIdent<CSSValueNormal, CSSValueReset, CSSValueDocument>(ran ge); 951 zoom = consumeIdent<CSSValueNormal, CSSValueReset, CSSValueDocument>(ran ge);
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 { 2692 {
2693 CSSPrimitiveValue* horizontal = consumeBorderImageRepeatKeyword(range); 2693 CSSPrimitiveValue* horizontal = consumeBorderImageRepeatKeyword(range);
2694 if (!horizontal) 2694 if (!horizontal)
2695 return nullptr; 2695 return nullptr;
2696 CSSPrimitiveValue* vertical = consumeBorderImageRepeatKeyword(range); 2696 CSSPrimitiveValue* vertical = consumeBorderImageRepeatKeyword(range);
2697 if (!vertical) 2697 if (!vertical)
2698 vertical = horizontal; 2698 vertical = horizontal;
2699 return CSSValuePair::create(horizontal, vertical, CSSValuePair::DropIdentica lValues); 2699 return CSSValuePair::create(horizontal, vertical, CSSValuePair::DropIdentica lValues);
2700 } 2700 }
2701 2701
2702 static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenR ange& range, CSSParserMode cssParserMode) 2702 static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenR ange& range)
2703 { 2703 {
2704 bool fill = consumeIdent<CSSValueFill>(range); 2704 bool fill = consumeIdent<CSSValueFill>(range);
2705 CSSPrimitiveValue* slices[4] = { 0 }; 2705 CSSPrimitiveValue* slices[4] = { 0 };
2706 2706
2707 for (size_t index = 0; index < 4; ++index) { 2707 for (size_t index = 0; index < 4; ++index) {
2708 CSSPrimitiveValue* value = consumePercent(range, ValueRangeNonNegative); 2708 CSSPrimitiveValue* value = consumePercent(range, ValueRangeNonNegative);
2709 if (!value) 2709 if (!value)
2710 value = consumeNumber(range, ValueRangeNonNegative); 2710 value = consumeNumber(range, ValueRangeNonNegative);
2711 if (!value) 2711 if (!value)
2712 break; 2712 break;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 source = consumeImageOrNone(range, context); 2775 source = consumeImageOrNone(range, context);
2776 if (source) 2776 if (source)
2777 continue; 2777 continue;
2778 } 2778 }
2779 if (!repeat) { 2779 if (!repeat) {
2780 repeat = consumeBorderImageRepeat(range); 2780 repeat = consumeBorderImageRepeat(range);
2781 if (repeat) 2781 if (repeat)
2782 continue; 2782 continue;
2783 } 2783 }
2784 if (!slice) { 2784 if (!slice) {
2785 slice = consumeBorderImageSlice(property, range, context.mode()); 2785 slice = consumeBorderImageSlice(property, range);
2786 if (slice) { 2786 if (slice) {
2787 ASSERT(!width && !outset); 2787 ASSERT(!width && !outset);
2788 if (consumeSlashIncludingWhitespace(range)) { 2788 if (consumeSlashIncludingWhitespace(range)) {
2789 width = consumeBorderImageWidth(range); 2789 width = consumeBorderImageWidth(range);
2790 if (consumeSlashIncludingWhitespace(range)) { 2790 if (consumeSlashIncludingWhitespace(range)) {
2791 outset = consumeBorderImageOutset(range); 2791 outset = consumeBorderImageOutset(range);
2792 if (!outset) 2792 if (!outset)
2793 return false; 2793 return false;
2794 } else if (!width) { 2794 } else if (!width) {
2795 return false; 2795 return false;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 static CSSValue* consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserT okenRange& range, const CSSParserContext& context) 2892 static CSSValue* consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserT okenRange& range, const CSSParserContext& context)
2893 { 2893 {
2894 // The values 'border', 'padding' and 'content' are deprecated and do not ap ply to the version of the property that has the -webkit- prefix removed. 2894 // The values 'border', 'padding' and 'content' are deprecated and do not ap ply to the version of the property that has the -webkit- prefix removed.
2895 if (CSSValue* value = consumeIdentRange(range, CSSValueBorder, CSSValuePaddi ngBox)) 2895 if (CSSValue* value = consumeIdentRange(range, CSSValueBorder, CSSValuePaddi ngBox))
2896 return value; 2896 return value;
2897 if ((property == CSSPropertyWebkitBackgroundClip || property == CSSPropertyW ebkitMaskClip) && range.peek().id() == CSSValueText) 2897 if ((property == CSSPropertyWebkitBackgroundClip || property == CSSPropertyW ebkitMaskClip) && range.peek().id() == CSSValueText)
2898 return consumeIdent(range); 2898 return consumeIdent(range);
2899 return nullptr; 2899 return nullptr;
2900 } 2900 }
2901 2901
2902 static CSSValue* consumeBackgroundSize(CSSPropertyID unresolvedProperty, CSSPars erTokenRange& range, CSSParserMode mode) 2902 static CSSValue* consumeBackgroundSize(CSSPropertyID unresolvedProperty, CSSPars erTokenRange& range, CSSParserMode cssParserMode)
2903 { 2903 {
2904 if (identMatches<CSSValueContain, CSSValueCover>(range.peek().id())) 2904 if (identMatches<CSSValueContain, CSSValueCover>(range.peek().id()))
2905 return consumeIdent(range); 2905 return consumeIdent(range);
2906 2906
2907 CSSPrimitiveValue* horizontal = consumeIdent<CSSValueAuto>(range); 2907 CSSPrimitiveValue* horizontal = consumeIdent<CSSValueAuto>(range);
2908 if (!horizontal) 2908 if (!horizontal)
2909 horizontal = consumeLengthOrPercent(range, mode, ValueRangeAll, Unitless Quirk::Forbid); 2909 horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
2910 2910
2911 CSSPrimitiveValue* vertical = nullptr; 2911 CSSPrimitiveValue* vertical = nullptr;
2912 if (!range.atEnd()) { 2912 if (!range.atEnd()) {
2913 if (range.peek().id() == CSSValueAuto) // `auto' is the default 2913 if (range.peek().id() == CSSValueAuto) // `auto' is the default
2914 range.consumeIncludingWhitespace(); 2914 range.consumeIncludingWhitespace();
2915 else 2915 else
2916 vertical = consumeLengthOrPercent(range, mode, ValueRangeAll, Unitle ssQuirk::Forbid); 2916 vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeAl l, UnitlessQuirk::Forbid);
2917 } else if (unresolvedProperty == CSSPropertyAliasWebkitBackgroundSize) { 2917 } else if (unresolvedProperty == CSSPropertyAliasWebkitBackgroundSize) {
2918 // Legacy syntax: "-webkit-background-size: 10px" is equivalent to "back ground-size: 10px 10px". 2918 // Legacy syntax: "-webkit-background-size: 10px" is equivalent to "back ground-size: 10px 10px".
2919 vertical = horizontal; 2919 vertical = horizontal;
2920 } 2920 }
2921 if (!vertical) 2921 if (!vertical)
2922 return horizontal; 2922 return horizontal;
2923 return CSSValuePair::create(horizontal, vertical, CSSValuePair::KeepIdentica lValues); 2923 return CSSValuePair::create(horizontal, vertical, CSSValuePair::KeepIdentica lValues);
2924 } 2924 }
2925 2925
2926 CSSValueList* consumeGridAutoFlow(CSSParserTokenRange& range) 2926 CSSValueList* consumeGridAutoFlow(CSSParserTokenRange& range)
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
3306 return consumeSpacing(m_range, m_context.mode()); 3306 return consumeSpacing(m_range, m_context.mode());
3307 case CSSPropertyTabSize: 3307 case CSSPropertyTabSize:
3308 return consumeTabSize(m_range, m_context.mode()); 3308 return consumeTabSize(m_range, m_context.mode());
3309 case CSSPropertyFontSize: 3309 case CSSPropertyFontSize:
3310 return consumeFontSize(m_range, m_context.mode(), UnitlessQuirk::Allow); 3310 return consumeFontSize(m_range, m_context.mode(), UnitlessQuirk::Allow);
3311 case CSSPropertyLineHeight: 3311 case CSSPropertyLineHeight:
3312 return consumeLineHeight(m_range, m_context.mode()); 3312 return consumeLineHeight(m_range, m_context.mode());
3313 case CSSPropertyRotate: 3313 case CSSPropertyRotate:
3314 return consumeRotation(m_range); 3314 return consumeRotation(m_range);
3315 case CSSPropertyScale: 3315 case CSSPropertyScale:
3316 return consumeScale(m_range, m_context.mode()); 3316 return consumeScale(m_range);
3317 case CSSPropertyTranslate: 3317 case CSSPropertyTranslate:
3318 return consumeTranslate(m_range, m_context.mode()); 3318 return consumeTranslate(m_range, m_context.mode());
3319 case CSSPropertyWebkitBorderHorizontalSpacing: 3319 case CSSPropertyWebkitBorderHorizontalSpacing:
3320 case CSSPropertyWebkitBorderVerticalSpacing: 3320 case CSSPropertyWebkitBorderVerticalSpacing:
3321 return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative); 3321 return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
3322 case CSSPropertyCounterIncrement: 3322 case CSSPropertyCounterIncrement:
3323 case CSSPropertyCounterReset: 3323 case CSSPropertyCounterReset:
3324 return consumeCounter(m_range, m_context.mode(), property == CSSProperty CounterIncrement ? 1 : 0); 3324 return consumeCounter(m_range, property == CSSPropertyCounterIncrement ? 1 : 0);
3325 case CSSPropertySize: 3325 case CSSPropertySize:
3326 return consumeSize(m_range, m_context.mode()); 3326 return consumeSize(m_range, m_context.mode());
3327 case CSSPropertySnapHeight: 3327 case CSSPropertySnapHeight:
3328 return consumeSnapHeight(m_range, m_context.mode()); 3328 return consumeSnapHeight(m_range, m_context.mode());
3329 case CSSPropertyTextIndent: 3329 case CSSPropertyTextIndent:
3330 return consumeTextIndent(m_range, m_context.mode()); 3330 return consumeTextIndent(m_range, m_context.mode());
3331 case CSSPropertyMaxWidth: 3331 case CSSPropertyMaxWidth:
3332 case CSSPropertyMaxHeight: 3332 case CSSPropertyMaxHeight:
3333 return consumeMaxWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow) ; 3333 return consumeMaxWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow) ;
3334 case CSSPropertyWebkitMaxLogicalWidth: 3334 case CSSPropertyWebkitMaxLogicalWidth:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3383 case CSSPropertyWebkitHyphenateCharacter: 3383 case CSSPropertyWebkitHyphenateCharacter:
3384 case CSSPropertyWebkitLocale: 3384 case CSSPropertyWebkitLocale:
3385 return consumeLocale(m_range); 3385 return consumeLocale(m_range);
3386 case CSSPropertyColumnWidth: 3386 case CSSPropertyColumnWidth:
3387 return consumeColumnWidth(m_range); 3387 return consumeColumnWidth(m_range);
3388 case CSSPropertyColumnCount: 3388 case CSSPropertyColumnCount:
3389 return consumeColumnCount(m_range); 3389 return consumeColumnCount(m_range);
3390 case CSSPropertyColumnGap: 3390 case CSSPropertyColumnGap:
3391 return consumeColumnGap(m_range, m_context.mode()); 3391 return consumeColumnGap(m_range, m_context.mode());
3392 case CSSPropertyColumnSpan: 3392 case CSSPropertyColumnSpan:
3393 return consumeColumnSpan(m_range, m_context.mode()); 3393 return consumeColumnSpan(m_range);
3394 case CSSPropertyZoom: 3394 case CSSPropertyZoom:
3395 return consumeZoom(m_range, m_context); 3395 return consumeZoom(m_range, m_context);
3396 case CSSPropertyAnimationDelay: 3396 case CSSPropertyAnimationDelay:
3397 case CSSPropertyTransitionDelay: 3397 case CSSPropertyTransitionDelay:
3398 case CSSPropertyAnimationDirection: 3398 case CSSPropertyAnimationDirection:
3399 case CSSPropertyAnimationDuration: 3399 case CSSPropertyAnimationDuration:
3400 case CSSPropertyTransitionDuration: 3400 case CSSPropertyTransitionDuration:
3401 case CSSPropertyAnimationFillMode: 3401 case CSSPropertyAnimationFillMode:
3402 case CSSPropertyAnimationIterationCount: 3402 case CSSPropertyAnimationIterationCount:
3403 case CSSPropertyAnimationName: 3403 case CSSPropertyAnimationName:
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3582 return consumeClipPath(m_range, m_context); 3582 return consumeClipPath(m_range, m_context);
3583 case CSSPropertyJustifyContent: 3583 case CSSPropertyJustifyContent:
3584 case CSSPropertyAlignContent: 3584 case CSSPropertyAlignContent:
3585 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); 3585 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
3586 return consumeContentDistributionOverflowPosition(m_range); 3586 return consumeContentDistributionOverflowPosition(m_range);
3587 case CSSPropertyBorderImageRepeat: 3587 case CSSPropertyBorderImageRepeat:
3588 case CSSPropertyWebkitMaskBoxImageRepeat: 3588 case CSSPropertyWebkitMaskBoxImageRepeat:
3589 return consumeBorderImageRepeat(m_range); 3589 return consumeBorderImageRepeat(m_range);
3590 case CSSPropertyBorderImageSlice: 3590 case CSSPropertyBorderImageSlice:
3591 case CSSPropertyWebkitMaskBoxImageSlice: 3591 case CSSPropertyWebkitMaskBoxImageSlice:
3592 return consumeBorderImageSlice(property, m_range, m_context.mode()); 3592 return consumeBorderImageSlice(property, m_range);
3593 case CSSPropertyBorderImageOutset: 3593 case CSSPropertyBorderImageOutset:
3594 case CSSPropertyWebkitMaskBoxImageOutset: 3594 case CSSPropertyWebkitMaskBoxImageOutset:
3595 return consumeBorderImageOutset(m_range); 3595 return consumeBorderImageOutset(m_range);
3596 case CSSPropertyBorderImageWidth: 3596 case CSSPropertyBorderImageWidth:
3597 case CSSPropertyWebkitMaskBoxImageWidth: 3597 case CSSPropertyWebkitMaskBoxImageWidth:
3598 return consumeBorderImageWidth(m_range); 3598 return consumeBorderImageWidth(m_range);
3599 case CSSPropertyWebkitBorderImage: 3599 case CSSPropertyWebkitBorderImage:
3600 return consumeWebkitBorderImage(property, m_range, m_context); 3600 return consumeWebkitBorderImage(property, m_range, m_context);
3601 case CSSPropertyWebkitBoxReflect: 3601 case CSSPropertyWebkitBoxReflect:
3602 return consumeReflect(m_range, m_context); 3602 return consumeReflect(m_range, m_context);
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3975 if (!parsedValue || !m_range.atEnd()) 3975 if (!parsedValue || !m_range.atEnd())
3976 return false; 3976 return false;
3977 addProperty(propId, parsedValue, important); 3977 addProperty(propId, parsedValue, important);
3978 return true; 3978 return true;
3979 } 3979 }
3980 default: 3980 default:
3981 return false; 3981 return false;
3982 } 3982 }
3983 } 3983 }
3984 3984
3985 static bool consumeColumnWidthOrCount(CSSParserTokenRange& range, CSSParserMode cssParserMode, CSSValue*& columnWidth, CSSValue*& columnCount) 3985 static bool consumeColumnWidthOrCount(CSSParserTokenRange& range, CSSValue*& col umnWidth, CSSValue*& columnCount)
3986 { 3986 {
3987 if (range.peek().id() == CSSValueAuto) { 3987 if (range.peek().id() == CSSValueAuto) {
3988 consumeIdent(range); 3988 consumeIdent(range);
3989 return true; 3989 return true;
3990 } 3990 }
3991 if (!columnWidth) { 3991 if (!columnWidth) {
3992 columnWidth = consumeColumnWidth(range); 3992 columnWidth = consumeColumnWidth(range);
3993 if (columnWidth) 3993 if (columnWidth)
3994 return true; 3994 return true;
3995 } 3995 }
3996 if (!columnCount) 3996 if (!columnCount)
3997 columnCount = consumeColumnCount(range); 3997 columnCount = consumeColumnCount(range);
3998 return columnCount; 3998 return columnCount;
3999 } 3999 }
4000 4000
4001 bool CSSPropertyParser::consumeColumns(bool important) 4001 bool CSSPropertyParser::consumeColumns(bool important)
4002 { 4002 {
4003 CSSValue* columnWidth = nullptr; 4003 CSSValue* columnWidth = nullptr;
4004 CSSValue* columnCount = nullptr; 4004 CSSValue* columnCount = nullptr;
4005 if (!consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, colum nCount)) 4005 if (!consumeColumnWidthOrCount(m_range, columnWidth, columnCount))
4006 return false; 4006 return false;
4007 consumeColumnWidthOrCount(m_range, m_context.mode(), columnWidth, columnCoun t); 4007 consumeColumnWidthOrCount(m_range, columnWidth, columnCount);
4008 if (!m_range.atEnd()) 4008 if (!m_range.atEnd())
4009 return false; 4009 return false;
4010 if (!columnWidth) 4010 if (!columnWidth)
4011 columnWidth = cssValuePool().createIdentifierValue(CSSValueAuto); 4011 columnWidth = cssValuePool().createIdentifierValue(CSSValueAuto);
4012 if (!columnCount) 4012 if (!columnCount)
4013 columnCount = cssValuePool().createIdentifierValue(CSSValueAuto); 4013 columnCount = cssValuePool().createIdentifierValue(CSSValueAuto);
4014 addProperty(CSSPropertyColumnWidth, columnWidth, important); 4014 addProperty(CSSPropertyColumnWidth, columnWidth, important);
4015 addProperty(CSSPropertyColumnCount, columnCount, important); 4015 addProperty(CSSPropertyColumnCount, columnCount, important);
4016 return true; 4016 return true;
4017 } 4017 }
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
4751 m_currentShorthand = oldShorthand; 4751 m_currentShorthand = oldShorthand;
4752 CSSParserValueList valueList(m_range); 4752 CSSParserValueList valueList(m_range);
4753 if (!valueList.size()) 4753 if (!valueList.size())
4754 return false; 4754 return false;
4755 m_valueList = &valueList; 4755 m_valueList = &valueList;
4756 return legacyParseShorthand(unresolvedProperty, important); 4756 return legacyParseShorthand(unresolvedProperty, important);
4757 } 4757 }
4758 } 4758 }
4759 4759
4760 } // namespace blink 4760 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698