OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 class _ChildrenElementList extends ListBase<Element> | 7 class _ChildrenElementList extends ListBase<Element> |
8 implements NodeListWrapper { | 8 implements NodeListWrapper { |
9 // Raw Element. | 9 // Raw Element. |
10 final Element _element; | 10 final Element _element; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 * specific property value will return the value of the property of the first | 197 * specific property value will return the value of the property of the first |
198 * element in the [ElementList]. | 198 * element in the [ElementList]. |
199 */ | 199 */ |
200 CssStyleDeclarationBase get style; | 200 CssStyleDeclarationBase get style; |
201 | 201 |
202 /** | 202 /** |
203 * Access dimensions and position of the Elements in this list. | 203 * Access dimensions and position of the Elements in this list. |
204 * | 204 * |
205 * Setting the height or width properties will set the height or width | 205 * Setting the height or width properties will set the height or width |
206 * property for all elements in the list. This returns a rectangle with the | 206 * property for all elements in the list. This returns a rectangle with the |
207 * dimenions actually available for content | 207 * dimensions actually available for content |
208 * in this element, in pixels, regardless of this element's box-sizing | 208 * in this element, in pixels, regardless of this element's box-sizing |
209 * property. Getting the height or width returns the height or width of the | 209 * property. Getting the height or width returns the height or width of the |
210 * first Element in this list. | 210 * first Element in this list. |
211 * | 211 * |
212 * Unlike [getBoundingClientRect], the dimensions of this rectangle | 212 * Unlike [getBoundingClientRect], the dimensions of this rectangle |
213 * will return the same numerical height if the element is hidden or not. | 213 * will return the same numerical height if the element is hidden or not. |
214 */ | 214 */ |
215 @Experimental() | 215 @Experimental() |
216 CssRect get contentEdge; | 216 CssRect get contentEdge; |
217 | 217 |
218 /** | 218 /** |
219 * Access dimensions and position of the first Element's content + padding box | 219 * Access dimensions and position of the first Element's content + padding box |
220 * in this list. | 220 * in this list. |
221 * | 221 * |
222 * This returns a rectangle with the dimenions actually available for content | 222 * This returns a rectangle with the dimensions actually available for content |
223 * in this element, in pixels, regardless of this element's box-sizing | 223 * in this element, in pixels, regardless of this element's box-sizing |
224 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 224 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
225 * will return the same numerical height if the element is hidden or not. This | 225 * will return the same numerical height if the element is hidden or not. This |
226 * can be used to retrieve jQuery's `innerHeight` value for an element. This | 226 * can be used to retrieve jQuery's `innerHeight` value for an element. This |
227 * is also a rectangle equalling the dimensions of clientHeight and | 227 * is also a rectangle equalling the dimensions of clientHeight and |
228 * clientWidth. | 228 * clientWidth. |
229 */ | 229 */ |
230 @Experimental() | 230 @Experimental() |
231 CssRect get paddingEdge; | 231 CssRect get paddingEdge; |
232 | 232 |
233 /** | 233 /** |
234 * Access dimensions and position of the first Element's content + padding + | 234 * Access dimensions and position of the first Element's content + padding + |
235 * border box in this list. | 235 * border box in this list. |
236 * | 236 * |
237 * This returns a rectangle with the dimenions actually available for content | 237 * This returns a rectangle with the dimensions actually available for content |
238 * in this element, in pixels, regardless of this element's box-sizing | 238 * in this element, in pixels, regardless of this element's box-sizing |
239 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 239 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
240 * will return the same numerical height if the element is hidden or not. This | 240 * will return the same numerical height if the element is hidden or not. This |
241 * can be used to retrieve jQuery's `outerHeight` value for an element. | 241 * can be used to retrieve jQuery's `outerHeight` value for an element. |
242 */ | 242 */ |
243 @Experimental() | 243 @Experimental() |
244 CssRect get borderEdge; | 244 CssRect get borderEdge; |
245 | 245 |
246 /** | 246 /** |
247 * Access dimensions and position of the first Element's content + padding + | 247 * Access dimensions and position of the first Element's content + padding + |
248 * border + margin box in this list. | 248 * border + margin box in this list. |
249 * | 249 * |
250 * This returns a rectangle with the dimenions actually available for content | 250 * This returns a rectangle with the dimensions actually available for content |
251 * in this element, in pixels, regardless of this element's box-sizing | 251 * in this element, in pixels, regardless of this element's box-sizing |
252 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 252 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
253 * will return the same numerical height if the element is hidden or not. This | 253 * will return the same numerical height if the element is hidden or not. This |
254 * can be used to retrieve jQuery's `outerHeight` value for an element. | 254 * can be used to retrieve jQuery's `outerHeight` value for an element. |
255 */ | 255 */ |
256 @Experimental() | 256 @Experimental() |
257 CssRect get marginEdge; | 257 CssRect get marginEdge; |
258 $!STREAM_GETTER_SIGNATURES | 258 $!STREAM_GETTER_SIGNATURES |
259 } | 259 } |
260 | 260 |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 @DomName('Element.shadowRoot') | 1161 @DomName('Element.shadowRoot') |
1162 @SupportedBrowser(SupportedBrowser.CHROME, '25') | 1162 @SupportedBrowser(SupportedBrowser.CHROME, '25') |
1163 @Experimental() | 1163 @Experimental() |
1164 ShadowRoot get shadowRoot => | 1164 ShadowRoot get shadowRoot => |
1165 JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); | 1165 JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); |
1166 $endif | 1166 $endif |
1167 | 1167 |
1168 /** | 1168 /** |
1169 * Access this element's content position. | 1169 * Access this element's content position. |
1170 * | 1170 * |
1171 * This returns a rectangle with the dimenions actually available for content | 1171 * This returns a rectangle with the dimensions actually available for content |
1172 * in this element, in pixels, regardless of this element's box-sizing | 1172 * in this element, in pixels, regardless of this element's box-sizing |
1173 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 1173 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
1174 * will return the same numerical height if the element is hidden or not. | 1174 * will return the same numerical height if the element is hidden or not. |
1175 * | 1175 * |
1176 * _Important_ _note_: use of this method _will_ perform CSS calculations that | 1176 * _Important_ _note_: use of this method _will_ perform CSS calculations that |
1177 * can trigger a browser reflow. Therefore, use of this property _during_ an | 1177 * can trigger a browser reflow. Therefore, use of this property _during_ an |
1178 * animation frame is discouraged. See also: | 1178 * animation frame is discouraged. See also: |
1179 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) | 1179 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
1180 */ | 1180 */ |
1181 @Experimental() | 1181 @Experimental() |
1182 CssRect get contentEdge => new _ContentCssRect(this); | 1182 CssRect get contentEdge => new _ContentCssRect(this); |
1183 | 1183 |
1184 /** | 1184 /** |
1185 * Access the dimensions and position of this element's content + padding box. | 1185 * Access the dimensions and position of this element's content + padding box. |
1186 * | 1186 * |
1187 * This returns a rectangle with the dimenions actually available for content | 1187 * This returns a rectangle with the dimensions actually available for content |
1188 * in this element, in pixels, regardless of this element's box-sizing | 1188 * in this element, in pixels, regardless of this element's box-sizing |
1189 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 1189 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
1190 * will return the same numerical height if the element is hidden or not. This | 1190 * will return the same numerical height if the element is hidden or not. This |
1191 * can be used to retrieve jQuery's | 1191 * can be used to retrieve jQuery's |
1192 * [innerHeight](http://api.jquery.com/innerHeight/) value for an element. | 1192 * [innerHeight](http://api.jquery.com/innerHeight/) value for an element. |
1193 * This is also a rectangle equalling the dimensions of clientHeight and | 1193 * This is also a rectangle equalling the dimensions of clientHeight and |
1194 * clientWidth. | 1194 * clientWidth. |
1195 * | 1195 * |
1196 * _Important_ _note_: use of this method _will_ perform CSS calculations that | 1196 * _Important_ _note_: use of this method _will_ perform CSS calculations that |
1197 * can trigger a browser reflow. Therefore, use of this property _during_ an | 1197 * can trigger a browser reflow. Therefore, use of this property _during_ an |
1198 * animation frame is discouraged. See also: | 1198 * animation frame is discouraged. See also: |
1199 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) | 1199 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
1200 */ | 1200 */ |
1201 @Experimental() | 1201 @Experimental() |
1202 CssRect get paddingEdge => new _PaddingCssRect(this); | 1202 CssRect get paddingEdge => new _PaddingCssRect(this); |
1203 | 1203 |
1204 /** | 1204 /** |
1205 * Access the dimensions and position of this element's content + padding + | 1205 * Access the dimensions and position of this element's content + padding + |
1206 * border box. | 1206 * border box. |
1207 * | 1207 * |
1208 * This returns a rectangle with the dimenions actually available for content | 1208 * This returns a rectangle with the dimensions actually available for content |
1209 * in this element, in pixels, regardless of this element's box-sizing | 1209 * in this element, in pixels, regardless of this element's box-sizing |
1210 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 1210 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
1211 * will return the same numerical height if the element is hidden or not. This | 1211 * will return the same numerical height if the element is hidden or not. This |
1212 * can be used to retrieve jQuery's | 1212 * can be used to retrieve jQuery's |
1213 * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. | 1213 * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. |
1214 * | 1214 * |
1215 * _Important_ _note_: use of this method _will_ perform CSS calculations that | 1215 * _Important_ _note_: use of this method _will_ perform CSS calculations that |
1216 * can trigger a browser reflow. Therefore, use of this property _during_ an | 1216 * can trigger a browser reflow. Therefore, use of this property _during_ an |
1217 * animation frame is discouraged. See also: | 1217 * animation frame is discouraged. See also: |
1218 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) | 1218 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
1219 */ | 1219 */ |
1220 @Experimental() | 1220 @Experimental() |
1221 CssRect get borderEdge => new _BorderCssRect(this); | 1221 CssRect get borderEdge => new _BorderCssRect(this); |
1222 | 1222 |
1223 /** | 1223 /** |
1224 * Access the dimensions and position of this element's content + padding + | 1224 * Access the dimensions and position of this element's content + padding + |
1225 * border + margin box. | 1225 * border + margin box. |
1226 * | 1226 * |
1227 * This returns a rectangle with the dimenions actually available for content | 1227 * This returns a rectangle with the dimensions actually available for content |
1228 * in this element, in pixels, regardless of this element's box-sizing | 1228 * in this element, in pixels, regardless of this element's box-sizing |
1229 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle | 1229 * property. Unlike [getBoundingClientRect], the dimensions of this rectangle |
1230 * will return the same numerical height if the element is hidden or not. This | 1230 * will return the same numerical height if the element is hidden or not. This |
1231 * can be used to retrieve jQuery's | 1231 * can be used to retrieve jQuery's |
1232 * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. | 1232 * [outerHeight](http://api.jquery.com/outerHeight/) value for an element. |
1233 * | 1233 * |
1234 * _Important_ _note_: use of this method will perform CSS calculations that | 1234 * _Important_ _note_: use of this method will perform CSS calculations that |
1235 * can trigger a browser reflow. Therefore, use of this property _during_ an | 1235 * can trigger a browser reflow. Therefore, use of this property _during_ an |
1236 * animation frame is discouraged. See also: | 1236 * animation frame is discouraged. See also: |
1237 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) | 1237 * [Browser Reflow](https://developers.google.com/speed/articles/reflow) |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 const ScrollAlignment._internal(this._value); | 1674 const ScrollAlignment._internal(this._value); |
1675 toString() => 'ScrollAlignment.$_value'; | 1675 toString() => 'ScrollAlignment.$_value'; |
1676 | 1676 |
1677 /// Attempt to align the element to the top of the scrollable area. | 1677 /// Attempt to align the element to the top of the scrollable area. |
1678 static const TOP = const ScrollAlignment._internal('TOP'); | 1678 static const TOP = const ScrollAlignment._internal('TOP'); |
1679 /// Attempt to center the element in the scrollable area. | 1679 /// Attempt to center the element in the scrollable area. |
1680 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1680 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1681 /// Attempt to align the element to the bottom of the scrollable area. | 1681 /// Attempt to align the element to the bottom of the scrollable area. |
1682 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1682 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1683 } | 1683 } |
OLD | NEW |