Bug 96676 - Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent
Summary: Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-13 11:44 PDT by Tony Chang
Modified: 2012-09-13 12:49 PDT (History)
5 users (show)

See Also:


Attachments
Patch (6.15 KB, patch)
2012-09-13 11:46 PDT, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (7.50 KB, patch)
2012-09-13 12:12 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 Tony Chang 2012-09-13 11:44:21 PDT
Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent
Comment 1 Tony Chang 2012-09-13 11:46:24 PDT
Created attachment 163923 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-09-13 11:50:23 PDT
Comment on attachment 163923 [details]
Patch

Looks reasonable.  Unclear why these are different in the first place.  Emil, Levi care to comment?
Comment 3 Ojan Vafai 2012-09-13 11:54:17 PDT
Comment on attachment 163923 [details]
Patch

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

Looks great!

> Source/WebCore/rendering/RenderFlexibleBox.cpp:614
>  LayoutUnit RenderFlexibleBox::computeAvailableFreeSpace(LayoutUnit preferredMainAxisExtent)

This is only called in one place. Inline it?
Comment 4 Tony Chang 2012-09-13 12:08:23 PDT
(In reply to comment #2)
> (From update of attachment 163923 [details])
> Looks reasonable.  Unclear why these are different in the first place.  Emil, Levi care to comment?

Why what is different?  The first parameter passed to computeLogicalHeight?  It's the size of the content when we're getting the height.  When computing free space for flexing, it's based on the flex basis of each flex item.  When computing line breaking, we imagine that the content is infinite to see if we have to break for some reason (e.g., if a max-height is set, we would break on that).
Comment 5 Tony Chang 2012-09-13 12:12:36 PDT
Created attachment 163930 [details]
Patch for landing
Comment 6 WebKit Review Bot 2012-09-13 12:49:13 PDT
Comment on attachment 163930 [details]
Patch for landing

Clearing flags on attachment: 163930

Committed r128494: <http://trac.webkit.org/changeset/128494>
Comment 7 WebKit Review Bot 2012-09-13 12:49:16 PDT
All reviewed patches have been landed.  Closing bug.