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

Issue 1168113005: ShrinkWrap the Stocks menu (Closed)

Created:
5 years, 6 months ago by abarth-chromium
Modified:
5 years, 6 months ago
Reviewers:
Hixie
CC:
gregsimon, jackson_old, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

ShrinkWrap the Stocks menu The popup menu in the stocks app is supposed to size its width to the max intrinsic width of the menu. This CL teaches it how to do that. It's a shame that we need to ceilToDouble the output of RenderParagraph. If we don't do that, we run into floating point layout trouble and the menu triggers a line break. The correct fix is to do layout in fixed point. R=ianh@google.com Committed: https://chromium.googlesource.com/external/mojo/+/d1bf4e9e9a8f38031653a4042873b677e7a3cddb

Patch Set 1 #

Total comments: 5

Patch Set 2 : more worky #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -36 lines) Patch
M sky/sdk/lib/framework/components2/popup_menu.dart View 1 chunk +12 lines, -9 lines 0 comments Download
M sky/sdk/lib/framework/fn2.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M sky/sdk/lib/framework/rendering/block.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sky/sdk/lib/framework/rendering/box.dart View 2 chunks +46 lines, -8 lines 0 comments Download
M sky/sdk/lib/framework/rendering/paragraph.dart View 1 2 chunks +37 lines, -19 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
abarth-chromium
5 years, 6 months ago (2015-06-08 22:53:23 UTC) #1
Hixie
lgtm LGTM with comments https://codereview.chromium.org/1168113005/diff/1/sky/sdk/lib/framework/rendering/box.dart File sky/sdk/lib/framework/rendering/box.dart (right): https://codereview.chromium.org/1168113005/diff/1/sky/sdk/lib/framework/rendering/box.dart#newcode333 sky/sdk/lib/framework/rendering/box.dart:333: RenderShrinkWrapWidth({ RenderBox child }) : ...
5 years, 6 months ago (2015-06-08 23:00:36 UTC) #2
abarth-chromium
Committed patchset #2 (id:20001) manually as d1bf4e9e9a8f38031653a4042873b677e7a3cddb (presubmit successful).
5 years, 6 months ago (2015-06-08 23:20:16 UTC) #3
abarth-chromium
5 years, 6 months ago (2015-06-09 00:40:30 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/1168113005/diff/1/sky/sdk/lib/framework/rende...
File sky/sdk/lib/framework/rendering/box.dart (right):

https://codereview.chromium.org/1168113005/diff/1/sky/sdk/lib/framework/rende...
sky/sdk/lib/framework/rendering/box.dart:333: RenderShrinkWrapWidth({ RenderBox
child }) : super(child);
On 2015/06/08 at 23:00:36, Hixie wrote:
> if you're requiring child to be non-null, assert it in the constructor and in
the setter. otherwise, handle null children everywhere here.

Fixed to handle null.

https://codereview.chromium.org/1168113005/diff/1/sky/sdk/lib/framework/rende...
sky/sdk/lib/framework/rendering/box.dart:338: return new
BoxConstraints(minWidth: width,
On 2015/06/08 at 23:00:35, Hixie wrote:
> don't we have a BoxConstraints constructor for this case?

Added applyWidth

Powered by Google App Engine
This is Rietveld 408576698