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

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

Issue 826893002: [CSS Grid Layout] Remove stack from grid-auto-flow syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased patch Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 3798 matching lines...) Expand 10 before | Expand all | Expand 10 after
3809 } 3809 }
3810 3810
3811 if (!rowCount || !columnCount) 3811 if (!rowCount || !columnCount)
3812 return nullptr; 3812 return nullptr;
3813 3813
3814 return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount) ; 3814 return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount) ;
3815 } 3815 }
3816 3816
3817 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserV alueList& list) 3817 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserV alueList& list)
3818 { 3818 {
3819 // [ row | column ] && dense? | stack && [ row | column ]? 3819 // [ row | column ] || dense
3820 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); 3820 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
3821 3821
3822 CSSParserValue* value = list.current(); 3822 CSSParserValue* value = list.current();
3823 if (!value) 3823 if (!value)
3824 return nullptr; 3824 return nullptr;
3825 3825
3826 RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSep arated(); 3826 RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSep arated();
3827 3827
3828 // First parameter. 3828 // First parameter.
3829 CSSValueID firstId = value->id; 3829 CSSValueID firstId = value->id;
3830 if (firstId != CSSValueRow && firstId != CSSValueColumn && firstId != CSSVal ueDense && firstId != CSSValueStack) 3830 if (firstId != CSSValueRow && firstId != CSSValueColumn && firstId != CSSVal ueDense)
3831 return nullptr; 3831 return nullptr;
3832 parsedValues->append(cssValuePool().createIdentifierValue(firstId)); 3832 parsedValues->append(cssValuePool().createIdentifierValue(firstId));
3833 3833
3834 // Second parameter, if any. 3834 // Second parameter, if any.
3835 value = list.next(); 3835 value = list.next();
3836 if (!value && firstId == CSSValueDense)
3837 return nullptr;
3838
3839 if (value) { 3836 if (value) {
3840 switch (firstId) { 3837 switch (firstId) {
3841 case CSSValueRow: 3838 case CSSValueRow:
3842 case CSSValueColumn: 3839 case CSSValueColumn:
3843 if (value->id != CSSValueDense && value->id != CSSValueStack) 3840 if (value->id != CSSValueDense)
3844 return parsedValues; 3841 return parsedValues;
3845 break; 3842 break;
3846 case CSSValueDense: 3843 case CSSValueDense:
3847 case CSSValueStack:
3848 if (value->id != CSSValueRow && value->id != CSSValueColumn) 3844 if (value->id != CSSValueRow && value->id != CSSValueColumn)
3849 return parsedValues; 3845 return parsedValues;
3850 break; 3846 break;
3851 default: 3847 default:
3852 return parsedValues; 3848 return parsedValues;
3853 } 3849 }
3854 parsedValues->append(cssValuePool().createIdentifierValue(value->id)); 3850 parsedValues->append(cssValuePool().createIdentifierValue(value->id));
3855 list.next(); 3851 list.next();
3856 } 3852 }
3857 3853
(...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after
8599 } 8595 }
8600 } 8596 }
8601 8597
8602 if (!list->length()) 8598 if (!list->length())
8603 return nullptr; 8599 return nullptr;
8604 8600
8605 return list.release(); 8601 return list.release();
8606 } 8602 }
8607 8603
8608 } // namespace blink 8604 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/RenderStyleCSSValueMapping.cpp ('k') | Source/core/css/resolver/StyleBuilderConverter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698