| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** The interface that the layout algorithms use to talk to the view. */ | 5 /** The interface that the layout algorithms use to talk to the view. */ |
| 6 interface Positionable { | 6 abstract class Positionable { |
| 7 ViewLayout get layout(); | 7 ViewLayout get layout(); |
| 8 | 8 |
| 9 /** Gets our custom CSS properties, as provided by the CSS preprocessor. */ | 9 /** Gets our custom CSS properties, as provided by the CSS preprocessor. */ |
| 10 Map<String, String> get customStyle(); | 10 Map<String, String> get customStyle(); |
| 11 | 11 |
| 12 /** Gets the root DOM used for layout. */ | 12 /** Gets the root DOM used for layout. */ |
| 13 Element get node(); | 13 Element get node(); |
| 14 | 14 |
| 15 /** Gets the collection of child views. */ | 15 /** Gets the collection of child views. */ |
| 16 Collection<Positionable> get childViews(); | 16 Collection<Positionable> get childViews(); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // For an unset max-content size, use the actual size | 223 // For an unset max-content size, use the actual size |
| 224 return size; | 224 return size; |
| 225 } | 225 } |
| 226 if (style.endsWith('%')) { | 226 if (style.endsWith('%')) { |
| 227 num percent = Math.parseDouble(style.substring(0, style.length - 1)); | 227 num percent = Math.parseDouble(style.substring(0, style.length - 1)); |
| 228 return ((percent / 100) * parentSize).toInt(); | 228 return ((percent / 100) * parentSize).toInt(); |
| 229 } | 229 } |
| 230 return _toPixels(style); | 230 return _toPixels(style); |
| 231 } | 231 } |
| 232 } | 232 } |
| OLD | NEW |