| 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 '../framework/debug/utils.dart'; | 10 import '../framework/debug/utils.dart'; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return clamp(min: minHeight, max: maxHeight, value: height); | 171 return clamp(min: minHeight, max: maxHeight, value: height); |
| 172 } | 172 } |
| 173 | 173 |
| 174 Size constrain(Size size) { | 174 Size constrain(Size size) { |
| 175 Size result = new Size(constrainWidth(size.width), constrainHeight(size.heig
ht)); | 175 Size result = new Size(constrainWidth(size.width), constrainHeight(size.heig
ht)); |
| 176 if (size is _DebugSize) | 176 if (size is _DebugSize) |
| 177 result = new _DebugSize(result, size._owner, size._canBeUsedByParent); | 177 result = new _DebugSize(result, size._owner, size._canBeUsedByParent); |
| 178 return result; | 178 return result; |
| 179 } | 179 } |
| 180 | 180 |
| 181 bool get isInfinite => maxWidth >= double.INFINITY || maxHeight >= double.INFI
NITY; | 181 bool get isInfinite => maxWidth >= double.INFINITY && maxHeight >= double.INFI
NITY; |
| 182 | 182 |
| 183 int get hashCode { | 183 int get hashCode { |
| 184 int value = 373; | 184 int value = 373; |
| 185 value = 37 * value + minWidth.hashCode; | 185 value = 37 * value + minWidth.hashCode; |
| 186 value = 37 * value + maxWidth.hashCode; | 186 value = 37 * value + maxWidth.hashCode; |
| 187 value = 37 * value + minHeight.hashCode; | 187 value = 37 * value + minHeight.hashCode; |
| 188 value = 37 * value + maxHeight.hashCode; | 188 value = 37 * value + maxHeight.hashCode; |
| 189 return value; | 189 return value; |
| 190 } | 190 } |
| 191 String toString() => "BoxConstraints($minWidth<=w<$maxWidth, $minHeight<=h<$ma
xHeight)"; | 191 String toString() => "BoxConstraints($minWidth<=w<$maxWidth, $minHeight<=h<$ma
xHeight)"; |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 | 1043 |
| 1044 void defaultPaint(RenderObjectDisplayList canvas) { | 1044 void defaultPaint(RenderObjectDisplayList canvas) { |
| 1045 RenderBox child = firstChild; | 1045 RenderBox child = firstChild; |
| 1046 while (child != null) { | 1046 while (child != null) { |
| 1047 assert(child.parentData is ParentDataType); | 1047 assert(child.parentData is ParentDataType); |
| 1048 canvas.paintChild(child, child.parentData.position); | 1048 canvas.paintChild(child, child.parentData.position); |
| 1049 child = child.parentData.nextSibling; | 1049 child = child.parentData.nextSibling; |
| 1050 } | 1050 } |
| 1051 } | 1051 } |
| 1052 } | 1052 } |
| OLD | NEW |