Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library fn; | 5 library fn; |
| 6 | 6 |
| 7 import 'app.dart'; | 7 import 'app.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 final String data; | 780 final String data; |
| 781 bool get interchangeable => true; | 781 bool get interchangeable => true; |
| 782 UINode build() => new Paragraph(text: data); | 782 UINode build() => new Paragraph(text: data); |
| 783 } | 783 } |
| 784 | 784 |
| 785 class Flex extends MultiChildRenderObjectWrapper { | 785 class Flex extends MultiChildRenderObjectWrapper { |
| 786 | 786 |
| 787 Flex(List<UINode> children, { | 787 Flex(List<UINode> children, { |
| 788 Object key, | 788 Object key, |
| 789 this.direction: FlexDirection.horizontal, | 789 this.direction: FlexDirection.horizontal, |
| 790 this.justifyContent: FlexJustifyContent.flexStart | 790 this.justifyContent: FlexJustifyContent.flexStart, |
| 791 this.alignItems: FlexAlignItems.center | |
|
Hixie
2015/06/10 23:40:13
don't specify arguments when the value you're sett
jackson
2015/06/11 16:58:38
we discussed this and it sounds like we're on the
| |
| 791 }) : super(key: key, children: children); | 792 }) : super(key: key, children: children); |
| 792 | 793 |
| 793 RenderFlex get root { RenderFlex result = super.root; return result; } | 794 RenderFlex get root { RenderFlex result = super.root; return result; } |
| 794 RenderFlex createNode() => new RenderFlex(direction: this.direction); | 795 RenderFlex createNode() => new RenderFlex(direction: this.direction); |
| 795 | 796 |
| 796 final FlexDirection direction; | 797 final FlexDirection direction; |
| 797 final FlexJustifyContent justifyContent; | 798 final FlexJustifyContent justifyContent; |
| 799 final FlexAlignItems alignItems; | |
| 798 | 800 |
| 799 void syncRenderObject(UINode old) { | 801 void syncRenderObject(UINode old) { |
| 800 super.syncRenderObject(old); | 802 super.syncRenderObject(old); |
| 801 root.direction = direction; | 803 root.direction = direction; |
| 802 root.justifyContent = justifyContent; | 804 root.justifyContent = justifyContent; |
| 805 root.alignItems = alignItems; | |
| 803 } | 806 } |
| 804 | 807 |
| 805 } | 808 } |
| 806 | 809 |
| 807 class FlexExpandingChild extends ParentDataNode { | 810 class FlexExpandingChild extends ParentDataNode { |
| 808 FlexExpandingChild(UINode content, { int flex: 1, Object key }) | 811 FlexExpandingChild(UINode content, { int flex: 1, Object key }) |
| 809 : super(content, new FlexBoxParentData()..flex = flex, key: key); | 812 : super(content, new FlexBoxParentData()..flex = flex, key: key); |
| 810 } | 813 } |
| 811 | 814 |
| 812 class Image extends RenderObjectWrapper { | 815 class Image extends RenderObjectWrapper { |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1180 // we haven't attached it yet | 1183 // we haven't attached it yet |
| 1181 assert(_container.child == null); | 1184 assert(_container.child == null); |
| 1182 _container.child = root; | 1185 _container.child = root; |
| 1183 } | 1186 } |
| 1184 assert(root.parent == _container); | 1187 assert(root.parent == _container); |
| 1185 } | 1188 } |
| 1186 | 1189 |
| 1187 UINode build() => builder(); | 1190 UINode build() => builder(); |
| 1188 | 1191 |
| 1189 } | 1192 } |
| OLD | NEW |