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

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

Issue 1187393002: Cleanup of SkyBinding, and resultant yak shaving. (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/rendering/README.md ('k') | sky/sdk/lib/rendering/object.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 '../debug/utils.dart'; 10 import '../base/debug.dart';
11 import '../mojo/net/image_cache.dart' as image_cache; 11 import '../mojo/net/image_cache.dart' as image_cache;
12 import '../painting/box_painter.dart'; 12 import '../painting/box_painter.dart';
13 import 'object.dart'; 13 import 'object.dart';
14 14
15 export '../painting/box_painter.dart'; 15 export '../painting/box_painter.dart';
16 16
17 // GENERIC BOX RENDERING 17 // GENERIC BOX RENDERING
18 // Anything that has a concept of x, y, width, height is going to derive from th is 18 // Anything that has a concept of x, y, width, height is going to derive from th is
19 19
20 // This class should only be used in debug builds 20 // This class should only be used in debug builds
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 value = 37 * value + minWidth.hashCode; 185 value = 37 * value + minWidth.hashCode;
186 value = 37 * value + maxWidth.hashCode; 186 value = 37 * value + maxWidth.hashCode;
187 value = 37 * value + minHeight.hashCode; 187 value = 37 * value + minHeight.hashCode;
188 value = 37 * value + maxHeight.hashCode; 188 value = 37 * value + maxHeight.hashCode;
189 return value; 189 return value;
190 } 190 }
191 String toString() => "BoxConstraints($minWidth<=w<$maxWidth, $minHeight<=h<$ma xHeight)"; 191 String toString() => "BoxConstraints($minWidth<=w<$maxWidth, $minHeight<=h<$ma xHeight)";
192 } 192 }
193 193
194 class BoxHitTestEntry extends HitTestEntry { 194 class BoxHitTestEntry extends HitTestEntry {
195 const BoxHitTestEntry(RenderBox target, this.localPosition) 195 const BoxHitTestEntry(HitTestTarget target, this.localPosition) : super(target );
196 : super(target);
197
198 final Point localPosition; 196 final Point localPosition;
199 } 197 }
200 198
201 class BoxParentData extends ParentData { 199 class BoxParentData extends ParentData {
202 Point _position = Point.origin; 200 Point _position = Point.origin;
203 Point get position => _position; 201 Point get position => _position;
204 void set position(Point value) { 202 void set position(Point value) {
205 assert(RenderObject.debugDoingLayout); 203 assert(RenderObject.debugDoingLayout);
206 _position = value; 204 _position = value;
207 } 205 }
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1077
1080 void defaultPaint(RenderObjectDisplayList canvas) { 1078 void defaultPaint(RenderObjectDisplayList canvas) {
1081 RenderBox child = firstChild; 1079 RenderBox child = firstChild;
1082 while (child != null) { 1080 while (child != null) {
1083 assert(child.parentData is ParentDataType); 1081 assert(child.parentData is ParentDataType);
1084 canvas.paintChild(child, child.parentData.position); 1082 canvas.paintChild(child, child.parentData.position);
1085 child = child.parentData.nextSibling; 1083 child = child.parentData.nextSibling;
1086 } 1084 }
1087 } 1085 }
1088 } 1086 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/rendering/README.md ('k') | sky/sdk/lib/rendering/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698