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

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

Issue 1189833004: More minor cleanup around overriding fields to narrow types. (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 | « no previous file | sky/sdk/lib/widgets/fixed_height_scrollable.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 _debugDoingThisLayout = false; 253 _debugDoingThisLayout = false;
254 } 254 }
255 void layout(dynamic constraints, { bool parentUsesSize: false }) { 255 void layout(dynamic constraints, { bool parentUsesSize: false }) {
256 _debugDoingThisLayout = true; 256 _debugDoingThisLayout = true;
257 _debugCanParentUseSize = parentUsesSize; 257 _debugCanParentUseSize = parentUsesSize;
258 super.layout(constraints, parentUsesSize: parentUsesSize); 258 super.layout(constraints, parentUsesSize: parentUsesSize);
259 _debugCanParentUseSize = null; 259 _debugCanParentUseSize = null;
260 _debugDoingThisLayout = false; 260 _debugDoingThisLayout = false;
261 } 261 }
262 262
263 BoxConstraints get constraints { BoxConstraints result = super.constraints; re turn result; } 263 BoxConstraints get constraints => super.constraints;
264 void performResize() { 264 void performResize() {
265 // default behaviour for subclasses that have sizedByParent = true 265 // default behaviour for subclasses that have sizedByParent = true
266 size = constraints.constrain(Size.zero); 266 size = constraints.constrain(Size.zero);
267 assert(size.height < double.INFINITY); 267 assert(size.height < double.INFINITY);
268 assert(size.width < double.INFINITY); 268 assert(size.width < double.INFINITY);
269 } 269 }
270 void performLayout() { 270 void performLayout() {
271 // descendants have to either override performLayout() to set both 271 // descendants have to either override performLayout() to set both
272 // width and height and lay out children, or, set sizedByParent to 272 // width and height and lay out children, or, set sizedByParent to
273 // true so that performResize()'s logic above does its thing. 273 // true so that performResize()'s logic above does its thing.
(...skipping 769 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 | « no previous file | sky/sdk/lib/widgets/fixed_height_scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698