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

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

Issue 1173613002: [CSS Grid Layout] ASSERTION: !value || (value->isGridLineNamesValue()) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « LayoutTests/fast/css-grid-layout/grid-template-shorthand-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 /* 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 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 // Handle leading <custom-ident>*. 3279 // Handle leading <custom-ident>*.
3280 if (!parseGridLineNames(*m_valueList, *templateRows, trailingIdentWasAdd ed ? toCSSGridLineNamesValue(templateRows->item(templateRows->length() - 1)) : n ullptr)) 3280 if (!parseGridLineNames(*m_valueList, *templateRows, trailingIdentWasAdd ed ? toCSSGridLineNamesValue(templateRows->item(templateRows->length() - 1)) : n ullptr))
3281 return false; 3281 return false;
3282 3282
3283 // Handle a template-area's row. 3283 // Handle a template-area's row.
3284 if (!parseGridTemplateAreasRow(gridAreaMap, rowCount, columnCount)) 3284 if (!parseGridTemplateAreasRow(gridAreaMap, rowCount, columnCount))
3285 return false; 3285 return false;
3286 ++rowCount; 3286 ++rowCount;
3287 3287
3288 // Handle template-rows's track-size. 3288 // Handle template-rows's track-size.
3289 if (m_valueList->current() && m_valueList->current()->unit != CSSParserV alue::ValueList && m_valueList->current()->unit != CSSPrimitiveValue::CSS_STRING ) { 3289 if (m_valueList->current() && m_valueList->current()->unit != CSSPrimiti veValue::CSS_STRING) {
3290 RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList ); 3290 RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList );
3291 if (!value) 3291 if (!value)
3292 return false; 3292 return false;
3293 templateRows->append(value); 3293 templateRows->append(value);
3294 } else { 3294 } else {
3295 templateRows->append(cssValuePool().createIdentifierValue(CSSValueAu to)); 3295 templateRows->append(cssValuePool().createIdentifierValue(CSSValueAu to));
3296 } 3296 }
3297 3297
3298 // This will handle the trailing/leading <custom-ident>* in the grammar. 3298 // This will handle the trailing/leading <custom-ident>* in the grammar.
3299 const CSSParserValue* current = m_valueList->current();
3300 trailingIdentWasAdded = current && current->unit == CSSParserValue::Valu eList && current->valueList->size() > 0;
3301 if (!parseGridLineNames(*m_valueList, *templateRows)) 3299 if (!parseGridLineNames(*m_valueList, *templateRows))
3302 return false; 3300 return false;
3301 trailingIdentWasAdded = templateRows->item(templateRows->length() - 1)-> isGridLineNamesValue();
3303 } 3302 }
3304 3303
3305 // [<track-list> /]? 3304 // [<track-list> /]?
3306 if (templateColumns) 3305 if (templateColumns)
3307 addProperty(CSSPropertyGridTemplateColumns, templateColumns, important); 3306 addProperty(CSSPropertyGridTemplateColumns, templateColumns, important);
3308 else 3307 else
3309 addProperty(CSSPropertyGridTemplateColumns, cssValuePool().createIdenti fierValue(CSSValueNone), important); 3308 addProperty(CSSPropertyGridTemplateColumns, cssValuePool().createIdenti fierValue(CSSValueNone), important);
3310 3309
3311 // [<line-names>? <string> [<track-size> <line-names>]? ]+ 3310 // [<line-names>? <string> [<track-size> <line-names>]? ]+
3312 RefPtrWillBeRawPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::crea te(gridAreaMap, rowCount, columnCount); 3311 RefPtrWillBeRawPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::crea te(gridAreaMap, rowCount, columnCount);
(...skipping 5164 matching lines...) Expand 10 before | Expand all | Expand 10 after
8477 } 8476 }
8478 } 8477 }
8479 8478
8480 if (!list->length()) 8479 if (!list->length())
8481 return nullptr; 8480 return nullptr;
8482 8481
8483 return list.release(); 8482 return list.release();
8484 } 8483 }
8485 8484
8486 } // namespace blink 8485 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698