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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/parser/CSSPropertyParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index b2ce03f94f44094b1b6cff863858474c8d3e6b54..b1e2d1cc5495c2fe930e1888fa1f0c29ba8014eb 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3579,8 +3579,8 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1)))
return false;
- size_t repetitions = arguments->valueAt(0)->fValue;
- ASSERT_WITH_SECURITY_IMPLICATION(repetitions > 0);
+ ASSERT(arguments->valueAt(0)->fValue > 0);
+ size_t repetitions = clampTo<size_t>(arguments->valueAt(0)->fValue, 0, kGridMaxTracks);
RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
arguments->next(); // Skip the repetition count.
« 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