Changeset 217709 in webkit
- Timestamp:
- Jun 2, 2017 4:35:27 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r217705 r217709 1 2017-06-02 Javier Fernandez <jfernandez@igalia.com> 2 3 [css-grid] Logical margin incorrectly applied during the tracks sizing algorithm of auto tracks 4 https://bugs.webkit.org/show_bug.cgi?id=172836 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Test to verify different cases of auto-sized tracks and orthogonal items with margins. 9 10 * fast/css-grid-layout/grid-track-sizing-with-margins-and-orthogonal-flows-expected.txt: Added. 11 * fast/css-grid-layout/grid-track-sizing-with-margins-and-orthogonal-flows.html: Added. 12 1 13 2017-06-02 Javier Fernandez <jfernandez@igalia.com> 2 14 -
trunk/LayoutTests/TestExpectations
r217705 r217709 287 287 webkit.org/b/149891 imported/w3c/web-platform-tests/css/css-grid-1/grid-layout-properties.html [ Failure ] 288 288 webkit.org/b/169271 imported/w3c/web-platform-tests/css/css-grid-1/grid-items/grid-items-sizing-alignment-001.html [ ImageOnlyFailure ] 289 webkit.org/b/172836 imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-014.html [ Failure ]290 webkit.org/b/172836 imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014.html [ Failure ]291 webkit.org/b/172836 imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014.html [ Failure ]292 289 293 290 # selectors4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-014-expected.txt
r217652 r217709 4 4 XX X 5 5 6 FAIL .grid 1 assert_equals: 7 <div class="grid"> 8 <div data-offset-x="0" data-offset-y="0" data-expected-width="110" data-expected-height="80" class="firstRowFirstColumn">XX X</div> 9 <div data-offset-x="120" data-offset-y="0" data-expected-width="20" data-expected-height="110" class="firstRowSecondColumn">XX X</div> 10 <div data-offset-x="0" data-offset-y="130" data-expected-width="20" data-expected-height="80" class="secondRowFirstColumn">XX X</div> 11 <div data-offset-x="120" data-offset-y="130" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div> 12 </div> 13 width expected 110 but got 120 6 PASS .grid 1 14 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-lr-014-expected.txt
r217652 r217709 4 4 XX X 5 5 6 FAIL .grid 1 assert_equals: 7 <div class="grid"> 8 <div data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="110" class="firstRowFirstColumn">XX X</div> 9 <div data-offset-x="0" data-offset-y="120" data-expected-width="110" data-expected-height="20" class="firstRowSecondColumn">XX X</div> 10 <div data-offset-x="130" data-offset-y="0" data-expected-width="80" data-expected-height="20" class="secondRowFirstColumn">XX X</div> 11 <div data-offset-x="130" data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div> 12 </div> 13 height expected 110 but got 120 6 PASS .grid 1 14 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-vertical-rl-014-expected.txt
r217652 r217709 4 4 XX X 5 5 6 FAIL .grid 1 assert_equals: 7 <div class="grid"> 8 <div data-offset-x="170" data-offset-y="0" data-expected-width="80" data-expected-height="110" class="firstRowFirstColumn">XX X</div> 9 <div data-offset-x="120" data-offset-y="120" data-expected-width="110" data-expected-height="20" class="firstRowSecondColumn">XX X</div> 10 <div data-offset-x="40" data-offset-y="0" data-expected-width="80" data-expected-height="20" class="secondRowFirstColumn">XX X</div> 11 <div data-offset-x="0" data-offset-y="120" data-expected-width="110" data-expected-height="110" class="secondRowSecondColumn">XX X</div> 12 </div> 13 height expected 110 but got 120 6 PASS .grid 1 14 7 -
trunk/Source/WebCore/ChangeLog
r217708 r217709 1 2017-06-02 Javier Fernandez <jfernandez@igalia.com> 2 3 [css-grid] Logical margin incorrectly applied during the tracks sizing algorithm of auto tracks 4 https://bugs.webkit.org/show_bug.cgi?id=172836 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 When computing min-content and max-content of the content-sized tracks 9 we are using the marginIntrinsicLogicalWidthForChild function, which 10 uses the grid's writing-mode to determine wether to use the child's 11 margin width or height. This is not correct when the grid item is 12 orthogonal. 13 14 This patch changes how we compute the tracks width so we use always 15 the item's marginLogicalWidth, which depends only on its own writing 16 mode. 17 18 Test: fast/css-grid-layout/grid-track-sizing-with-margins-and-orthogonal-flows.html 19 20 * rendering/GridTrackSizingAlgorithm.cpp: 21 (WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild): 22 (WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild): 23 1 24 2017-06-02 Emilio Cobos Álvarez <ecobos@igalia.com> 2 25 -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r216574 r217709 750 750 // FIXME: It's unclear if we should return the intrinsic width or the preferred width. 751 751 // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html 752 return child.minPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(renderGrid(), child); 752 LayoutUnit marginLogicalWidth = child.needsLayout() ? computeMarginLogicalSizeForChild(childInlineDirection, *renderGrid(), child) : child.marginLogicalWidth(); 753 return child.minPreferredLogicalWidth() + marginLogicalWidth; 753 754 } 754 755 … … 769 770 // FIXME: It's unclear if we should return the intrinsic width or the preferred width. 770 771 // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html 771 return child.maxPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(renderGrid(), child); 772 LayoutUnit marginLogicalWidth = child.needsLayout() ? computeMarginLogicalSizeForChild(childInlineDirection, *renderGrid(), child) : child.marginLogicalWidth(); 773 return child.maxPreferredLogicalWidth() + marginLogicalWidth; 772 774 } 773 775
Note: See TracChangeset
for help on using the changeset viewer.