Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Issue 289903007: Inline flexbox width is wrongly calculated when wrapping vertically (Closed)

Created:
6 years, 7 months ago by harpreet.sk
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Inline flexbox width is wrongly calculated when wrapping vertically Inline flexbox width is calculated wrongly when flow of flexbox is column and flex-wrap property set to wrap or wrap-reverse. The width is calculated as if inside elements were layed out horizontally. This results in extra unnecessary space. This patch fixes this bug by removing lines that set the maxPreferredWidth with the assumptions that children of flex item will be layed out horizontally and maxPrefferedWidth is set as width of flex-item having maximum contribution. BUG=247963 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178925

Patch Set 1 #

Total comments: 6

Patch Set 2 #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 12

Patch Set 7 : Addressing comments of patch set 6 #

Total comments: 7

Patch Set 8 : Addressing comments of patch set 7 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+581 lines, -441 lines) Patch
A LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html View 1 2 3 4 5 6 7 1 chunk +143 lines, -0 lines 0 comments Download
A + LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/css3/flexbox/multiline.html View 1 2 3 4 5 6 8 chunks +56 lines, -56 lines 0 comments Download
M LayoutTests/css3/flexbox/multiline-align-self.html View 1 2 3 4 5 6 8 chunks +128 lines, -128 lines 0 comments Download
M LayoutTests/css3/flexbox/multiline-justify-content.html View 1 2 3 4 5 6 8 chunks +240 lines, -240 lines 0 comments Download
M LayoutTests/css3/flexbox/multiline-shrink-to-fit.html View 1 2 3 4 5 6 4 chunks +4 lines, -4 lines 0 comments Download
M LayoutTests/css3/flexbox/multiline-shrink-to-fit-expected.html View 1 2 3 4 5 6 3 chunks +8 lines, -8 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 1 2 3 4 5 6 1 chunk +1 line, -5 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
harpreet.sk
PTAL
6 years, 7 months ago (2014-05-16 10:55:56 UTC) #1
harpreet.sk
6 years, 7 months ago (2014-05-19 08:35:04 UTC) #2
tony
https://codereview.chromium.org/289903007/diff/1/Source/core/rendering/RenderFlexibleBox.cpp File Source/core/rendering/RenderFlexibleBox.cpp (right): https://codereview.chromium.org/289903007/diff/1/Source/core/rendering/RenderFlexibleBox.cpp#newcode104 Source/core/rendering/RenderFlexibleBox.cpp:104: totalChildHeight += child->style()->height().value(); Is this correct? What about min-height? ...
6 years, 7 months ago (2014-05-19 16:14:42 UTC) #3
tony
https://codereview.chromium.org/289903007/diff/1/LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html File LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html (right): https://codereview.chromium.org/289903007/diff/1/LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html#newcode9 LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html:9: <div style="width: 20px; border: 1px solid red;">a</div> Please include ...
6 years, 7 months ago (2014-05-19 16:17:21 UTC) #4
harpreet.sk
Uploaded new solution... Please have a look https://codereview.chromium.org/289903007/diff/1/LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html File LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html (right): https://codereview.chromium.org/289903007/diff/1/LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html#newcode9 LayoutTests/fast/flexbox/inline-flexbox-wrap-vertically-width-calculation.html:9: <div style="width: ...
6 years, 5 months ago (2014-07-18 15:46:49 UTC) #5
harpreet.sk
ping....
6 years, 5 months ago (2014-07-21 17:08:54 UTC) #6
tony
https://codereview.chromium.org/289903007/diff/100001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html File LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html (right): https://codereview.chromium.org/289903007/diff/100001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html#newcode11 LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html:11: -webkit-writing-mode: vertical-lr; I would use vertical-rl instead. Neither are ...
6 years, 5 months ago (2014-07-21 17:50:59 UTC) #7
harpreet.sk
Changes has been incorporated... ptal... https://codereview.chromium.org/289903007/diff/100001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html File LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html (right): https://codereview.chromium.org/289903007/diff/100001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html#newcode11 LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html:11: -webkit-writing-mode: vertical-lr; On 2014/07/21 ...
6 years, 5 months ago (2014-07-22 10:10:23 UTC) #8
tony
https://codereview.chromium.org/289903007/diff/120001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html File LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html (right): https://codereview.chromium.org/289903007/diff/120001/LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html#newcode46 LayoutTests/css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html:46: <div class="inline-flexbox column align-content-flex-start wrap" style="width: 50%" data-expected-width="150" data-expected-height="60"> ...
6 years, 5 months ago (2014-07-22 16:42:03 UTC) #9
harpreet.sk
Changes has been incorporated... some new test cases has been added including column-reverse and wrap-reverse... ...
6 years, 5 months ago (2014-07-23 13:43:24 UTC) #10
tony
LGTM
6 years, 5 months ago (2014-07-23 16:07:41 UTC) #11
harpreet.sk
@leviw: Require owner's lgtm
6 years, 5 months ago (2014-07-23 16:15:06 UTC) #12
esprehn
On 2014/07/23 16:15:06, harpreet.sk wrote: > @leviw: Require owner's lgtm rslgtm based on tony' s ...
6 years, 5 months ago (2014-07-25 09:24:45 UTC) #13
harpreet.sk
The CQ bit was checked by harpreet.sk@samsung.com
6 years, 5 months ago (2014-07-25 10:08:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/289903007/140001
6 years, 5 months ago (2014-07-25 10:09:49 UTC) #15
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 11:04:10 UTC) #16
Message was sent while issue was closed.
Change committed as 178925

Powered by Google App Engine
This is Rietveld 408576698