| 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 import 'dart:sky' as sky; | 6 import 'dart:sky' as sky; |
| 7 | 7 |
| 8 import 'package:vector_math/vector_math.dart'; | 8 import 'package:vector_math/vector_math.dart'; |
| 9 | 9 |
| 10 import '../base/debug.dart'; | 10 import '../base/debug.dart'; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 assert(RenderObject.debugDoingLayout); | 226 assert(RenderObject.debugDoingLayout); |
| 227 _position = value; | 227 _position = value; |
| 228 } | 228 } |
| 229 String toString() => 'position=$position'; | 229 String toString() => 'position=$position'; |
| 230 } | 230 } |
| 231 | 231 |
| 232 enum TextBaseline { alphabetic, ideographic } | 232 enum TextBaseline { alphabetic, ideographic } |
| 233 | 233 |
| 234 abstract class RenderBox extends RenderObject { | 234 abstract class RenderBox extends RenderObject { |
| 235 | 235 |
| 236 void setParentData(RenderObject child) { | 236 void setupParentData(RenderObject child) { |
| 237 if (child.parentData is! BoxParentData) | 237 if (child.parentData is! BoxParentData) |
| 238 child.parentData = new BoxParentData(); | 238 child.parentData = new BoxParentData(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 // getMinIntrinsicWidth() should return the minimum width that this box could | 241 // getMinIntrinsicWidth() should return the minimum width that this box could |
| 242 // be without failing to render its contents within itself. | 242 // be without failing to render its contents within itself. |
| 243 double getMinIntrinsicWidth(BoxConstraints constraints) { | 243 double getMinIntrinsicWidth(BoxConstraints constraints) { |
| 244 return constraints.constrainWidth(0.0); | 244 return constraints.constrainWidth(0.0); |
| 245 } | 245 } |
| 246 | 246 |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 | 1231 |
| 1232 void defaultPaint(RenderCanvas canvas) { | 1232 void defaultPaint(RenderCanvas canvas) { |
| 1233 RenderBox child = firstChild; | 1233 RenderBox child = firstChild; |
| 1234 while (child != null) { | 1234 while (child != null) { |
| 1235 assert(child.parentData is ParentDataType); | 1235 assert(child.parentData is ParentDataType); |
| 1236 canvas.paintChild(child, child.parentData.position); | 1236 canvas.paintChild(child, child.parentData.position); |
| 1237 child = child.parentData.nextSibling; | 1237 child = child.parentData.nextSibling; |
| 1238 } | 1238 } |
| 1239 } | 1239 } |
| 1240 } | 1240 } |
| OLD | NEW |