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

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

Issue 1891543005: Remove the generics from _FrozenElementList: causes checked mode failures (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« 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 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 CssRect get marginEdge; 257 CssRect get marginEdge;
258 $!STREAM_GETTER_SIGNATURES 258 $!STREAM_GETTER_SIGNATURES
259 } 259 }
260 260
261 // Wrapper over an immutable NodeList to make it implement ElementList. 261 // Wrapper over an immutable NodeList to make it implement ElementList.
262 // 262 //
263 // Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are 263 // Clients are {`Document`, `DocumentFragment`}.`querySelectorAll` which are
264 // declared to return `ElementList`. This provides all the static analysis 264 // declared to return `ElementList`. This provides all the static analysis
265 // benefit so there is no need for this class have a constrained type parameter. 265 // benefit so there is no need for this class have a constrained type parameter.
266 // 266 //
267 class _FrozenElementList extends ListBase<Element> 267 class _FrozenElementList extends ListBase
268 implements ElementList<Element>, NodeListWrapper { 268 implements ElementList, NodeListWrapper {
269 final List<Node> _nodeList; 269 final List<Node> _nodeList;
270 270
271 $if JSINTEROP 271 $if JSINTEROP
272 var dartClass_instance; 272 var dartClass_instance;
273 273
274 _FrozenElementList._wrap(this._nodeList) { 274 _FrozenElementList._wrap(this._nodeList) {
275 this.dartClass_instance = this._nodeList; 275 this.dartClass_instance = this._nodeList;
276 } 276 }
277 $else 277 $else
278 _FrozenElementList._wrap(this._nodeList); 278 _FrozenElementList._wrap(this._nodeList);
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 return result; 1524 return result;
1525 } 1525 }
1526 $else 1526 $else
1527 static String _safeTagName(element) { 1527 static String _safeTagName(element) {
1528 try { 1528 try {
1529 // Safe as we plumb directly to a C++ native method. 1529 // Safe as we plumb directly to a C++ native method.
1530 return element.tagName; 1530 return element.tagName;
1531 } catch (e) {} 1531 } catch (e) {}
1532 return 'element tag unavailable'; 1532 return 'element tag unavailable';
1533 } 1533 }
1534 $endif 1534 $endif
1535 1535
1536 $if DART2JS 1536 $if DART2JS
1537 @DomName('Element.offsetParent') 1537 @DomName('Element.offsetParent')
1538 @DocsEditable() 1538 @DocsEditable()
1539 final Element offsetParent; 1539 final Element offsetParent;
1540 1540
1541 @DomName('Element.offsetHeight') 1541 @DomName('Element.offsetHeight')
1542 @DocsEditable() 1542 @DocsEditable()
1543 int get offsetHeight => JS('num', '#.offsetHeight', this).round(); 1543 int get offsetHeight => JS('num', '#.offsetHeight', this).round();
1544 1544
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 const ScrollAlignment._internal(this._value); 1670 const ScrollAlignment._internal(this._value);
1671 toString() => 'ScrollAlignment.$_value'; 1671 toString() => 'ScrollAlignment.$_value';
1672 1672
1673 /// Attempt to align the element to the top of the scrollable area. 1673 /// Attempt to align the element to the top of the scrollable area.
1674 static const TOP = const ScrollAlignment._internal('TOP'); 1674 static const TOP = const ScrollAlignment._internal('TOP');
1675 /// Attempt to center the element in the scrollable area. 1675 /// Attempt to center the element in the scrollable area.
1676 static const CENTER = const ScrollAlignment._internal('CENTER'); 1676 static const CENTER = const ScrollAlignment._internal('CENTER');
1677 /// Attempt to align the element to the bottom of the scrollable area. 1677 /// Attempt to align the element to the bottom of the scrollable area.
1678 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1678 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1679 } 1679 }
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