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

Issue 343103003: Flexbox: Allow intrinsic aspect ratios to inform main-size calculation (Closed)

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

Description

Flexbox: Allow intrinsic aspect ratios to inform main-size calculation According to the http://dev.w3.org/csswg/css-flexbox/#algo-main-item point B states that: If the flex item has a) an intrinsic aspect ratio, b) a flex basis of 'auto', and c) a definite cross size then the flex base size is calculated from its inner cross size and the flex item’s intrinsic aspect ratio. The current implementation does not handle properly this case. This patch fixes this bug by allowing support for aspect ratio while calculation of main-size calculation in RenderFlexibleBox::preferredMainAxisContentExtentForChild. Bug=249112

Patch Set 1 : WIP Patch #

Total comments: 4

Patch Set 2 : WIP Patch 2 #

Total comments: 4

Patch Set 3 : WIP Patch 3: Addressing comments of WIP Patch 2 #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -8 lines) Patch
A LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation.html View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation-expected.txt View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
A + LayoutTests/css3/images/resources/green-100x50.png View 1 Binary file 0 comments Download
M Source/core/rendering/RenderFlexibleBox.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 1 2 3 2 chunks +53 lines, -1 line 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderReplaced.cpp View 1 2 3 2 chunks +1 line, -7 lines 0 comments Download

Messages

Total messages: 15 (1 generated)
harpreet.sk
PTAL. According to the description given in crbug.com/249112 what i understood is to implement point ...
6 years, 6 months ago (2014-06-20 05:55:45 UTC) #1
tony
https://codereview.chromium.org/343103003/diff/1/LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation.html File LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation.html (right): https://codereview.chromium.org/343103003/diff/1/LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation.html#newcode11 LayoutTests/css3/flexbox/aspect-ratios-main-size-calculation.html:11: -webkit-aspect-ratio: 1 / 2; We should have a test ...
6 years, 6 months ago (2014-06-23 16:50:58 UTC) #2
harpreet.sk
I have tried to incorporate the comments mention in previous patch and also added all ...
6 years, 6 months ago (2014-06-26 14:41:49 UTC) #3
tony
Tab, what are you thoughts on the aspect ratio parts of the flexbox spec. AFAICT, ...
6 years, 6 months ago (2014-06-26 16:25:32 UTC) #4
tony
https://codereview.chromium.org/343103003/diff/20001/Source/core/rendering/RenderFlexibleBox.cpp File Source/core/rendering/RenderFlexibleBox.cpp (right): https://codereview.chromium.org/343103003/diff/20001/Source/core/rendering/RenderFlexibleBox.cpp#newcode628 Source/core/rendering/RenderFlexibleBox.cpp:628: void RenderFlexibleBox::computeAspectRatioOfChild(RenderBox* child, double& aspectRatio, bool& hasAspectRatio) The bool ...
6 years, 6 months ago (2014-06-26 16:31:29 UTC) #5
harpreet.sk
Uploaded new patch addressing comments of previous patch. Please have a look. https://codereview.chromium.org/343103003/diff/20001/Source/core/rendering/RenderFlexibleBox.cpp File Source/core/rendering/RenderFlexibleBox.cpp ...
6 years, 5 months ago (2014-06-30 09:26:07 UTC) #6
harpreet.sk
PING
6 years, 5 months ago (2014-07-01 15:02:07 UTC) #7
harpreet.sk
PING
6 years, 5 months ago (2014-07-07 13:45:35 UTC) #8
tony
Sorry, I was on vacation last week. Please contact the www-style mailing list about this ...
6 years, 5 months ago (2014-07-07 16:52:11 UTC) #9
harpreet.sk
On 2014/07/07 16:52:11, tony wrote: > Sorry, I was on vacation last week. > > ...
6 years, 4 months ago (2014-08-01 13:43:55 UTC) #10
harpreet.sk
On 2014/07/07 16:52:11, tony wrote: > Sorry, I was on vacation last week. > > ...
6 years, 4 months ago (2014-08-05 08:57:25 UTC) #11
tony
I'll review the code after you upload some more test cases and have passing tests ...
6 years, 4 months ago (2014-08-06 16:37:40 UTC) #12
rwlbuis
@cbiesinger I think this can be closed since the issue is marked as WontFix?
4 years, 1 month ago (2016-11-16 14:48:18 UTC) #14
cbiesinger
4 years, 1 month ago (2016-11-19 01:51:49 UTC) #15
On 2016/11/16 14:48:18, rwlbuis wrote:
> @cbiesinger I think this can be closed since the issue is marked as WontFix?

Yep. I verified that the testcase passes, except for two cases where the spec
has changed. Closing.

Powered by Google App Engine
This is Rietveld 408576698