Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: sky/sdk/lib/rendering/box.dart

Issue 1175423007: Create an example app that demonstrates interactive coordination of an fn tree and a raw RenderObje… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/examples/widgets/spinning_mixed.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sky/examples/widgets/spinning_mixed.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698