Bug 232140 - [CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area
Summary: [CSS-grid] Need to set prefer width dirty for the child that has constraints ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zsun
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-22 03:42 PDT by zsun
Modified: 2021-10-25 10:53 PDT (History)
10 users (show)

See Also:


Attachments
Patch (9.43 KB, patch)
2021-10-22 04:00 PDT, zsun
no flags Details | Formatted Diff | Diff
Patch (10.59 KB, patch)
2021-10-25 03:40 PDT, zsun
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zsun 2021-10-22 03:42:39 PDT
When the column size of a grid area changes, we need to set prefer width dirty for the child that has width constraints to the grid area.
Comment 1 zsun 2021-10-22 04:00:59 PDT
Created attachment 442148 [details]
Patch
Comment 2 Sergio Villar Senin 2021-10-22 05:43:19 PDT
Comment on attachment 442148 [details]
Patch

Nice!
Comment 3 Javier Fernandez 2021-10-24 15:42:05 PDT
Comment on attachment 442148 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        reset the OverrideContainingBlockLogicalWidth value when we are executing a definite strategy.

This is only performed when the Direction() is the InlineAxis (kForColumns if it's not an orthogonal item). However, the updateOverridingContainingBlockContentSizeForChild() call is executed when we are processing the BlockAxis direction (kForRows under the alerady mentioned assumption of a parallel item).

> Source/WebCore/ChangeLog:12
> +

I'm not sure this is correct. The grid item's preferred width shouldn't depend on its containing block (the grid area in this case) size, should it ?
Comment 4 zsun 2021-10-25 03:40:36 PDT
Created attachment 442357 [details]
Patch
Comment 5 zsun 2021-10-25 03:41:27 PDT
(In reply to Javier Fernandez from comment #3)
> Comment on attachment 442148 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442148&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        reset the OverrideContainingBlockLogicalWidth value when we are executing a definite strategy.
> 
> This is only performed when the Direction() is the InlineAxis (kForColumns
> if it's not an orthogonal item). However, the
> updateOverridingContainingBlockContentSizeForChild() call is executed when
> we are processing the BlockAxis direction (kForRows under the alerady
> mentioned assumption of a parallel item).
> 
> > Source/WebCore/ChangeLog:12
> > +
> 
> I'm not sure this is correct. The grid item's preferred width shouldn't
> depend on its containing block (the grid area in this case) size, should it ?

Thanks very much for the comments and the offline discussions. The patch has now been updated.
Comment 6 EWS 2021-10-25 10:52:48 PDT
Committed r284793 (243502@main): <https://commits.webkit.org/243502@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442357 [details].
Comment 7 Radar WebKit Bug Importer 2021-10-25 10:53:23 PDT
<rdar://problem/84621191>