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

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

Issue 1171273002: Move AnimatedComponent away from mirrors and towards a callback-based setter. (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/components2/popup_menu.dart ('k') | no next file » | 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 'object.dart'; 7 import 'object.dart';
8 8
9 class RenderInline extends RenderObject { 9 class RenderInline extends RenderObject {
10 String data; 10 String data;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 double getMaxIntrinsicWidth(BoxConstraints constraints) { 71 double getMaxIntrinsicWidth(BoxConstraints constraints) {
72 _layout(constraints); 72 _layout(constraints);
73 return constraints.constrainWidth( 73 return constraints.constrainWidth(
74 _applyFloatingPointHack(_layoutRoot.rootElement.maxContentWidth)); 74 _applyFloatingPointHack(_layoutRoot.rootElement.maxContentWidth));
75 } 75 }
76 76
77 double _getIntrinsicHeight(BoxConstraints constraints) { 77 double _getIntrinsicHeight(BoxConstraints constraints) {
78 _layout(constraints); 78 _layout(constraints);
79 return constraints.constrainHeight( 79 return constraints.constrainHeight(
80 _applyFloatingPointHack(_layoutRoot.rootElement.height.ceilToDouble)); 80 _applyFloatingPointHack(_layoutRoot.rootElement.height));
81 } 81 }
82 82
83 double getMinIntrinsicHeight(BoxConstraints constraints) { 83 double getMinIntrinsicHeight(BoxConstraints constraints) {
84 return _getIntrinsicHeight(constraints); 84 return _getIntrinsicHeight(constraints);
85 } 85 }
86 86
87 double getMaxIntrinsicHeight(BoxConstraints constraints) { 87 double getMaxIntrinsicHeight(BoxConstraints constraints) {
88 return _getIntrinsicHeight(constraints); 88 return _getIntrinsicHeight(constraints);
89 } 89 }
90 90
(...skipping 20 matching lines...) Expand all
111 _layoutRoot.rootElement.style['color'] = 111 _layoutRoot.rootElement.style['color'] =
112 'rgba(${_color.red}, ${_color.green}, ${_color.blue}, ${_color.alpha / 255.0 })'; 112 'rgba(${_color.red}, ${_color.green}, ${_color.blue}, ${_color.alpha / 255.0 })';
113 } 113 }
114 _layoutRoot.paint(canvas); 114 _layoutRoot.paint(canvas);
115 } 115 }
116 116
117 // we should probably expose a way to do precise (inter-glpyh) hit testing 117 // we should probably expose a way to do precise (inter-glpyh) hit testing
118 118
119 String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings( prefix)}${prefix}color: ${color}\n${prefix}text: ${text}\n'; 119 String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings( prefix)}${prefix}color: ${color}\n${prefix}text: ${text}\n';
120 } 120 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/popup_menu.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698