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

Side by Side Diff: sky/sdk/lib/framework/rendering/flex.dart

Issue 1165013003: Rename RenderNode to RenderObject. (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/sdk/lib/framework/rendering/box.dart ('k') | sky/sdk/lib/framework/rendering/node.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:sky' as sky; 5 import 'dart:sky' as sky;
6 import 'box.dart'; 6 import 'box.dart';
7 import 'node.dart'; 7 import 'object.dart';
8 8
9 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend erBox> { 9 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend erBox> {
10 int flex; 10 int flex;
11 void merge(FlexBoxParentData other) { 11 void merge(FlexBoxParentData other) {
12 if (other.flex != null) 12 if (other.flex != null)
13 flex = other.flex; 13 flex = other.flex;
14 super.merge(other); 14 super.merge(other);
15 } 15 }
16 } 16 }
17 17
18 enum FlexDirection { Horizontal, Vertical } 18 enum FlexDirection { Horizontal, Vertical }
19 19
20 class RenderFlex extends RenderBox with ContainerRenderNodeMixin<RenderBox, Flex BoxParentData>, 20 class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl exBoxParentData>,
21 RenderBoxContainerDefaultsMixin<RenderBo x, FlexBoxParentData> { 21 RenderBoxContainerDefaultsMixin<RenderBo x, FlexBoxParentData> {
22 // lays out RenderBox children using flexible layout 22 // lays out RenderBox children using flexible layout
23 23
24 RenderFlex({ 24 RenderFlex({
25 FlexDirection direction: FlexDirection.Horizontal 25 FlexDirection direction: FlexDirection.Horizontal
26 }) : _direction = direction; 26 }) : _direction = direction;
27 27
28 FlexDirection _direction; 28 FlexDirection _direction;
29 FlexDirection get direction => _direction; 29 FlexDirection get direction => _direction;
30 void set direction (FlexDirection value) { 30 void set direction (FlexDirection value) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 break; 107 break;
108 } 108 }
109 child = child.parentData.nextSibling; 109 child = child.parentData.nextSibling;
110 } 110 }
111 } 111 }
112 112
113 void hitTestChildren(HitTestResult result, { sky.Point position }) { 113 void hitTestChildren(HitTestResult result, { sky.Point position }) {
114 defaultHitTestChildren(result, position: position); 114 defaultHitTestChildren(result, position: position);
115 } 115 }
116 116
117 void paint(RenderNodeDisplayList canvas) { 117 void paint(RenderObjectDisplayList canvas) {
118 defaultPaint(canvas); 118 defaultPaint(canvas);
119 } 119 }
120 } 120 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/rendering/box.dart ('k') | sky/sdk/lib/framework/rendering/node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698