WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
70839
fix sizing of auto sized flexbox
https://bugs.webkit.org/show_bug.cgi?id=70839
Summary
fix sizing of auto sized flexbox
Tony Chang
Reported
2011-10-25 12:34:18 PDT
fix sizing of auto sized flexbox
Attachments
Patch
(10.26 KB, patch)
2011-10-25 12:34 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(18.28 KB, patch)
2011-10-26 12:10 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(17.85 KB, patch)
2011-10-26 13:13 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(17.78 KB, patch)
2011-10-26 13:13 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Patch
(14.16 KB, patch)
2011-10-27 12:15 PDT
,
Tony Chang
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Tony Chang
Comment 1
2011-10-25 12:34:40 PDT
Created
attachment 112375
[details]
Patch
Tony Chang
Comment 2
2011-10-25 12:35:24 PDT
This patch needs more tests. I'm uploading it so Ojan can try it out a bit.
Tony Chang
Comment 3
2011-10-26 12:10:11 PDT
Created
attachment 112574
[details]
Patch
WebKit Review Bot
Comment 4
2011-10-26 12:11:59 PDT
Attachment 112574
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css2..." exit_code: 1 Source/WebCore/rendering/RenderImage.cpp:481: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/WebCore/rendering/RenderImage.cpp:500: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/WebCore/rendering/svg/RenderSVGRoot.cpp:273: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 3 in 49 files If any of these errors are false positives, please file a bug against check-webkit-style.
Ojan Vafai
Comment 5
2011-10-26 12:26:48 PDT
Comment on
attachment 112574
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=112574&action=review
Code changes look good to me. Just a couple nits.
> Source/WebCore/rendering/RenderFlexibleBox.cpp:709 > if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) > startEdge += availableFreeSpace / (childSizes.size() - 1); > } > + if (isColumnFlow() && flowAwareLogicalWidthLength().isAuto()) > + setFlowAwareLogicalWidth(startEdge);
Maybe add a flex-pack test case to ensure that the last addition of "availableFreeSpace / (childSizes.size() - 1)" gets the correct result?
> LayoutTests/css3/flexbox/columns-auto-size.html:53 > +<body onload="checkFlexBoxen(); checkFlexBoxen('flexbox-vertical-rl')">
I'm not opposed to this change, but it doesn't seem necessary. Just make vertical-rl a separate classname and make the class of these boxes be "flexbox vertical-rl". It's what we do in the other tests.
Tony Chang
Comment 6
2011-10-26 13:13:11 PDT
Created
attachment 112581
[details]
Patch
Tony Chang
Comment 7
2011-10-26 13:13:52 PDT
Created
attachment 112582
[details]
Patch
Tony Chang
Comment 8
2011-10-26 13:14:49 PDT
(In reply to
comment #5
)
> (From update of
attachment 112574
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=112574&action=review
> > > Source/WebCore/rendering/RenderFlexibleBox.cpp:709 > > if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) > > startEdge += availableFreeSpace / (childSizes.size() - 1); > > } > > + if (isColumnFlow() && flowAwareLogicalWidthLength().isAuto()) > > + setFlowAwareLogicalWidth(startEdge); > > Maybe add a flex-pack test case to ensure that the last addition of "availableFreeSpace / (childSizes.size() - 1)" gets the correct result?
Done, although it's not that interesting because with an auto height, the available free space is always 0.
> > LayoutTests/css3/flexbox/columns-auto-size.html:53 > > +<body onload="checkFlexBoxen(); checkFlexBoxen('flexbox-vertical-rl')"> > > I'm not opposed to this change, but it doesn't seem necessary. Just make vertical-rl a separate classname and make the class of these boxes be "flexbox vertical-rl". It's what we do in the other tests.
Done (had to add a horizontal class, but that's not a big deal).
Dave Hyatt
Comment 9
2011-10-26 13:34:13 PDT
Comment on
attachment 112582
[details]
Patch Minusing as per discussion in IRC. I think you need to back up and implement preferred widths.
Dave Hyatt
Comment 10
2011-10-26 13:38:41 PDT
Comment on
attachment 112582
[details]
Patch r=me
Tony Chang
Comment 11
2011-10-27 12:15:14 PDT
Created
attachment 112727
[details]
Patch
Dave Hyatt
Comment 12
2011-10-27 12:26:31 PDT
Comment on
attachment 112727
[details]
Patch r=me
Tony Chang
Comment 13
2011-10-27 13:30:16 PDT
Committed
r98628
: <
http://trac.webkit.org/changeset/98628
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug