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 import 'dart:math' as math; | 5 import 'dart:math' as math; |
6 | 6 |
7 import 'box.dart'; | 7 import 'box.dart'; |
8 import 'object.dart'; | 8 import 'object.dart'; |
9 | 9 |
10 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend
erBox> { | 10 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend
erBox> { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 FlexAlignItems _alignItems; | 68 FlexAlignItems _alignItems; |
69 FlexAlignItems get alignItems => _alignItems; | 69 FlexAlignItems get alignItems => _alignItems; |
70 void set alignItems (FlexAlignItems value) { | 70 void set alignItems (FlexAlignItems value) { |
71 if (_alignItems != value) { | 71 if (_alignItems != value) { |
72 _alignItems = value; | 72 _alignItems = value; |
73 markNeedsLayout(); | 73 markNeedsLayout(); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 void setParentData(RenderBox child) { | 77 void setupParentData(RenderBox child) { |
78 if (child.parentData is! FlexBoxParentData) | 78 if (child.parentData is! FlexBoxParentData) |
79 child.parentData = new FlexBoxParentData(); | 79 child.parentData = new FlexBoxParentData(); |
80 } | 80 } |
81 | 81 |
82 double _getIntrinsicSize({ BoxConstraints constraints, | 82 double _getIntrinsicSize({ BoxConstraints constraints, |
83 FlexDirection sizingDirection, | 83 FlexDirection sizingDirection, |
84 _ChildSizingFunction childSize }) { | 84 _ChildSizingFunction childSize }) { |
85 // http://www.w3.org/TR/2015/WD-css-flexbox-1-20150514/#intrinsic-sizes | 85 // http://www.w3.org/TR/2015/WD-css-flexbox-1-20150514/#intrinsic-sizes |
86 if (_direction == sizingDirection) { | 86 if (_direction == sizingDirection) { |
87 // INTRINSIC MAIN SIZE | 87 // INTRINSIC MAIN SIZE |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 391 } |
392 | 392 |
393 void hitTestChildren(HitTestResult result, { Point position }) { | 393 void hitTestChildren(HitTestResult result, { Point position }) { |
394 defaultHitTestChildren(result, position: position); | 394 defaultHitTestChildren(result, position: position); |
395 } | 395 } |
396 | 396 |
397 void paint(RenderCanvas canvas) { | 397 void paint(RenderCanvas canvas) { |
398 defaultPaint(canvas); | 398 defaultPaint(canvas); |
399 } | 399 } |
400 } | 400 } |
OLD | NEW |