Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: tools/dom/templates/html/impl/impl_Element.darttemplate

Issue 12319141: Fix bug in html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated
8 // functionality. 8 // functionality.
9 class _ChildrenElementList implements List { 9 class _ChildrenElementList implements List {
10 // Raw Element. 10 // Raw Element.
11 final Element _element; 11 final Element _element;
12 final HtmlCollection _childElements; 12 final HtmlCollection _childElements;
13 13
14 _ChildrenElementList._wrap(Element element) 14 _ChildrenElementList._wrap(Element element)
15 : _childElements = element.$dom_children, 15 : _childElements = element.$dom_children,
16 _element = element; 16 _element = element;
17 17
18 List<Element> toList({ bool growable: false }) { 18 List<Element> toList({ bool growable: false }) {
19 final output; 19 List<Element> output;
20 if (growable) { 20 if (growable) {
21 output = <Element>[]; 21 output = <Element>[];
22 output.length = _childElements.length; 22 output.length = _childElements.length;
23 } else { 23 } else {
24 output = new List<Element>(_childElements.length); 24 output = new List<Element>(_childElements.length);
25 } 25 }
26 for (int i = 0, len = _childElements.length; i < len; i++) { 26 for (int i = 0, len = _childElements.length; i < len; i++) {
27 output[i] = _childElements[i]; 27 output[i] = _childElements[i];
28 } 28 }
29 return output; 29 return output;
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 const ScrollAlignment._internal(this._value); 1115 const ScrollAlignment._internal(this._value);
1116 toString() => 'ScrollAlignment.$_value'; 1116 toString() => 'ScrollAlignment.$_value';
1117 1117
1118 /// Attempt to align the element to the top of the scrollable area. 1118 /// Attempt to align the element to the top of the scrollable area.
1119 static const TOP = const ScrollAlignment._internal('TOP'); 1119 static const TOP = const ScrollAlignment._internal('TOP');
1120 /// Attempt to center the element in the scrollable area. 1120 /// Attempt to center the element in the scrollable area.
1121 static const CENTER = const ScrollAlignment._internal('CENTER'); 1121 static const CENTER = const ScrollAlignment._internal('CENTER');
1122 /// Attempt to align the element to the bottom of the scrollable area. 1122 /// Attempt to align the element to the bottom of the scrollable area.
1123 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1123 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1124 } 1124 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698