Bug 108975 - [CSS Grid Layout] Grid item's logical height is not properly recomputed after -webkit-grid-column / -webkit-grid-row changes
Summary: [CSS Grid Layout] Grid item's logical height is not properly recomputed after...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks: 103311
  Show dependency treegraph
 
Reported: 2013-02-05 13:13 PST by Julien Chaffraix
Modified: 2013-02-05 19:02 PST (History)
6 users (show)

See Also:


Attachments
Proposed fix: Add the missing clear logical height override. (12.21 KB, patch)
2013-02-05 14:22 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2013-02-05 13:13:11 PST
In RenderGrid::minContentForChild / maxContentForChild, we only set the containing block's override logical width:

     if (child->needsLayout()) {
         size_t columnTrack = resolveGridPosition(ForColumns, child);
         child->setOverrideContainingBlockContentLogicalWidth(columnTracks[columnTrack].m_usedBreadth);
         child->layout();
     }

This means that we can be reading a previous layout's containing block's override logical height! I would expect other part of the code to be wrong in the same way as we don't have any coverage of dynamic updates but this bug should solve that.
Comment 1 Julien Chaffraix 2013-02-05 14:22:06 PST
Created attachment 186706 [details]
Proposed fix: Add the missing clear logical height override.
Comment 2 Tony Chang 2013-02-05 14:36:05 PST
Comment on attachment 186706 [details]
Proposed fix: Add the missing clear logical height override.

Seems fine to me.  This is similar to what we do in flexbox.  You need to clear override sizes right before you layout.
Comment 3 WebKit Review Bot 2013-02-05 19:02:48 PST
Comment on attachment 186706 [details]
Proposed fix: Add the missing clear logical height override.

Clearing flags on attachment: 186706

Committed r141963: <http://trac.webkit.org/changeset/141963>
Comment 4 WebKit Review Bot 2013-02-05 19:02:52 PST
All reviewed patches have been landed.  Closing bug.