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

Unified Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1164303002: Introduce sky.Sky.zero (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: less sky.Foo 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/raw/sector_layout.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/box.dart
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart
index 563dd423527dec6990fcc367fec2e61da51e172d..7364a46e197d72f57e8c41263956ba7c58eef003 100644
--- a/sky/sdk/lib/framework/rendering/box.dart
+++ b/sky/sdk/lib/framework/rendering/box.dart
@@ -125,13 +125,13 @@ abstract class RenderBox extends RenderObject {
// dimensions and nothing else (e.g. don't calculate hypothetical
// child positions if they're not needed to determine dimensions)
Size getIntrinsicDimensions(BoxConstraints constraints) {
- return constraints.constrain(new Size(0.0, 0.0));
+ return constraints.constrain(Size.zero);
}
BoxConstraints get constraints => super.constraints as BoxConstraints;
void performResize() {
// default behaviour for subclasses that have sizedByParent = true
- size = constraints.constrain(new Size(0.0, 0.0));
+ size = constraints.constrain(Size.zero);
assert(size.height < double.INFINITY);
assert(size.width < double.INFINITY);
}
@@ -149,7 +149,7 @@ abstract class RenderBox extends RenderObject {
}
void hitTestChildren(HitTestResult result, { Point position }) { }
- Size size = new Size(0.0, 0.0);
+ Size size = Size.zero;
String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}size: ${size}\n';
}
@@ -722,7 +722,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
this.child = child;
}
- Size _size = new Size(0.0, 0.0);
+ Size _size = Size.zero;
double get width => _size.width;
double get height => _size.height;
« no previous file with comments | « sky/examples/raw/sector_layout.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698