Chromium Code Reviews| Index: client/html/release/htmlimpl.dart |
| diff --git a/client/html/release/htmlimpl.dart b/client/html/release/htmlimpl.dart |
| index e631aec33dc42be33362c861aa088477707c3a88..c703c50e8a9ed2d05346d3731bce83b1757fb212 100644 |
| --- a/client/html/release/htmlimpl.dart |
| +++ b/client/html/release/htmlimpl.dart |
| @@ -22467,29 +22467,34 @@ class _ChildrenElementList implements ElementList { |
| class FrozenElementList implements ElementList { |
| final _ptr; |
| - List<Element> _list; |
| FrozenElementList._wrap(this._ptr); |
| - List<Element> _toList() { |
| - if (_list == null) { |
| - _list = new List(_ptr.length); |
| - for (int i = 0, len = _ptr.length; i < len; i++) { |
| - _list[i] = LevelDom.wrapElement(_ptr[i]); |
| - } |
| - } |
| - return _list; |
| - } |
| - |
| Element get first() { |
| return this[0]; |
| } |
| - void forEach(void f(Element element)) => _toList().forEach(f); |
| + void forEach(void f(Element element)) { |
| + for (Element el in this) { |
| + f(el); |
| + } |
| + } |
| - Collection map(f(Element element)) => _toList().map(f); |
| + Collection map(f(Element element)) { |
| + var out = []; |
|
Jacob
2012/01/26 01:56:27
var --> final here and elsewhere in this file
nweiz
2012/01/26 23:18:09
Done.
|
| + for (Element el in this) { |
| + out.add(f(el)); |
| + } |
| + return out; |
| + } |
| - Collection<Element> filter(bool f(Element element)) => _toList().filter(f); |
| + Collection<Element> filter(bool f(Element element)) { |
| + var out = []; |
|
Jacob
2012/01/26 01:56:27
[] --> <Element>[]
nweiz
2012/01/26 23:18:09
This became an ElementList later on anyway.
|
| + for (Element el in this) { |
| + if (f(el)) out.add(el); |
| + } |
| + return out; |
| + } |
| bool every(bool f(Element element)) { |
| for(Element element in this) { |