Changeset 261894 in webkit
- Timestamp:
- May 19, 2020 4:50:25 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r261863 r261894 1 2020-05-19 Oriol Brufau <obrufau@igalia.com> 2 3 Fix marginLogicalSizeForChild to check auto margins in the right axis 4 https://bugs.webkit.org/show_bug.cgi?id=212055 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Import new WPT test. 9 10 * web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001-expected.txt: Added. 11 * web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html: Added. 12 * web-platform-tests/css/css-grid/grid-items/w3c-import.log: 13 1 14 2020-05-14 Sergio Villar Senin <svillar@igalia.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log
r261841 r261894 85 85 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-inline-blocks-001-expected.xht 86 86 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-inline-blocks-001.html 87 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html 87 88 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-001.html 88 89 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-002.html -
trunk/Source/WebCore/ChangeLog
r261893 r261894 1 2020-05-19 Oriol Brufau <obrufau@igalia.com> 2 3 Fix marginLogicalSizeForChild to check auto margins in the right axis 4 https://bugs.webkit.org/show_bug.cgi?id=212055 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 GridLayoutFunctions::marginLogicalSizeForChild checks for 'auto' margins 9 before retrieving the margin size, since these should be treated as 0. 10 However, for orthogonal grid items, it used to check the wrong axis. 11 So if an item had 'margin-top: auto' and 'margin-left: 5px', when asking 12 for the horizontal margin we could get 0px instead of 5px due to the 13 auto margin in the vertical axis. 14 15 Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html 16 17 * rendering/GridLayoutFunctions.cpp: 18 (WebCore::GridLayoutFunctions::marginLogicalSizeForChild): 19 1 20 2020-05-19 Jacob Uphoff <jacob_uphoff@apple.com> 2 21 -
trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp
r244115 r261894 70 70 if (child.needsLayout()) 71 71 return computeMarginLogicalSizeForChild(grid, direction, child); 72 bool isRowAxis = flowAwareDirectionForChild(grid, child, direction) == ForColumns; 73 LayoutUnit marginStart = marginStartIsAuto(child, direction) ? 0_lu : isRowAxis ? child.marginStart() : child.marginBefore(); 74 LayoutUnit marginEnd = marginEndIsAuto(child, direction) ? 0_lu : isRowAxis ? child.marginEnd() : child.marginAfter(); 72 GridTrackSizingDirection flowAwareDirection = GridLayoutFunctions::flowAwareDirectionForChild(grid, child, direction); 73 bool isRowAxis = flowAwareDirection == ForColumns; 74 LayoutUnit marginStart = marginStartIsAuto(child, flowAwareDirection) ? 0_lu : isRowAxis ? child.marginStart() : child.marginBefore(); 75 LayoutUnit marginEnd = marginEndIsAuto(child, flowAwareDirection) ? 0_lu : isRowAxis ? child.marginEnd() : child.marginAfter(); 75 76 return marginStart + marginEnd; 76 77 }
Note: See TracChangeset
for help on using the changeset viewer.