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

Issue 2065243003: [css-sizing] Ensure positive available size on replaced elements

Created:
4 years, 6 months ago by jfernandez
Modified:
3 years, 6 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-sizing] Ensure positive available size on replaced elements When computing the preferred widths of replaced elements some values need to be ignored, since we can't computed them properly before performing a layout. We have protected already some cases in r143539 (commit 40beaf69), like fit-content, fit-available or percentage and calculated values. However, we still need to protect cases where these content-dependent values are used on min-width/max-width properties. BUG=635019

Patch Set 1 #

Total comments: 4

Patch Set 2 : New approach. #

Patch Set 3 : 'auto' width should be computed on container's constrained size. #

Patch Set 4 : We only need to address the min-width codepath. #

Patch Set 5 : Don't mess with max-width. #

Patch Set 6 : Address only fit-content and fit-available cases. #

Patch Set 7 : A different approach. #

Total comments: 4

Patch Set 8 : Defining a new term 'isLayoutDependent' for Length. #

Patch Set 9 : Added some comments for the new Length API function. #

Patch Set 10 : Rebaselined test. #

Patch Set 11 : Rebaselined test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -10 lines) Patch
M chrome/test/data/plugin_power_saver/poster_tests_expected.png View 1 2 3 4 5 6 7 8 9 10 Binary file 0 comments Download
M chrome/test/data/plugin_power_saver/smaller_than_play_icon_expected.png View 1 2 3 4 5 6 7 8 9 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fill-available-max-width-with-zero-width-container-should-not-crash.html View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fill-available-min-width-with-zero-width-container-should-not-crash.html View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-max-width-with-zero-width-container-should-not-crash.html View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-min-width-with-zero-width-container-should-not-crash.html View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutReplaced.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/Length.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 63 (19 generated)
jfernandez
4 years, 6 months ago (2016-06-15 14:28:35 UTC) #3
cbiesinger
https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2842 third_party/WebKit/Source/core/layout/LayoutBox.cpp:2842: const LayoutUnit cw = std::max(LayoutUnit(), isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(toLayoutBoxModelObject(container())) : ...
4 years, 5 months ago (2016-06-27 18:43:49 UTC) #4
jfernandez
https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2842 third_party/WebKit/Source/core/layout/LayoutBox.cpp:2842: const LayoutUnit cw = std::max(LayoutUnit(), isOutOfFlowPositioned() ? containingBlockLogicalWidthForPositioned(toLayoutBoxModelObject(container())) : ...
4 years, 5 months ago (2016-06-27 21:38:43 UTC) #5
jfernandez
@cbiesigner What do you think about this ? Perhaps @rune and @mstensho think we should ...
4 years, 5 months ago (2016-07-14 09:52:47 UTC) #7
mstensho (USE GERRIT)
I think we need to get to the bottom of this. Simplified test (based on ...
4 years, 4 months ago (2016-08-09 11:35:26 UTC) #8
jfernandez
On 2016/08/09 11:35:26, mstensho wrote: > I think we need to get to the bottom ...
4 years, 4 months ago (2016-08-18 19:20:29 UTC) #9
jfernandez
https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-min-width-with-zero-width-container-should-not-crash.html File third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-min-width-with-zero-width-container-should-not-crash.html (right): https://codereview.chromium.org/2065243003/diff/1/third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-min-width-with-zero-width-container-should-not-crash.html#newcode12 third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-min-width-with-zero-width-container-should-not-crash.html:12: <script src="../../resources/js-test.js"></script> On 2016/08/09 11:35:26, mstensho wrote: > Nothing ...
4 years, 4 months ago (2016-08-18 19:21:10 UTC) #10
mstensho (USE GERRIT)
On 2016/08/18 19:20:29, jfernandez wrote: > On 2016/08/09 11:35:26, mstensho wrote: > > I think ...
4 years, 4 months ago (2016-08-23 11:28:33 UTC) #11
mstensho (USE GERRIT)
Any progress here?
4 years, 1 month ago (2016-10-31 12:03:24 UTC) #12
jfernandez
On 2016/10/31 12:03:24, mstensho wrote: > Any progress here? Not yet, sorry. I was busy ...
4 years, 1 month ago (2016-11-02 09:35:04 UTC) #13
jfernandez
@mstensho, what do you think about the new approach ?
4 years, 1 month ago (2016-11-02 19:19:22 UTC) #15
jfernandez
On 2016/11/02 19:19:22, jfernandez wrote: > @mstensho, what do you think about the new approach ...
4 years, 1 month ago (2016-11-03 20:37:04 UTC) #16
jfernandez
PatchSet 7 looks like the way to go. It might need some code clean up, ...
4 years, 1 month ago (2016-11-04 13:19:44 UTC) #17
cbiesinger
seems reasonable to me, lgtm, but please also let Morten take a look
4 years, 1 month ago (2016-11-10 19:31:21 UTC) #18
mstensho (USE GERRIT)
I think this makes sense, but you need to update the commit comment now, right? ...
4 years, 1 month ago (2016-11-10 19:54:25 UTC) #19
jfernandez
https://codereview.chromium.org/2065243003/diff/120001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2065243003/diff/120001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode3263 third_party/WebKit/Source/core/layout/LayoutBox.cpp:3263: style()->logicalMaxWidth().isFillAvailable())) || On 2016/11/10 19:54:25, mstensho wrote: > So, ...
4 years, 1 month ago (2016-11-10 20:54:39 UTC) #20
jfernandez
PatchSet7 defines a new term 'isLayoutDependent" which includes the cases we need to avoid when ...
4 years, 1 month ago (2016-11-15 10:12:06 UTC) #22
mstensho (USE GERRIT)
It may turn out that different object types will need to define different length types ...
4 years, 1 month ago (2016-11-17 20:01:23 UTC) #23
jfernandez
Added @esprehn and @tkent as platform OWNERs .
4 years, 1 month ago (2016-11-18 09:13:53 UTC) #25
tkent
third_party/WebKit/Source/platform/Length.h lgtm. It's a simple reasonable change.
4 years, 1 month ago (2016-11-18 09:15:39 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2065243003/160001
4 years, 1 month ago (2016-11-18 09:17:29 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/338584)
4 years, 1 month ago (2016-11-18 11:23:30 UTC) #31
cbiesinger
lgtm
4 years, 1 month ago (2016-11-18 23:53:29 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2065243003/160001
4 years, 1 month ago (2016-11-21 09:15:48 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/319020)
4 years, 1 month ago (2016-11-21 11:16:31 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2065243003/160001
4 years ago (2016-11-25 00:21:12 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/342507)
4 years ago (2016-11-25 01:57:23 UTC) #40
jfernandez
It seems my patch causes 2 browser tests to fail: - PluginPowerSaverBrowserTest.SmallerThanPlayIcon - PluginPowerSaverBrowserTest.PosterTests I ...
4 years ago (2016-11-25 10:10:09 UTC) #41
jfernandez
Even though a rebasline of SmallerThanPlayIcon seems correct, and the bots indicate so, the PosterTests ...
3 years, 11 months ago (2017-01-18 18:40:25 UTC) #44
jfernandez
pleas tommycli@, could you please take a look ?
3 years, 10 months ago (2017-02-08 23:54:48 UTC) #46
tommycli
On 2017/02/08 23:54:48, jfernandez wrote: > pleas tommycli@, could you please take a look ? ...
3 years, 10 months ago (2017-02-08 23:58:19 UTC) #47
jfernandez
On 2017/02/08 23:58:19, tommycli wrote: > On 2017/02/08 23:54:48, jfernandez wrote: > > pleas tommycli@, ...
3 years, 10 months ago (2017-02-09 08:34:17 UTC) #48
tommycli
On 2017/02/09 08:34:17, jfernandez wrote: > On 2017/02/08 23:58:19, tommycli wrote: > > On 2017/02/08 ...
3 years, 10 months ago (2017-02-09 18:41:01 UTC) #49
jfernandez
Please, cbiesinger@, could you take a look at this patch ? As it was commented ...
3 years, 9 months ago (2017-03-01 00:08:15 UTC) #50
Manuel Rego
On 2017/03/01 00:08:15, jfernandez wrote: > These new cases are the ones that cause the ...
3 years, 9 months ago (2017-03-01 14:06:17 UTC) #51
jfernandez
On 2017/03/01 14:06:17, Manuel Rego wrote: > On 2017/03/01 00:08:15, jfernandez wrote: > > These ...
3 years, 9 months ago (2017-03-01 15:06:15 UTC) #52
jfernandez
Some additional info; the patch avoids the call to LayoutReplaced::computeReplacedLogicalWidth in case of the replaced ...
3 years, 9 months ago (2017-03-01 17:30:16 UTC) #53
tommycli
On 2017/03/01 17:30:16, jfernandez wrote: > Some additional info; the patch avoids the call to ...
3 years, 9 months ago (2017-03-02 00:57:40 UTC) #54
mstensho (USE GERRIT)
This CL seems to be stuck. Can I help in any way?
3 years, 8 months ago (2017-04-04 10:58:20 UTC) #55
jfernandez
On 2017/04/04 10:58:20, mstensho wrote: > This CL seems to be stuck. Can I help ...
3 years, 8 months ago (2017-04-04 11:08:22 UTC) #56
mstensho (USE GERRIT)
On 2017/04/04 11:08:22, jfernandez wrote: > On 2017/04/04 10:58:20, mstensho wrote: > > This CL ...
3 years, 8 months ago (2017-04-04 12:18:44 UTC) #57
jfernandez
On 2017/04/04 12:18:44, mstensho wrote: > On 2017/04/04 11:08:22, jfernandez wrote: > > On 2017/04/04 ...
3 years, 8 months ago (2017-04-04 12:25:46 UTC) #58
jfernandez
In any case, I have plans to get back on this issue, definitively. It's just ...
3 years, 8 months ago (2017-04-04 22:41:46 UTC) #59
mstensho (USE GERRIT)
3 years, 8 months ago (2017-04-19 09:39:27 UTC) #61
On 2017/04/04 22:41:46, jfernandez wrote:
> In any case, I have plans to get back on this issue, definitively. It's just
> that I ran out of ideas and needed to clean up a bit my tasks backlog.

OK. In the meantime I'm removing myself as reviewer. Feel free to re-add me if
you make some more progress.

Powered by Google App Engine
This is Rietveld 408576698