Bug 83572 - Height overflow when nesting multiple new Flexbox'es.
: Height overflow when nesting multiple new Flexbox'es.
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: 528+ (Nightly build)
: Macintosh Intel Mac OS X 10.6
: P2 Critical
Assigned To: Tony Chang
http://jsfiddle.net/simurai/BQW3Y/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-10 05:59 PDT by simurai
Modified: 2012-05-03 16:21 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.01 KB, patch)
2012-05-03 14:35 PDT, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (6.46 KB, patch)
2012-05-03 14:56 PDT, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description simurai 2012-04-10 05:59:48 PDT
It appears that when nesting multiple "new" Flexbox'es, the total height of its flexible children are overflowing.

See: http://jsfiddle.net/simurai/BQW3Y/

Note: In the old Flexbox ( display: -webkit-box; ) it works fine.
Comment 1 Tony Chang 2012-05-03 13:02:02 PDT
*** Bug 85490 has been marked as a duplicate of this bug. ***
Comment 2 Tony Chang 2012-05-03 14:35:53 PDT
Created attachment 140094 [details]
Patch
Comment 3 Ojan Vafai 2012-05-03 14:44:45 PDT
Comment on attachment 140094 [details]
Patch

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

> Source/WebCore/rendering/RenderFlexibleBox.cpp:606
> +        return overrideContentLogicalHeight - preferredMainAxisExtent;

Now that all return cases subtract preferredMainAxisExtent, I wonder if we should rename this method computeMainAxisExtent and subtract preferredMainAxisExtent in the one calling location.

Up to you.
Comment 4 Tony Chang 2012-05-03 14:56:16 PDT
Created attachment 140101 [details]
Patch for landing
Comment 5 Tony Chang 2012-05-03 14:57:24 PDT
(In reply to comment #3)
> (From update of attachment 140094 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=140094&action=review
> 
> > Source/WebCore/rendering/RenderFlexibleBox.cpp:606
> > +        return overrideContentLogicalHeight - preferredMainAxisExtent;
> 
> Now that all return cases subtract preferredMainAxisExtent, I wonder if we should rename this method computeMainAxisExtent and subtract preferredMainAxisExtent in the one calling location.

I did a variation that subtracts preferredMainAxisExtent at the end of the method.  It's convenient that the concept of available free space is a function.
Comment 6 WebKit Review Bot 2012-05-03 16:21:01 PDT
Comment on attachment 140101 [details]
Patch for landing

Clearing flags on attachment: 140101

Committed r116038: <http://trac.webkit.org/changeset/116038>
Comment 7 WebKit Review Bot 2012-05-03 16:21:10 PDT
All reviewed patches have been landed.  Closing bug.