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

Issue 1639723003: [css-flexbox] Use correct aspect ratio for min-size: auto (Closed)

Created:
4 years, 10 months ago by cbiesinger
Modified:
4 years, 10 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-flexbox] Use correct aspect ratio for min-size: auto https://codereview.chromium.org/1421423005 caused this regression. We never handled aspect ratio correctly in flexbox (that's bug 249112), but that patch made our handling worse because we now distort and enlarge images when a cross axis size is specified that's bigger than the image's intrinsic size. This was tested by imported/csswg-test/css-flexbox-1/flex-minimum-height-flex-items-008.xht which we now pass. I didn't realize the significance of failing that test at the time :( BUG=581361, 581535 R=leviw@chromium.org Committed: https://crrev.com/eba8fa267c94a76faff64836a8c72a683c1a538e Cr-Commit-Position: refs/heads/master@{#372000}

Patch Set 1 #

Total comments: 8

Patch Set 2 : more tests & a bugfix #

Total comments: 2

Patch Set 3 : remove empty loine #

Patch Set 4 : now also handling min/max #

Total comments: 4

Patch Set 5 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -7 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 chunks +8 lines, -5 lines 0 comments Download
A third_party/WebKit/LayoutTests/css3/flexbox/minimum-size-image.html View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 8 chunks +86 lines, -2 lines 0 comments Download

Messages

Total messages: 36 (14 generated)
cbiesinger
4 years, 10 months ago (2016-01-27 02:57:47 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/1
4 years, 10 months ago (2016-01-27 02:59:08 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-27 04:12:03 UTC) #5
leviw_travelin_and_unemployed
https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp (right): https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp#newcode638 third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp:638: crossSize = child.styleRef().height(); Do we have tests for both ...
4 years, 10 months ago (2016-01-27 04:53:56 UTC) #6
cbiesinger
With more tests, an additional bugfix, and a slight refactoring for computeMainSizeFromAspectRatio (for easier use ...
4 years, 10 months ago (2016-01-27 21:42:56 UTC) #7
cbiesinger
With more tests, an additional bugfix, and a slight refactoring for computeMainSizeFromAspectRatio (for easier use ...
4 years, 10 months ago (2016-01-27 21:42:56 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/20001
4 years, 10 months ago (2016-01-27 21:45:22 UTC) #10
leviw_travelin_and_unemployed
LGTM :) https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp (right): https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp#newcode638 third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp:638: crossSize = child.styleRef().height(); On 2016/01/27 at 21:42:56, ...
4 years, 10 months ago (2016-01-27 23:18:45 UTC) #11
cbiesinger
https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp (right): https://codereview.chromium.org/1639723003/diff/1/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp#newcode679 third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp:679: bool LayoutFlexibleBox::crossAxisLengthIsDefinite(const LayoutBox& child, const Length& length) const On ...
4 years, 10 months ago (2016-01-27 23:25:25 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/40001
4 years, 10 months ago (2016-01-27 23:26:11 UTC) #15
cbiesinger
I just realized that this does not take min/max-width into account but it should. Let ...
4 years, 10 months ago (2016-01-27 23:33:25 UTC) #17
cbiesinger
Levi - this now also fixes http://crbug.com/581535. It's easier to merge to 49 as a ...
4 years, 10 months ago (2016-01-28 00:21:56 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/60001
4 years, 10 months ago (2016-01-28 00:24:03 UTC) #21
leviw_travelin_and_unemployed
https://codereview.chromium.org/1639723003/diff/60001/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp (right): https://codereview.chromium.org/1639723003/diff/60001/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp#newcode1009 third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp:1009: if ((crossMax.isFixed() || crossMax.hasPercent()) && crossAxisLengthIsDefinite(child, crossMax)) { You ...
4 years, 10 months ago (2016-01-28 00:37:59 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/80001
4 years, 10 months ago (2016-01-28 00:42:26 UTC) #24
cbiesinger
PTAL! https://codereview.chromium.org/1639723003/diff/60001/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp (right): https://codereview.chromium.org/1639723003/diff/60001/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp#newcode1009 third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp:1009: if ((crossMax.isFixed() || crossMax.hasPercent()) && crossAxisLengthIsDefinite(child, crossMax)) { ...
4 years, 10 months ago (2016-01-28 00:42:48 UTC) #25
leviw_travelin_and_unemployed
I like this better. LGTM.
4 years, 10 months ago (2016-01-28 02:36:38 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639723003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639723003/80001
4 years, 10 months ago (2016-01-28 03:04:21 UTC) #29
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-01-28 03:58:00 UTC) #31
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/eba8fa267c94a76faff64836a8c72a683c1a538e Cr-Commit-Position: refs/heads/master@{#372000}
4 years, 10 months ago (2016-01-28 03:59:10 UTC) #33
PhistucK
Should object-fit and object-position affect the result?
4 years, 10 months ago (2016-01-28 15:20:13 UTC) #35
cbiesinger
4 years, 10 months ago (2016-01-28 17:55:15 UTC) #36
Message was sent while issue was closed.
On 2016/01/28 15:20:13, PhistucK wrote:
> Should object-fit and object-position affect the result?

I don't think so. The flexbox spec makes no mention of it. Feel free to email
www-style though.

Powered by Google App Engine
This is Rietveld 408576698