Bug 191938 - [css-grid] absolute positioned child is sized wrongly when using auto-fit, generating spurious collapsed tracks
Summary: [css-grid] absolute positioned child is sized wrongly when using auto-fit, ge...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Javier Fernandez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-24 01:40 PST by Javier Fernandez
Modified: 2018-11-26 04:10 PST (History)
8 users (show)

See Also:


Attachments
Test case to reproduce the issue (1.15 KB, text/html)
2018-11-24 01:40 PST, Javier Fernandez
no flags Details
Patch (8.59 KB, patch)
2018-11-24 01:52 PST, Javier Fernandez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (2.62 MB, application/zip)
2018-11-24 04:37 PST, Build Bot
no flags Details
Patch (8.62 KB, patch)
2018-11-26 02:20 PST, Javier Fernandez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2018-11-24 01:40:58 PST
Created attachment 355558 [details]
Test case to reproduce the issue

What steps will reproduce the problem?
(1) load the attached testcase
(2)
(3)

What is the expected result?
In the top two grids, all <span>s should be 30px wide (the width of one column).
In the last grid, all <span>s should be 65px wide (the width of two columns with a 5px grid gap in-between).

What happens instead?
All abs.pos. boxes (pink color) are 5px too short.
This how Firefox renders this case, which seems correct per the CSS Grid spec.
Comment 1 Javier Fernandez 2018-11-24 01:52:10 PST
Created attachment 355560 [details]
Patch
Comment 2 Build Bot 2018-11-24 04:37:05 PST
Comment on attachment 355560 [details]
Patch

Attachment 355560 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10127719

New failing tests:
imported/w3c/web-platform-tests/webrtc/simplecall-no-ssrcs.https.html
media/no-fullscreen-when-hidden.html
Comment 3 Build Bot 2018-11-24 04:37:06 PST
Created attachment 355562 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 4 Manuel Rego Casasnovas 2018-11-26 01:55:00 PST
Comment on attachment 355560 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355560&action=review

Thanks for fixing this. If this was fixed before in Blink could you link the bug from "See also" field?

> Source/WebCore/ChangeLog:3
> +        [css-grid] grid abs.pos. child is sized wrongly when using auto-fit and it generates some collapsed tracks

Nit: This title might be reworded :-)

> Source/WebCore/rendering/RenderGrid.cpp:395
> +            // We shouldn't count the gap if the the span starts and ends in a collapsed but there isn't non-empty tracks afterwards (it's at the end of the grid).

Nit: s/collapsed/collapsed track/
Comment 5 Javier Fernandez 2018-11-26 02:20:11 PST
Created attachment 355628 [details]
Patch
Comment 6 WebKit Commit Bot 2018-11-26 04:09:13 PST
Comment on attachment 355628 [details]
Patch

Clearing flags on attachment: 355628

Committed r238491: <https://trac.webkit.org/changeset/238491>
Comment 7 WebKit Commit Bot 2018-11-26 04:09:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-11-26 04:10:44 PST
<rdar://problem/46241477>