| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |