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

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

Issue 1909613003: Revert "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
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 267 class _FrozenElementList extends ListBase<Element>
268 implements ElementList, NodeListWrapper { 268 implements ElementList<Element>, 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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 return result; 1523 return result;
1524 } 1524 }
1525 $else 1525 $else
1526 static String _safeTagName(element) { 1526 static String _safeTagName(element) {
1527 try { 1527 try {
1528 // Safe as we plumb directly to a C++ native method. 1528 // Safe as we plumb directly to a C++ native method.
1529 return element.tagName; 1529 return element.tagName;
1530 } catch (e) {} 1530 } catch (e) {}
1531 return 'element tag unavailable'; 1531 return 'element tag unavailable';
1532 } 1532 }
1533 $endif 1533 $endif
1534 1534
1535 $if DART2JS 1535 $if DART2JS
1536 @DomName('Element.offsetParent') 1536 @DomName('Element.offsetParent')
1537 @DocsEditable() 1537 @DocsEditable()
1538 final Element offsetParent; 1538 final Element offsetParent;
1539 1539
1540 @DomName('Element.offsetHeight') 1540 @DomName('Element.offsetHeight')
1541 @DocsEditable() 1541 @DocsEditable()
1542 int get offsetHeight => JS('num', '#.offsetHeight', this).round(); 1542 int get offsetHeight => JS('num', '#.offsetHeight', this).round();
1543 1543
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 const ScrollAlignment._internal(this._value); 1669 const ScrollAlignment._internal(this._value);
1670 toString() => 'ScrollAlignment.$_value'; 1670 toString() => 'ScrollAlignment.$_value';
1671 1671
1672 /// Attempt to align the element to the top of the scrollable area. 1672 /// Attempt to align the element to the top of the scrollable area.
1673 static const TOP = const ScrollAlignment._internal('TOP'); 1673 static const TOP = const ScrollAlignment._internal('TOP');
1674 /// Attempt to center the element in the scrollable area. 1674 /// Attempt to center the element in the scrollable area.
1675 static const CENTER = const ScrollAlignment._internal('CENTER'); 1675 static const CENTER = const ScrollAlignment._internal('CENTER');
1676 /// Attempt to align the element to the bottom of the scrollable area. 1676 /// Attempt to align the element to the bottom of the scrollable area.
1677 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1677 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1678 } 1678 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698