Changeset 221910 in webkit
- Timestamp:
- Sep 12, 2017 4:30:48 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r221869 r221910 1 2017-09-12 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Use transferred size over content size for automatic minimum size 4 https://bugs.webkit.org/show_bug.cgi?id=176688 5 6 Reviewed by Sergio Villar Senin. 7 8 Import changes on the tests related to the new behavior. 9 10 * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-006.html: 11 * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-007.html: 12 * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-008.html: 13 * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-009.html: 14 * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html: 15 * web-platform-tests/css/css-grid-1/grid-items/support/100x50-green.png: Removed. 16 * web-platform-tests/css/css-grid-1/grid-items/support/25x50-green.png: Added. 17 * web-platform-tests/css/css-grid-1/grid-items/support/50x100-green.png: Removed. 18 * web-platform-tests/css/css-grid-1/grid-items/support/50x25-green.png: Added. 19 * web-platform-tests/css/css-grid-1/grid-items/support/w3c-import.log: 20 1 21 2017-09-11 Joseph Pecoraro <pecoraro@apple.com> 2 22 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-006.html
r217652 r221910 6 6 <link rel="match" href="ref-filled-green-100px-square-image.html"> 7 7 <meta name="flags" content="image"> 8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for width (regardless the content size) and the transferred size for height (as it's smaller than the content size of the image).">8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for width (regardless the content size) and the transferred size of the image for height (even when content size is bigger)."> 9 9 <style> 10 10 #reference-overlapped-red { -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-007.html
r217652 r221910 6 6 <link rel="match" href="ref-filled-green-100px-square-image.html"> 7 7 <meta name="flags" content="image"> 8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for width (regardless the content size) and the content size for height (as it's smaller than the transferred size of the image).">8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for width (regardless the content size) and the transferred size of the image for height (even when content size is smaller)."> 9 9 <style> 10 10 #reference-overlapped-red { … … 18 18 #constrained-grid { 19 19 display: grid; 20 grid-template-columns: auto auto; 20 21 width: 10px; 21 22 height: 10px; 22 23 } 23 24 24 #test-grid-item-overlapping-green {25 width: 100px;25 .test-grid-item-overlapping-green { 26 width: 50px; 26 27 justify-self: stretch; 27 28 align-self: stretch; … … 32 33 <div id="reference-overlapped-red"></div> 33 34 <div id="constrained-grid"> 34 <img id="test-grid-item-overlapping-green" src="support/50x100-green.png" alt="Image download support must be enabled" /> 35 <img class="test-grid-item-overlapping-green" src="support/25x50-green.png" alt="Image download support must be enabled" /> 36 <img class="test-grid-item-overlapping-green" src="support/25x50-green.png" alt="Image download support must be enabled" /> 35 37 </div> 36 38 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-008.html
r217652 r221910 6 6 <link rel="match" href="ref-filled-green-100px-square-image.html"> 7 7 <meta name="flags" content="image"> 8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for height (regardless the content size) and the transferred size for width (as it's smaller than the content size of the image).">8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for height (regardless the content size) and the transferred size of the image for width (even when content size is bigger)."> 9 9 <style> 10 10 #reference-overlapped-red { -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-009.html
r217652 r221910 6 6 <link rel="match" href="ref-filled-green-100px-square-image.html"> 7 7 <meta name="flags" content="image"> 8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for height (regardless the content size) and the content size for width (as it's smaller than the transferred size of the image).">8 <meta name="assert" content="Checks that minimum size for grid items is the specified size for height (regardless the content size) and the transferred size for width of the image (even when content size is smaller)."> 9 9 <style> 10 10 #reference-overlapped-red { … … 22 22 } 23 23 24 #test-grid-item-overlapping-green {25 height: 100px;24 .test-grid-item-overlapping-green { 25 height: 50px; 26 26 justify-self: stretch; 27 27 align-self: stretch; … … 32 32 <div id="reference-overlapped-red"></div> 33 33 <div id="constrained-grid"> 34 <img id="test-grid-item-overlapping-green" src="support/100x50-green.png" alt="Image download support must be enabled" /> 34 <img class="test-grid-item-overlapping-green" src="support/50x25-green.png" alt="Image download support must be enabled" /> 35 <img class="test-grid-item-overlapping-green" src="support/50x25-green.png" alt="Image download support must be enabled" /> 35 36 </div> 36 37 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html
r217652 r221910 68 68 function runTests() { 69 69 checkGridSizeTracksAndImageSize("grid-1", "img-1", "200px", "200px", "200px", "200px", "200px", "200px"); 70 checkGridSizeTracksAndImageSize("grid-2", "img-2", "10px", "10px", "200px", " 50px", "200px", "200px");70 checkGridSizeTracksAndImageSize("grid-2", "img-2", "10px", "10px", "200px", "200px", "200px", "200px"); 71 71 checkGridSizeTracksAndImageSize("grid-3", "img-3", "200px", "50px", "200px", "50px", "200px", "200px"); 72 72 checkGridSizeTracksAndImageSize("grid-4", "img-4", "200px", "10px", "200px", "50px", "200px", "200px"); … … 74 74 checkGridSizeTracksAndImageSize("grid-6", "img-6", "200px", "10px", "50px", "50px", "50px", "50px"); 75 75 checkGridSizeTracksAndImageSize("grid-7", "img-7", "200px", "225px", "200px", "200px 25px", "200px", "200px"); 76 checkGridSizeTracksAndImageSize("grid-8", "img-8", "10px", "10px", "200px", " 50px 25px", "200px", "200px");76 checkGridSizeTracksAndImageSize("grid-8", "img-8", "10px", "10px", "200px", "200px 25px", "200px", "200px"); 77 77 checkGridSizeTracksAndImageSize("grid-9", "img-9", "200px", "125px", "200px", "100px 25px", "200px", "200px"); 78 checkGridSizeTracksAndImageSize("grid-10", "img-10", "200px", "10px", "200px", " 50px 25px", "200px", "200px");78 checkGridSizeTracksAndImageSize("grid-10", "img-10", "200px", "10px", "200px", "100px 25px", "200px", "200px"); 79 79 checkGridSizeTracksAndImageSize("grid-11", "img-11", "200px", "125px", "100px", "100px 25px", "100px", "100px"); 80 checkGridSizeTracksAndImageSize("grid-12", "img-12", "200px", "10px", "100px", " 50px 25px", "100px", "100px");80 checkGridSizeTracksAndImageSize("grid-12", "img-12", "200px", "10px", "100px", "100px 25px", "100px", "100px"); 81 81 checkGridSizeTracksAndImageSize("grid-13", "img-13", "200px", "200px", "200px", "200px", "200px", "200px"); 82 82 checkGridSizeTracksAndImageSize("grid-14", "img-14", "10px", "10px", "200px", "200px", "200px", "200px"); -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/w3c-import.log
r217652 r221910 16 16 List of files: 17 17 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/100x100-green.png 18 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/100x50-green.png19 18 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/200x200-green.png 19 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/25x50-green.png 20 20 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/500x500-green.png 21 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/50x 100-green.png21 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/50x25-green.png 22 22 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/grid-items/support/50x50-green.png -
trunk/Source/WebCore/ChangeLog
r221909 r221910 1 2017-09-12 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Use transferred size over content size for automatic minimum size 4 https://bugs.webkit.org/show_bug.cgi?id=176688 5 6 Reviewed by Sergio Villar Senin. 7 8 CSS WG has agreed to modify the spec so now the transferred size is used 9 (if it exists) independently if it's bigger or smaller 10 than the content size. 11 See: https://github.com/w3c/csswg-drafts/issues/1149 12 13 The spec text (https://drafts.csswg.org/css-grid/#min-size-auto): 14 "The automatic minimum size for a grid item in a given dimension is 15 its specified size if it exists, otherwise its transferred size 16 if that exists, else its content size" 17 18 This patch use the WPT tests updated to check the new behavior. 19 20 * rendering/GridTrackSizingAlgorithm.cpp: 21 (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): 22 Modified so it always returns the transferred size (if any). 23 1 24 2017-09-12 Fujii Hironori <Hironori.Fujii@sony.com> 2 25 -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r217709 r221910 787 787 788 788 bool overflowIsVisible = isRowAxis ? child.style().overflowInlineDirection() == OVISIBLE : child.style().overflowBlockDirection() == OVISIBLE; 789 if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) { 790 if (child.isRenderReplaced() && childSize.isAuto()) { 791 // If the box has an aspect ratio and no specified size, its automatic 792 // minimum size is the smaller of its content size and its transferred 793 // size. 794 return isRowAxis ? std::min(child.intrinsicLogicalWidth(), minContentForChild(child)) : std::min(child.intrinsicLogicalHeight(), minContentForChild(child)); 795 } 789 if (!childSize.isAuto() || (childMinSize.isAuto() && overflowIsVisible)) 796 790 return minContentForChild(child); 797 }798 791 799 792 bool overrideSizeHasChanged = updateOverrideContainingBlockContentSizeForChild(child, childInlineDirection);
Note: See TracChangeset
for help on using the changeset viewer.