Summary: | [css-grid] [css-flex] Width of table as grid/flex item is infinite when the sum of columns' width exceed 100% | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Javier Fernandez <jfernandez> | ||||||||
Component: | Layout and Rendering | Assignee: | Sergio Villar Senin <svillar> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, changseok, clopez, dino, esprehn+autocc, ews-watchlist, ggaren, glenn, jfernandez, kondapallykalyan, pdr, rego, simon.fraser, svillar, webkit-bug-importer, youennf, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: |
https://bugs.chromium.org/p/chromium/issues/detail?id=850566 https://bugs.webkit.org/show_bug.cgi?id=210103 |
||||||||||
Attachments: |
|
Created attachment 399952 [details]
Patch
*** Bug 210103 has been marked as a duplicate of this bug. *** Created attachment 399953 [details]
Patch
Improved ChangeLog
Comment on attachment 399953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399953&action=review r+ > Source/WebCore/ChangeLog:3 > + [css-grid] width of table in a grid is incorrect when table cell has width:100% This is also for flexbox, so please reword the title adding [css-flex] and mentioning flexbox too. > Source/WebCore/rendering/AutoTableLayout.cpp:201 > + // The max logical width of a table may be "infinity" (or tableMaxWidth, to > + // be more exact) if the sum of the columns' percentages is 100% or more, > + // AND there is at least one column that has a non-percentage-based positive > + // logical width. In such situations no table logical width will be large > + // enough to satisfy the constraint set by the contents. So the idea is to > + // use ~infinity to make sure we use all available size in the containing > + // block. However, this just doesn't work if this is a flex or grid item, so > + // disallow scaling in that case. Nit: You don't need to wrap comments to 80 chars in WebKit. Comment on attachment 399953 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399953&action=review Thanks! >> Source/WebCore/ChangeLog:3 >> + [css-grid] width of table in a grid is incorrect when table cell has width:100% > > This is also for flexbox, so please reword the title adding [css-flex] and mentioning flexbox too. Hmmm the bug was about grid and I marked the flex one as duplicate. I guess I could reword the title in the bug and the update this. >> Source/WebCore/rendering/AutoTableLayout.cpp:201 >> + // disallow scaling in that case. > > Nit: You don't need to wrap comments to 80 chars in WebKit. Yeah, it was the editor that formatted it like that. I'll expand it a bit. Committed r261996: <https://trac.webkit.org/changeset/261996> |
Created attachment 354094 [details] Test case to reproduce the issue Steps to reproduce the problem: 1. Load the attached test case What is the expected behavior? The width of the columns (yellow and green boxes) should be just 1ch What went wrong? The width of the columns are 999969 px.