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

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

Issue 1214833004: Split Size into Size and Offset. (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/object.dart ('k') | sky/sdk/lib/rendering/stack.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 6
7 import '../base/scheduler.dart' as scheduler; 7 import '../base/scheduler.dart' as scheduler;
8 import '../base/hit_test.dart'; 8 import '../base/hit_test.dart';
9 import 'box.dart'; 9 import 'box.dart';
10 import 'object.dart'; 10 import 'object.dart';
(...skipping 30 matching lines...) Expand all
41 assert(_instance == this); 41 assert(_instance == this);
42 } 42 }
43 43
44 static SkyBinding _instance; // used to enforce that we're a singleton 44 static SkyBinding _instance; // used to enforce that we're a singleton
45 static SkyBinding get instance => _instance; 45 static SkyBinding get instance => _instance;
46 46
47 RenderView _renderView; 47 RenderView _renderView;
48 RenderView get renderView => _renderView; 48 RenderView get renderView => _renderView;
49 49
50 ViewConstraints _createConstraints() { 50 ViewConstraints _createConstraints() {
51 return new ViewConstraints(width: sky.view.width, height: sky.view.height); 51 return new ViewConstraints(size: new Size(sky.view.width, sky.view.height));
52 } 52 }
53 void _handleMetricsChanged() { 53 void _handleMetricsChanged() {
54 _renderView.rootConstraints = _createConstraints(); 54 _renderView.rootConstraints = _createConstraints();
55 } 55 }
56 56
57 Function onFrame; 57 Function onFrame;
58 RenderBox get root => _renderView.child; 58 RenderBox get root => _renderView.child;
59 void set root(RenderBox value) { 59 void set root(RenderBox value) {
60 _renderView.child = value; 60 _renderView.child = value;
61 } 61 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 entry.target.handleEvent(event, entry); 126 entry.target.handleEvent(event, entry);
127 } 127 }
128 128
129 String toString() => 'Render Tree:\n${_renderView}'; 129 String toString() => 'Render Tree:\n${_renderView}';
130 130
131 void debugDumpRenderTree() { 131 void debugDumpRenderTree() {
132 toString().split('\n').forEach(print); 132 toString().split('\n').forEach(print);
133 } 133 }
134 134
135 } 135 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/rendering/object.dart ('k') | sky/sdk/lib/rendering/stack.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698