Bug 94855

Summary: flex item sized incorrectly in a column flexbox with height set via top/bottom
Product: WebKit Reporter: Steve Orvell <sorvell>
Component: CSSAssignee: Tony Chang <tony>
Severity: Normal CC: eric, ojan, tony, webkit.review.bot
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: Macintosh Intel   
OS: OS X 10.7   
Bug Depends on: 94982    
Bug Blocks: 62048    
Description Flags
Reduction showing actual and expected output.
corrected reduction
Patch for landing none

Description Steve Orvell 2012-08-23 14:29:02 PDT
Created attachment 160246 [details]
Reduction showing actual and expected output.

If a display: -webkit-flex element with flex-flow: column is itself sized by fitting to another container via: setting position absolute + top, bottom, right, left all to 0, then its flex items lose their flexibility and appear to have natural size. 

Note, this problem only occurs for column flex-flow, row is ok. Further, setting height: 100% is ok.
Comment 1 Steve Orvell 2012-08-23 14:35:08 PDT
Created attachment 160251 [details]
corrected reduction
Comment 2 Ojan Vafai 2012-08-23 14:45:28 PDT
Yup, looks like a bug. Not sure where exactly the bug is though.
Comment 3 Tony Chang 2012-08-23 14:52:16 PDT
(In reply to comment #2)
> Yup, looks like a bug. Not sure where exactly the bug is though.

I think it's because we do our own calculation of height by calling computeLogicalClientHeight directly in RenderFlexibleBox::mainAxisContentExtent. It doesn't look like computeLogicalClientHeight handles absolute sized boxes.  If you look at computeLogicalHeight, it does:
    if (isOutOfFlowPositioned())

Ok, I think I now know enough to fix this bug :)
Comment 4 Tony Chang 2012-08-24 17:03:12 PDT
Sorry, it's going to take a while to fix this bug.  I need to fix bug 94982 first, and that's going to take a while.
Comment 5 Tony Chang 2012-09-12 15:49:04 PDT
Created attachment 163723 [details]
Comment 6 Ojan Vafai 2012-09-12 16:16:01 PDT
Comment on attachment 163723 [details]

Add a FIXME for mainAxisContentExtent to be used for all the places we call computeLogicalHeight(...)?
Comment 7 Tony Chang 2012-09-12 16:22:16 PDT
Created attachment 163729 [details]
Patch for landing
Comment 8 WebKit Review Bot 2012-09-12 16:48:22 PDT
Comment on attachment 163729 [details]
Patch for landing

Clearing flags on attachment: 163729

Committed r128383: <http://trac.webkit.org/changeset/128383>
Comment 9 WebKit Review Bot 2012-09-12 16:48:25 PDT
All reviewed patches have been landed.  Closing bug.