Bug 80882 - flex-item-align: stretch should only grow, never shrink
: flex-item-align: stretch should only grow, never shrink
Status: RESOLVED FIXED
: WebKit
Layout and Rendering
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
: 62048
  Show dependency treegraph
 
Reported: 2012-03-12 13:51 PST by
Modified: 2012-03-19 12:23 PST (History)


Attachments
Patch (12.76 KB, patch)
2012-03-16 15:11 PST, Tony Chang
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (12.78 KB, patch)
2012-03-16 15:35 PST, Tony Chang
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-03-12 13:51:49 PST
9.1 of the layout algorithm says:
"If a flexbox item has ‘flex-item-align:stretch' and its preferred cross size is 'auto' and its margin-box cross size is smaller than cross-size of its flexbox line, its final cross size is set so that its margin-box cross size is equal to cross-size of its flexbox line."

http://dev.w3.org/csswg/css3-flexbox/#layout-algorithm
------- Comment #1 From 2012-03-16 15:11:16 PST -------
Created an attachment (id=132390) [details]
Patch
------- Comment #2 From 2012-03-16 15:31:42 PST -------
(From update of attachment 132390 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=132390&action=review

> Source/WebCore/rendering/RenderFlexibleBox.cpp:1014
> +void RenderFlexibleBox::alignChildStretch(RenderBox* child, LayoutUnit lineCrossAxisExtent)

Nit: I find this method name awkward. It reads to me as if it's aligning the stretch itself (which is nonsensical). applyChildStretch perhaps?
------- Comment #3 From 2012-03-16 15:35:40 PST -------
Created an attachment (id=132403) [details]
Patch for landing
------- Comment #4 From 2012-03-16 15:36:00 PST -------
(In reply to comment #2)
> (From update of attachment 132390 [details] [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132390&action=review
> 
> > Source/WebCore/rendering/RenderFlexibleBox.cpp:1014
> > +void RenderFlexibleBox::alignChildStretch(RenderBox* child, LayoutUnit lineCrossAxisExtent)
> 
> Nit: I find this method name awkward. It reads to me as if it's aligning the stretch itself (which is nonsensical). applyChildStretch perhaps?

Now named applyStretchAlignmentToChild.
------- Comment #5 From 2012-03-16 17:16:55 PST -------
(From update of attachment 132403 [details])
Clearing flags on attachment: 132403

Committed r111094: <http://trac.webkit.org/changeset/111094>
------- Comment #6 From 2012-03-16 17:17:00 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #7 From 2012-03-16 18:29:47 PST -------
Reverted r111094 for reason:

broke

Committed r111103: <http://trac.webkit.org/changeset/111103>
------- Comment #8 From 2012-03-19 12:11:22 PST -------
Committed r111214: <http://trac.webkit.org/changeset/111214>
------- Comment #9 From 2012-03-19 12:23:24 PST -------
css3/flexbox/child-overflow.html was failing due to https://bugs.webkit.org/show_bug.cgi?id=77368, so I just landed with it marked as failing in test_expectations.txt.