| 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 // Raw Element. | 8 // Raw Element. |
| 9 final Element _element; | 9 final Element _element; |
| 10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 * [x-tags]: http://x-tags.org/ | 443 * [x-tags]: http://x-tags.org/ |
| 444 */ | 444 */ |
| 445 // Note: return type is `dynamic` for convenience to suppress warnings when | 445 // Note: return type is `dynamic` for convenience to suppress warnings when |
| 446 // members of the component are used. The actual type is a subtype of Element. | 446 // members of the component are used. The actual type is a subtype of Element. |
| 447 get xtag => _xtag != null ? _xtag : this; | 447 get xtag => _xtag != null ? _xtag : this; |
| 448 | 448 |
| 449 void set xtag(Element value) { | 449 void set xtag(Element value) { |
| 450 _xtag = value; | 450 _xtag = value; |
| 451 } | 451 } |
| 452 | 452 |
| 453 @DomName('Element.localName') |
| 454 @DocsEditable |
| 455 String get localName => $dom_localName; |
| 456 |
| 457 @DomName('Element.namespaceUri') |
| 458 @DocsEditable |
| 459 String get namespaceUri => $dom_namespaceUri; |
| 460 |
| 461 String toString() => localName; |
| 462 |
| 453 /** | 463 /** |
| 454 * Scrolls this element into view. | 464 * Scrolls this element into view. |
| 455 * | 465 * |
| 456 * Only one of of the alignment options may be specified at a time. | 466 * Only one of of the alignment options may be specified at a time. |
| 457 * | 467 * |
| 458 * If no options are specified then this will attempt to scroll the minimum | 468 * If no options are specified then this will attempt to scroll the minimum |
| 459 * amount needed to bring the element into view. | 469 * amount needed to bring the element into view. |
| 460 * | 470 * |
| 461 * Note that alignCenter is currently only supported on WebKit platforms. If | 471 * Note that alignCenter is currently only supported on WebKit platforms. If |
| 462 * alignCenter is specified but not supported then this will fall back to | 472 * alignCenter is specified but not supported then this will fall back to |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 return 'wheel'; | 510 return 'wheel'; |
| 501 } else if (JS('bool', '#.onmousewheel !== undefined', e)) { | 511 } else if (JS('bool', '#.onmousewheel !== undefined', e)) { |
| 502 // Chrome & IE | 512 // Chrome & IE |
| 503 return 'mousewheel'; | 513 return 'mousewheel'; |
| 504 } else { | 514 } else { |
| 505 // Firefox | 515 // Firefox |
| 506 return 'DOMMouseScroll'; | 516 return 'DOMMouseScroll'; |
| 507 } | 517 } |
| 508 } | 518 } |
| 509 | 519 |
| 510 @DomName('Element.webkitTransitionEndEvent') | 520 @DomName('Element.transitionEndEvent') |
| 511 static const EventStreamProvider<TransitionEvent> transitionEndEvent = | 521 static const EventStreamProvider<TransitionEvent> transitionEndEvent = |
| 512 const _CustomEventStreamProvider<TransitionEvent>( | 522 const _CustomEventStreamProvider<TransitionEvent>( |
| 513 Element._determineTransitionEventType); | 523 Element._determineTransitionEventType); |
| 514 | 524 |
| 515 static String _determineTransitionEventType(EventTarget e) { | 525 static String _determineTransitionEventType(EventTarget e) { |
| 516 // Unfortunately the normal 'ontransitionend' style checks don't work here. | 526 // Unfortunately the normal 'ontransitionend' style checks don't work here. |
| 517 if (Device.isWebKit) { | 527 if (Device.isWebKit) { |
| 518 return 'webkitTransitionEnd'; | 528 return 'webkitTransitionEnd'; |
| 519 } else if (Device.isOpera) { | 529 } else if (Device.isOpera) { |
| 520 return 'oTransitionEnd'; | 530 return 'oTransitionEnd'; |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 const ScrollAlignment._internal(this._value); | 1046 const ScrollAlignment._internal(this._value); |
| 1037 toString() => 'ScrollAlignment.$_value'; | 1047 toString() => 'ScrollAlignment.$_value'; |
| 1038 | 1048 |
| 1039 /// Attempt to align the element to the top of the scrollable area. | 1049 /// Attempt to align the element to the top of the scrollable area. |
| 1040 static const TOP = const ScrollAlignment._internal('TOP'); | 1050 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1041 /// Attempt to center the element in the scrollable area. | 1051 /// Attempt to center the element in the scrollable area. |
| 1042 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1052 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1043 /// Attempt to align the element to the bottom of the scrollable area. | 1053 /// Attempt to align the element to the bottom of the scrollable area. |
| 1044 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1054 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1045 } | 1055 } |
| OLD | NEW |