| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A rectangle representing all the content of the element in the | 8 * A rectangle representing all the content of the element in the |
| 9 * [box model](http://www.w3.org/TR/CSS2/box.html). | 9 * [box model](http://www.w3.org/TR/CSS2/box.html). |
| 10 */ | 10 */ |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 * | 150 * |
| 151 * In contrast to the more general purpose [Rectangle] class, this class's | 151 * In contrast to the more general purpose [Rectangle] class, this class's |
| 152 * values are mutable, so one can change the height of an element | 152 * values are mutable, so one can change the height of an element |
| 153 * programmatically. | 153 * programmatically. |
| 154 * | 154 * |
| 155 * _Important_ _note_: use of these methods will perform CSS calculations that | 155 * _Important_ _note_: use of these methods will perform CSS calculations that |
| 156 * can trigger a browser reflow. Therefore, use of these properties _during_ an | 156 * can trigger a browser reflow. Therefore, use of these properties _during_ an |
| 157 * animation frame is discouraged. See also: | 157 * animation frame is discouraged. See also: |
| 158 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) | 158 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
| 159 */ | 159 */ |
| 160 abstract class CssRect extends MutableRectangle<num> implements Rectangle<num> { | 160 abstract class CssRect extends MutableRectangle<num> { |
| 161 Element _element; | 161 Element _element; |
| 162 | 162 |
| 163 CssRect(this._element) : super(0, 0, 0, 0); | 163 CssRect(this._element) : super(0, 0, 0, 0); |
| 164 | 164 |
| 165 num get left; | 165 num get left; |
| 166 | 166 |
| 167 num get top; | 167 num get top; |
| 168 | 168 |
| 169 /** | 169 /** |
| 170 * The height of this rectangle. | 170 * The height of this rectangle. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 253 } |
| 254 return val; | 254 return val; |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 | 257 |
| 258 final _HEIGHT = ['top', 'bottom']; | 258 final _HEIGHT = ['top', 'bottom']; |
| 259 final _WIDTH = ['right', 'left']; | 259 final _WIDTH = ['right', 'left']; |
| 260 final _CONTENT = 'content'; | 260 final _CONTENT = 'content'; |
| 261 final _PADDING = 'padding'; | 261 final _PADDING = 'padding'; |
| 262 final _MARGIN = 'margin'; | 262 final _MARGIN = 'margin'; |
| OLD | NEW |