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

Side by Side Diff: sky/sdk/lib/widgets/basic.dart

Issue 1179763009: Give ParentDataNodes snappier names (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nit 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/drawer_header.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 1
2 import 'package:vector_math/vector_math.dart'; 2 import 'package:vector_math/vector_math.dart';
3 3
4 import '../rendering/block.dart'; 4 import '../rendering/block.dart';
5 import '../rendering/box.dart'; 5 import '../rendering/box.dart';
6 import '../rendering/flex.dart'; 6 import '../rendering/flex.dart';
7 import '../rendering/object.dart'; 7 import '../rendering/object.dart';
8 import '../rendering/paragraph.dart'; 8 import '../rendering/paragraph.dart';
9 import '../rendering/stack.dart'; 9 import '../rendering/stack.dart';
10 import 'ui_node.dart'; 10 import 'ui_node.dart';
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 class Stack extends MultiChildRenderObjectWrapper { 299 class Stack extends MultiChildRenderObjectWrapper {
300 300
301 Stack(List<UINode> children, { Object key }) 301 Stack(List<UINode> children, { Object key })
302 : super(key: key, children: children); 302 : super(key: key, children: children);
303 303
304 RenderStack get root { RenderStack result = super.root; return result; } 304 RenderStack get root { RenderStack result = super.root; return result; }
305 RenderStack createNode() => new RenderStack(); 305 RenderStack createNode() => new RenderStack();
306 306
307 } 307 }
308 308
309 class StackPositionedChild extends ParentDataNode { 309 class Positioned extends ParentDataNode {
310 StackPositionedChild(UINode content, { 310 Positioned({
311 double top, double right, double bottom, double left 311 UINode child,
312 double top,
313 double right,
314 double bottom,
315 double left
312 }) : super(content, new StackParentData()..top = top 316 }) : super(content, new StackParentData()..top = top
313 ..right = right 317 ..right = right
314 ..bottom = bottom 318 ..bottom = bottom
315 ..left = left); 319 ..left = left);
316 } 320 }
317 321
318 class Flex extends MultiChildRenderObjectWrapper { 322 class Flex extends MultiChildRenderObjectWrapper {
319 323
320 Flex(List<UINode> children, { 324 Flex(List<UINode> children, {
321 Object key, 325 Object key,
(...skipping 11 matching lines...) Expand all
333 337
334 void syncRenderObject(UINode old) { 338 void syncRenderObject(UINode old) {
335 super.syncRenderObject(old); 339 super.syncRenderObject(old);
336 root.direction = direction; 340 root.direction = direction;
337 root.justifyContent = justifyContent; 341 root.justifyContent = justifyContent;
338 root.alignItems = alignItems; 342 root.alignItems = alignItems;
339 } 343 }
340 344
341 } 345 }
342 346
343 class FlexExpandingChild extends ParentDataNode { 347 class Flexible extends ParentDataNode {
344 FlexExpandingChild(UINode content, { int flex: 1, Object key }) 348 Flexible({ UINode child, int flex: 1, Object key })
345 : super(content, new FlexBoxParentData()..flex = flex, key: key); 349 : super(child, new FlexBoxParentData()..flex = flex, key: key);
346 } 350 }
347 351
348 class Paragraph extends RenderObjectWrapper { 352 class Paragraph extends RenderObjectWrapper {
349 353
350 Paragraph({ Object key, this.text, this.style }) : super(key: key); 354 Paragraph({ Object key, this.text, this.style }) : super(key: key);
351 355
352 RenderParagraph get root { RenderParagraph result = super.root; return result; } 356 RenderParagraph get root { RenderParagraph result = super.root; return result; }
353 RenderParagraph createNode() => new RenderParagraph(text: text, style: style); 357 RenderParagraph createNode() => new RenderParagraph(text: text, style: style);
354 358
355 final String text; 359 final String text;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 root.src = src; 399 root.src = src;
396 root.requestedSize = size; 400 root.requestedSize = size;
397 } 401 }
398 402
399 void insert(RenderObjectWrapper child, dynamic slot) { 403 void insert(RenderObjectWrapper child, dynamic slot) {
400 assert(false); 404 assert(false);
401 // Image does not support having children currently 405 // Image does not support having children currently
402 } 406 }
403 407
404 } 408 }
OLDNEW
« no previous file with comments | « sky/examples/widgets/spinning_mixed.dart ('k') | sky/sdk/lib/widgets/drawer_header.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698