Changeset 201399 in webkit
- Timestamp:
- May 25, 2016 12:52:53 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201397 r201399 1 2016-05-25 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Update <fixed-size> syntax 4 https://bugs.webkit.org/show_bug.cgi?id=158063 5 6 Reviewed by Darin Adler. 7 8 Updated test to check the new expected behavior. 9 10 * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt: 11 * fast/css-grid-layout/grid-element-auto-repeat-get-set.html: 12 1 13 2016-05-25 Zalan Bujtas <zalan@apple.com> 2 14 -
trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt
r200821 r201399 16 16 PASS element.style.gridTemplateColumns is "repeat(auto-fill, minmax(50px, 100px)) 250px 250px" 17 17 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "450px 50px [bar] 50px [bar foo] 10px [foo] 10px" 18 PASS element.style.gridTemplateRows is "450px repeat(auto-fill, minmax( 5em, -webkit-max-content) [bar]) [foo] 1em [foo] 1em"18 PASS element.style.gridTemplateRows is "450px repeat(auto-fill, minmax(-webkit-max-content, 5em) [bar]) [foo] 1em [foo] 1em" 19 19 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]" 20 20 PASS element.style.gridTemplateColumns is "[start] 10% repeat(auto-fill, [foo bar] 200px) [end]" … … 57 57 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 58 58 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 59 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"60 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"61 59 PASS successfullyParsed is true 62 60 -
trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html
r200618 r201399 14 14 testGridTemplatesSetJSValues("repeat(auto-fill, [foo bar] 200px)", "repeat(auto-fill, 20em [foo bar])", "[foo bar] 200px [foo bar] 200px [foo bar] 200px [foo bar] 200px", "200px [foo bar] 200px [foo bar] 200px [foo bar]"); 15 15 testGridTemplatesSetJSValues("repeat(auto-fill, [foo bar] minmax(300px, 1fr))", "repeat(auto-fill, [foo] minmax(175px, -webkit-max-content) [bar])", "[foo bar] 400px [foo bar] 400px", "[foo] 175px [bar foo] 175px [bar foo] 175px [bar]"); 16 testGridTemplatesSetJSValues("repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)", "repeat(1, 450px) repeat(auto-fill, minmax( 5em, -webkit-max-content) [bar]) repeat(2, [foo] 1em)", "100px 100px 100px 250px 250px", "450px 50px [bar] 50px [bar foo] 10px [foo] 10px", "repeat(auto-fill, minmax(50px, 100px)) 250px 250px", "450px repeat(auto-fill, minmax(5em, -webkit-max-content) [bar]) [foo] 1em [foo] 1em");16 testGridTemplatesSetJSValues("repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)", "repeat(1, 450px) repeat(auto-fill, minmax(-webkit-max-content, 5em) [bar]) repeat(2, [foo] 1em)", "100px 100px 100px 250px 250px", "450px 50px [bar] 50px [bar foo] 10px [foo] 10px", "repeat(auto-fill, minmax(50px, 100px)) 250px 250px", "450px repeat(auto-fill, minmax(-webkit-max-content, 5em) [bar]) [foo] 1em [foo] 1em"); 17 17 testGridTemplatesSetJSValues("[start] 10% repeat(auto-fill, [foo bar] 200px) [end]", "75px [prev] repeat(auto-fill, 20em [foo bar]) [next] 15em [last end]", "[start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]", "75px [prev] 200px [foo bar next] 150px [last end]"); 18 18 testGridTemplatesSetJSValues("repeat(auto-fit, [foo bar] 150px)", "repeat(auto-fit, 24em [foo bar])", "none", "none"); … … 31 31 32 32 testInvalidSyntax("repeat(auto-fill, 1fr)"); 33 testInvalidSyntax("repeat(auto-fill, minmax(-webkit-min-content, 20px))");34 33 testInvalidSyntax("repeat(auto-fill, [bar] auto)"); 35 34 testInvalidSyntax("repeat(auto-fill, 20px 10px)"); … … 38 37 testInvalidSyntax("repeat(auto-fill, [foo])"); 39 38 testInvalidSyntax("repeat(auto-fit, 1fr)"); 40 testInvalidSyntax("repeat(auto-fit, minmax(-webkit-min-content, 20px))");41 39 testInvalidSyntax("repeat(auto-fit, [bar] auto)"); 42 40 testInvalidSyntax("repeat(auto-fit, 20px 10px)"); -
trunk/Source/WebCore/ChangeLog
r201398 r201399 1 2016-05-25 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Update <fixed-size> syntax 4 https://bugs.webkit.org/show_bug.cgi?id=158063 5 6 Reviewed by Darin Adler. 7 8 The syntax for <fixed-size> has been updated on the spec: 9 https://drafts.csswg.org/css-grid/#typedef-fixed-size 10 11 New syntax is: 12 <fixed-size> = 13 <fixed-breadth> | 14 minmax( <fixed-breadth> , <track-breadth> ) | 15 minmax( <inflexible-breadth> , <fixed-breadth> ) 16 17 This means that it's enough to have one <fixed-breadth>, 18 it doesn't matter if it's as minimum or maximum. 19 Before it was required that the minimum was fixed. 20 21 * css/CSSParser.cpp: 22 (WebCore::isGridTrackFixedSized): 23 * rendering/RenderGrid.cpp: 24 (WebCore::RenderGrid::computeAutoRepeatTracksCount): 25 1 26 2016-05-25 Alex Christensen <achristensen@webkit.org> 2 27 -
trunk/Source/WebCore/css/CSSParser.cpp
r201382 r201399 5818 5818 } 5819 5819 5820 static bool isGridTrackFixedSized(const CSSPrimitiveValue& value) 5821 { 5822 CSSValueID valueID = value.getValueID(); 5823 if (valueID == CSSValueWebkitMinContent || valueID == CSSValueWebkitMaxContent || valueID == CSSValueAuto || value.isFlex()) 5824 return false; 5825 5826 ASSERT(value.isLength() || value.isPercentage() || value.isCalculated()); 5827 return true; 5828 } 5829 5820 5830 static bool isGridTrackFixedSized(const CSSValue& value) 5821 5831 { 5822 ASSERT(value.isPrimitiveValue() || (value.isFunctionValue() && downcast<CSSFunctionValue>(value).arguments()));5823 const auto& primitiveValue = value.isPrimitiveValue()5824 ? downcast<CSSPrimitiveValue>(value) 5825 : downcast<CSSPrimitiveValue>(*downcast<CSSFunctionValue>(value).arguments()->item(0));5826 CSSValueID valueID = primitiveValue.getValueID();5827 if (valueID == CSSValueWebkitMinContent || valueID == CSSValueWebkitMaxContent || valueID == CSSValueAuto || primitiveValue.isFlex())5828 return false; 5829 5830 ASSERT(primitiveValue.isLength() || primitiveValue.isPercentage() || primitiveValue.isCalculated());5831 return true;5832 if (value.isPrimitiveValue()) 5833 return isGridTrackFixedSized(downcast<CSSPrimitiveValue>(value)); 5834 5835 ASSERT(value.isFunctionValue()); 5836 ASSERT(downcast<CSSFunctionValue>(value).arguments()); 5837 ASSERT(downcast<CSSFunctionValue>(value).arguments()->length() == 2); 5838 5839 auto& min = downcast<CSSPrimitiveValue>(*downcast<CSSFunctionValue>(value).arguments()->item(0)); 5840 auto& max = downcast<CSSPrimitiveValue>(*downcast<CSSFunctionValue>(value).arguments()->item(1)); 5841 return isGridTrackFixedSized(min) || isGridTrackFixedSized(max); 5832 5842 } 5833 5843 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r201379 r201399 1228 1228 auto autoTrackSize = autoRepeatTracks.at(0); 1229 1229 ASSERT(autoTrackSize.minTrackBreadth().isLength()); 1230 ASSERT(!autoTrackSize.minTrackBreadth().is ContentSized());1230 ASSERT(!autoTrackSize.minTrackBreadth().isFlex()); 1231 1231 1232 1232 Optional<LayoutUnit> availableSize = isRowAxis ? availableLogicalWidth() : computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), Nullopt);
Note: See TracChangeset
for help on using the changeset viewer.