[Webkit-unassigned] [Bug 128372] [CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 19 04:02:03 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=128372





--- Comment #5 from Javier Fernandez <jfernandez at igalia.com>  2014-02-19 03:59:14 PST ---
(In reply to comment #2)
> (From update of attachment 223649 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223649&action=review
> 
> r=me, although concerned about the one function I called out.
> 
> > Source/WebCore/rendering/RenderGrid.cpp:269
> > +static bool gridElementIsShrinkToFit(const RenderStyle& style)
> > +{
> > +    return style.isFloating() || style.position() == AbsolutePosition;
> > +}
> 
> This looks suspicious to me. Are you wanting to catch everybody that just sizes intrinsically? This is not enough if so.

Well, the patch tries to implement what it's stated in the Grid Layout specifications:

http://www.w3.org/TR/css-grid-1/#RemainingSpace-definition

"The max of zero and the AvailableSpace less the sum of all Grid track UsedBreadth values. This is undefined if AvailableSpace is undefined (i.e. the Grid element is shrink-to-fit or the height is auto.)"

It wasn't obvious how to implement this shrink-to-fit behavior. so I assumed that it was triggered whenever a floating or positioned object is rendered. 

Would you mind suggesting some alternative approaches ?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list