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

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

Issue 1970573004: [css-grid] Consider invalid using just "span" as grid-line value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt ('k') | 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 3132 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698