Bug 195964

Summary: [css-grid] Minimum contribution doesn't always take baseline shim into consideration
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jfernandez, rego, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.chromium.org/p/chromium/issues/detail?id=934535
Attachments:
Description Flags
testcase
none
Patch
none
Patch none

Oriol Brufau
Reported 2019-03-19 14:49:26 PDT
Created attachment 365231 [details] testcase What steps will reproduce the problem? (1) Create a grid with two fixed columns and a `minmax(auto, 0)` row. (2) Place two items in the grid, and align their baselines (3) Add `padding-top:50px` to the 1st item, let it have a baseline below the padding. (3) Add `padding-bottom:50px` to the 2nd item, let it have a baseline above the padding. What is the expected result? The height of the row is the greatest minimum contribution. Since height is auto, the minimum contribution is the outer height that the items would have if their heights were the used values of their minimum heights. Their minimum heights are auto which here behaves as 0, so the outer heights will be 100 (0px content height, plus 50px padding, plus 0px normal margin, plus 50px baseline shim margin). Therefore, the row (cyan in the testcase) should be 100px tall, just like if we used `min-height: 0` instead of `min-height: auto` on the items. What happens instead? The row is only 50px tall. The spec is not clear about the interaction of minimum contribution and baseline shim (https://github.com/w3c/csswg-drafts/issues/3660), but what WebKit does doesn't make sense. `min-height:auto` shouldn't produce a smaller track than `min-height:0` Chromium was already fixed in https://bugs.chromium.org/p/chromium/issues/detail?id=934535
Attachments
testcase (750 bytes, text/html)
2019-03-19 14:49 PDT, Oriol Brufau
no flags
Patch (20.60 KB, patch)
2019-03-19 15:00 PDT, Oriol Brufau
no flags
Patch (20.59 KB, patch)
2019-03-20 10:11 PDT, Oriol Brufau
no flags
Oriol Brufau
Comment 1 2019-03-19 15:00:39 PDT
Javier Fernandez
Comment 2 2019-03-19 15:48:07 PDT
Comment on attachment 365234 [details] Patch Looks good, as long as the bots are green.
WebKit Commit Bot
Comment 3 2019-03-20 09:45:09 PDT
Comment on attachment 365234 [details] Patch Rejecting attachment 365234 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 365234, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=365234&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=195964&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Updating working directory Processing patch 365234 from bug 195964. Fetching: https://bugs.webkit.org/attachment.cgi?id=365234 Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Committing to http://svn.webkit.org/repository/webkit/trunk ... A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html M LayoutTests/imported/w3c/ChangeLog M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log M Source/WebCore/ChangeLog ERROR from SVN: Item is out of date: File '/trunk/Source/WebCore/ChangeLog' is out of date W: 9229637d130fe19c5b93040c1db50996c749fe2c and refs/remotes/origin/master differ, using rebase: :040000 040000 f0627e2d57d4c9b9d1eb8c314697e95466c9b980 383e153249e7b21326fb05caa0f2717c71d16e97 M LayoutTests :040000 040000 aab153d347c467d129220c4523eff4ca615846c4 d352dc6edc806e3b6acbb551a0a3f739bd5aff01 M Source Current branch master is up to date. ERROR: Not all changes have been committed into SVN, however the committed ones (if any) seem to be successfully integrated into the working tree. Please see the above messages for details. Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Committing to http://svn.webkit.org/repository/webkit/trunk ... A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl-expected.txt A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html M LayoutTests/imported/w3c/ChangeLog M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log M Source/WebCore/ChangeLog ERROR from SVN: Item is out of date: File '/trunk/Source/WebCore/ChangeLog' is out of date W: 9229637d130fe19c5b93040c1db50996c749fe2c and refs/remotes/origin/master differ, using rebase: :040000 040000 f0627e2d57d4c9b9d1eb8c314697e95466c9b980 383e153249e7b21326fb05caa0f2717c71d16e97 M LayoutTests :040000 040000 aab153d347c467d129220c4523eff4ca615846c4 d352dc6edc806e3b6acbb551a0a3f739bd5aff01 M Source Current branch master is up to date. ERROR: Not all changes have been committed into SVN, however the committed ones (if any) seem to be successfully integrated into the working tree. Please see the above messages for details. Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Updating OpenSource From https://git.webkit.org/git/WebKit 0c9d3f66ea6..9dd2cdb1e1a master -> origin/master Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 243206 = 0c9d3f66ea6b0fafb552532f67d88d437da52d40 r243207 = ad08870b435b8f6d7340e474911b958f859494ec r243208 = 0cd12762d833d2dd4927fdc1537824f9d703117e r243209 = 856a0d6c95bbfd0cd52be8a0e195c38d86f5da71 r243210 = 9dd2cdb1e1a91d368652c0e85a9a3f0758321db0 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: https://webkit-queues.webkit.org/results/11581048
Oriol Brufau
Comment 4 2019-03-20 10:11:06 PDT
Oriol Brufau
Comment 5 2019-03-20 10:15:39 PDT
Not sure what happened, I have rebased the patch.
WebKit Commit Bot
Comment 6 2019-03-20 11:26:46 PDT
Comment on attachment 365351 [details] Patch Clearing flags on attachment: 365351 Committed r243218: <https://trac.webkit.org/changeset/243218>
WebKit Commit Bot
Comment 7 2019-03-20 11:26:48 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2019-03-20 11:27:20 PDT
Note You need to log in before you can comment on or make changes to this bug.