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

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

Issue 645793005: [CSS Grid Layout] ASSERTION FAILED: repetitions > 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 2 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 | Source/core/css/parser/CSSPropertyParserTest.cpp » ('j') | 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 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 3572
3573 return values; 3573 return values;
3574 } 3574 }
3575 3575
3576 bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list) 3576 bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
3577 { 3577 {
3578 CSSParserValueList* arguments = m_valueList->current()->function->args.get() ; 3578 CSSParserValueList* arguments = m_valueList->current()->function->args.get() ;
3579 if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1))) 3579 if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1)))
3580 return false; 3580 return false;
3581 3581
3582 size_t repetitions = arguments->valueAt(0)->fValue; 3582 ASSERT(arguments->valueAt(0)->fValue > 0);
3583 ASSERT_WITH_SECURITY_IMPLICATION(repetitions > 0); 3583 size_t repetitions = clampTo<size_t>(arguments->valueAt(0)->fValue, 0, kGrid MaxTracks);
3584 3584
3585 RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceS eparated(); 3585 RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceS eparated();
3586 arguments->next(); // Skip the repetition count. 3586 arguments->next(); // Skip the repetition count.
3587 arguments->next(); // Skip the comma. 3587 arguments->next(); // Skip the comma.
3588 3588
3589 // Handle leading <ident>*. 3589 // Handle leading <ident>*.
3590 CSSParserValue* currentValue = arguments->current(); 3590 CSSParserValue* currentValue = arguments->current();
3591 if (currentValue && currentValue->unit == CSSParserValue::ValueList) 3591 if (currentValue && currentValue->unit == CSSParserValue::ValueList)
3592 parseGridLineNames(*arguments, *repeatedValues); 3592 parseGridLineNames(*arguments, *repeatedValues);
3593 3593
(...skipping 4754 matching lines...) Expand 10 before | Expand all | Expand 10 after
8348 return nullptr; 8348 return nullptr;
8349 a = args->next(); 8349 a = args->next();
8350 8350
8351 argNumber++; 8351 argNumber++;
8352 } 8352 }
8353 8353
8354 return transformValue.release(); 8354 return transformValue.release();
8355 } 8355 }
8356 8356
8357 } // namespace blink 8357 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSPropertyParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698