WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 197854
[css-grid] Use max size to compute auto repeat tracks
https://bugs.webkit.org/show_bug.cgi?id=197854
Summary
[css-grid] Use max size to compute auto repeat tracks
Manuel Rego Casasnovas
Reported
2019-05-13 15:05:35 PDT
This issues comes from a bug report in Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1544854
The example to reproduce the issue is:
https://bug1544854.bmoattachments.org/attachment.cgi?id=9058982
We should have 3 columns, when we have only 1. The reason is that we don't use max-width to compute the columns. Spec is very clear about that (
https://drafts.csswg.org/css-grid/#auto-repeat
):
> When auto-fill is given as the repetition number, > if the grid container has a definite size or **max size** in the relevant axis
Attachments
Patch
(29.10 KB, patch)
2019-05-13 15:11 PDT
,
Manuel Rego Casasnovas
no flags
Details
Formatted Diff
Diff
Patch
(27.93 KB, patch)
2019-05-13 15:36 PDT
,
Manuel Rego Casasnovas
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews212 for win-future
(13.51 MB, application/zip)
2019-05-14 01:26 PDT
,
EWS Watchlist
no flags
Details
Patch for landing
(27.96 KB, patch)
2019-05-14 07:33 PDT
,
Manuel Rego Casasnovas
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Manuel Rego Casasnovas
Comment 1
2019-05-13 15:11:17 PDT
Created
attachment 369784
[details]
Patch
Oriol Brufau
Comment 2
2019-05-13 15:31:20 PDT
Comment on
attachment 369784
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=369784&action=review
> LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log:28 > +/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-auto-repeat-tracks.html
Actually, this one will be imported in
https://bugs.webkit.org/show_bug.cgi?id=197849
, not here
> LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log:51 > +/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html
And this one in
https://bugs.webkit.org/show_bug.cgi?id=197840
Manuel Rego Casasnovas
Comment 3
2019-05-13 15:35:42 PDT
Comment on
attachment 369784
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=369784&action=review
Thanks for the review, issues fixed on the new version.
>> LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log:28 >> +/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-auto-repeat-tracks.html > > Actually, this one will be imported in
https://bugs.webkit.org/show_bug.cgi?id=197849
, not here
True, I forgot to update w3c-import.log sorry.
>> LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log:51 >> +/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html > > And this one in
https://bugs.webkit.org/show_bug.cgi?id=197840
Ditto.
Manuel Rego Casasnovas
Comment 4
2019-05-13 15:36:13 PDT
Created
attachment 369790
[details]
Patch
Manuel Rego Casasnovas
Comment 5
2019-05-14 00:57:02 PDT
Comment on
attachment 369790
[details]
Patch Thanks for the informal review Oriol, but you're not reviewer yet, so I need an official review from someone else. Javi could you take a look?
EWS Watchlist
Comment 6
2019-05-14 01:26:10 PDT
Comment on
attachment 369790
[details]
Patch
Attachment 369790
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/12185544
New failing tests: js/dom/custom-constructors.html
EWS Watchlist
Comment 7
2019-05-14 01:26:12 PDT
Created
attachment 369826
[details]
Archive of layout-test-results from ews212 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews212 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Javier Fernandez
Comment 8
2019-05-14 02:10:43 PDT
Comment on
attachment 369790
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=369790&action=review
> Source/WebCore/rendering/RenderGrid.cpp:463 > + LayoutUnit availableMaxSize = LayoutUnit();
I don't think we need to initialize to LayoutUnit()
> Source/WebCore/rendering/RenderGrid.cpp:472 > + if (!availableMaxSize && !minSize.isSpecified())
I think the use of ! here is confusing (it may imply the availableMaxSize is an optional value) Wouldn't be better (clearer) to use > 0 instead ?
> Source/WebCore/rendering/RenderGrid.cpp:475 > + LayoutUnit availableMinSize = LayoutUnit();
Ditto
Manuel Rego Casasnovas
Comment 9
2019-05-14 07:33:50 PDT
Created
attachment 369843
[details]
Patch for landing
Manuel Rego Casasnovas
Comment 10
2019-05-14 07:40:41 PDT
Comment on
attachment 369790
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=369790&action=review
Thanks for the review.
>> Source/WebCore/rendering/RenderGrid.cpp:463 >> + LayoutUnit availableMaxSize = LayoutUnit(); > > I don't think we need to initialize to LayoutUnit()
Ok.
>> Source/WebCore/rendering/RenderGrid.cpp:472 >> + if (!availableMaxSize && !minSize.isSpecified()) > > I think the use of ! here is confusing (it may imply the availableMaxSize is an optional value) Wouldn't be better (clearer) to use > 0 instead ?
Ok, I've made it Optional so it's clearer now.
>> Source/WebCore/rendering/RenderGrid.cpp:475 >> + LayoutUnit availableMinSize = LayoutUnit(); > > Ditto
Ok.
WebKit Commit Bot
Comment 11
2019-05-14 08:08:52 PDT
Comment on
attachment 369843
[details]
Patch for landing Clearing flags on attachment: 369843 Committed
r245279
: <
https://trac.webkit.org/changeset/245279
>
WebKit Commit Bot
Comment 12
2019-05-14 08:08:53 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13
2019-05-14 08:09:29 PDT
<
rdar://problem/50766816
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug