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

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

Issue 1208293002: Rename setParentData to setupParentData since it's not a setter per se. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/sdk/lib/rendering/block.dart ('k') | sky/sdk/lib/rendering/flex.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 '../base/debug.dart'; 10 import '../base/debug.dart';
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/rendering/block.dart ('k') | sky/sdk/lib/rendering/flex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698