| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 ); | 239 ); |
| 240 } | 240 } |
| 241 | 241 |
| 242 double getMaxIntrinsicHeight(BoxConstraints constraints) { | 242 double getMaxIntrinsicHeight(BoxConstraints constraints) { |
| 243 return _getIntrinsicSize( | 243 return _getIntrinsicSize( |
| 244 constraints: constraints, | 244 constraints: constraints, |
| 245 sizingDirection: FlexDirection.vertical, | 245 sizingDirection: FlexDirection.vertical, |
| 246 childSize: (c, innerConstraints) => c.getMaxIntrinsicHeight(innerConstrain
ts)); | 246 childSize: (c, innerConstraints) => c.getMaxIntrinsicHeight(innerConstrain
ts)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 double getDistanceToActualBaseline(TextBaseline baseline) { | 249 double computeDistanceToActualBaseline(TextBaseline baseline, RenderObject cli
ent) { |
| 250 assert(!needsLayout); | |
| 251 if (_direction == FlexDirection.horizontal) | 250 if (_direction == FlexDirection.horizontal) |
| 252 return defaultGetDistanceToHighestActualBaseline(baseline); | 251 return defaultComputeDistanceToHighestActualBaseline(baseline, client); |
| 253 return defaultGetDistanceToFirstActualBaseline(baseline); | 252 return defaultComputeDistanceToFirstActualBaseline(baseline, client); |
| 254 } | 253 } |
| 255 | 254 |
| 256 int _getFlex(RenderBox child) { | 255 int _getFlex(RenderBox child) { |
| 257 assert(child.parentData is FlexBoxParentData); | 256 assert(child.parentData is FlexBoxParentData); |
| 258 return child.parentData.flex != null ? child.parentData.flex : 0; | 257 return child.parentData.flex != null ? child.parentData.flex : 0; |
| 259 } | 258 } |
| 260 | 259 |
| 261 double _getCrossSize(RenderBox child) { | 260 double _getCrossSize(RenderBox child) { |
| 262 return (_direction == FlexDirection.horizontal) ? child.size.height : child.
size.width; | 261 return (_direction == FlexDirection.horizontal) ? child.size.height : child.
size.width; |
| 263 } | 262 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 390 } |
| 392 | 391 |
| 393 void hitTestChildren(HitTestResult result, { Point position }) { | 392 void hitTestChildren(HitTestResult result, { Point position }) { |
| 394 defaultHitTestChildren(result, position: position); | 393 defaultHitTestChildren(result, position: position); |
| 395 } | 394 } |
| 396 | 395 |
| 397 void paint(PaintingCanvas canvas, Offset offset) { | 396 void paint(PaintingCanvas canvas, Offset offset) { |
| 398 defaultPaint(canvas, offset); | 397 defaultPaint(canvas, offset); |
| 399 } | 398 } |
| 400 } | 399 } |
| OLD | NEW |