Changeset 168108 in webkit
- Timestamp:
- May 1, 2014 10:48:38 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168107 r168108 1 2014-05-01 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Grid Layout] Clamping the number of repetitions in repeat() 4 https://bugs.webkit.org/show_bug.cgi?id=131023 5 6 Reviewed by Brent Fulgham. 7 8 Test to ensure the number of repetitions used in the repeat() function 9 is clamped to 10K. 10 11 * fast/css-grid-layout/grid-element-repeat-max-repetitions-expected.txt: Added. 12 * fast/css-grid-layout/grid-element-repeat-max-repetitions.html: Added. 13 1 14 2014-05-01 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r168099 r168108 1 2014-05-01 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Grid Layout] Clamping the number of repetitions in repeat() 4 https://bugs.webkit.org/show_bug.cgi?id=131023 5 6 Reviewed by Brent Fulgham. 7 8 The ED suggests now to be able to clamp the number of repetitions when 9 using the repeat() function, taking precautions about excessive memory 10 usage. 11 12 The implemented max repetitions is 10K. 13 14 Test: fast/css-grid-layout/grid-element-repeat-max-repetitions.html 15 16 * css/CSSParser.cpp: 17 (WebCore::CSSParser::parseGridTrackRepeatFunction): 18 1 19 2014-04-30 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebCore/css/CSSParser.cpp
r167877 r168108 151 151 static const unsigned INVALID_NUM_PARSED_PROPERTIES = UINT_MAX; 152 152 static const double MAX_SCALE = 1000000; 153 static const unsigned MAX_GRID_TRACK_REPETITIONS = 10000; 153 154 154 155 template <unsigned N> … … 5038 5039 ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); 5039 5040 size_t repetitions = arguments->valueAt(0)->fValue; 5041 // Clamp repetitions at MAX_GRID_TRACK_REPETITIONS. 5042 // http://www.w3.org/TR/css-grid-1/#repeat-notation 5043 if (repetitions > MAX_GRID_TRACK_REPETITIONS) 5044 repetitions = MAX_GRID_TRACK_REPETITIONS; 5040 5045 RefPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated(); 5041 5046 arguments->next(); // Skip the repetition count.
Note: See TracChangeset
for help on using the changeset viewer.