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

Issue 1230583003: Integrate the linear constraint solver into Sky as a RenderBox subclass. (Closed)

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

Description

Integrate the linear constraint solver into Sky as a RenderBox subclass. R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/fff7b0ae784f577e8e53fb27a48a26dde02d58e1

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address CL concerns #

Total comments: 30
Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -1 line) Patch
M DEPS View 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A sky/sdk/example/rendering/simple_autolayout.dart View 1 1 chunk +65 lines, -0 lines 2 comments Download
A sky/sdk/lib/rendering/auto_layout.dart View 1 1 chunk +225 lines, -0 lines 28 comments Download
M sky/sdk/pubspec.yaml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Chinmay
Uses the Cassowary dart package to implement auto layout in Sky
5 years, 5 months ago (2015-07-08 21:40:24 UTC) #2
abarth-chromium
lgtm https://codereview.chromium.org/1230583003/diff/1/sky/sdk/example/rendering/simple_autolayout.dart File sky/sdk/example/rendering/simple_autolayout.dart (right): https://codereview.chromium.org/1230583003/diff/1/sky/sdk/example/rendering/simple_autolayout.dart#newcode10 sky/sdk/example/rendering/simple_autolayout.dart:10: import 'package:cassowary/cassowary.dart' as AL; I think the usual ...
5 years, 5 months ago (2015-07-08 22:22:02 UTC) #3
Chinmay
https://codereview.chromium.org/1230583003/diff/1/sky/sdk/example/rendering/simple_autolayout.dart File sky/sdk/example/rendering/simple_autolayout.dart (right): https://codereview.chromium.org/1230583003/diff/1/sky/sdk/example/rendering/simple_autolayout.dart#newcode10 sky/sdk/example/rendering/simple_autolayout.dart:10: import 'package:cassowary/cassowary.dart' as AL; On 2015/07/08 at 22:22:01, abarth-chromium ...
5 years, 5 months ago (2015-07-08 23:01:01 UTC) #4
abarth-chromium
LGTM The only other nit I have with this CL is the reference from the ...
5 years, 5 months ago (2015-07-08 23:08:35 UTC) #5
Chinmay
Committed patchset #2 (id:20001) manually as fff7b0ae784f577e8e53fb27a48a26dde02d58e1 (presubmit successful).
5 years, 5 months ago (2015-07-08 23:11:39 UTC) #6
Hixie
lgtm https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/example/rendering/simple_autolayout.dart File sky/sdk/example/rendering/simple_autolayout.dart (right): https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/example/rendering/simple_autolayout.dart#newcode13 sky/sdk/example/rendering/simple_autolayout.dart:13: var c1 = new RenderDecoratedBox( don't use 'var' ...
5 years, 5 months ago (2015-07-09 00:53:15 UTC) #7
Chinmay
The following reviews address the concerns raised: https://codereview.chromium.org/1230033002/ https://codereview.chromium.org/1226113007/ https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/example/rendering/simple_autolayout.dart File sky/sdk/example/rendering/simple_autolayout.dart (right): https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/example/rendering/simple_autolayout.dart#newcode13 sky/sdk/example/rendering/simple_autolayout.dart:13: ...
5 years, 5 months ago (2015-07-09 21:44:21 UTC) #8
Hixie
5 years, 5 months ago (2015-07-09 22:05:09 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/lib/rendering/a...
File sky/sdk/lib/rendering/auto_layout.dart (right):

https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/lib/rendering/a...
sky/sdk/lib/rendering/auto_layout.dart:15: // initialized before the
constructor. Not sure how to do that using a Mixin
i think you missed this one. :-)

https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/lib/rendering/a...
sky/sdk/lib/rendering/auto_layout.dart:177: size = constraints.biggest;
As far as I can tell, you don't let the size be set based on the kids currently.
So if that's the case, then you should set sizedByParent.

https://codereview.chromium.org/1230583003/diff/20001/sky/sdk/lib/rendering/a...
sky/sdk/lib/rendering/auto_layout.dart:198: void hitTestChildren(HitTestResult
result, {Point position}) =>
our style guide says => is for single-line declarations. If it splits across
lines then it's no better than a block, and consistency with other multiline
constructs says we should just use blocks then.

Powered by Google App Engine
This is Rietveld 408576698