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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 13704017: Make html lists print a nice toString method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 8274c8dfd9d76babaf03b9d9dd92b7b13dec8386..6cefc3565dacef8f6ac63d9933bea278e6510786 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -8159,6 +8159,13 @@ class DomMimeTypeArray extends NativeFieldWrapperClass1 implements List<DomMimeT
Map<int, DomMimeType> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<DomMimeType> mixins.
@DomName('DOMMimeTypeArray.item')
@@ -8441,6 +8448,13 @@ class DomPluginArray extends NativeFieldWrapperClass1 implements List<DomPlugin>
Map<int, DomPlugin> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<DomPlugin> mixins.
@DomName('DOMPluginArray.item')
@@ -8841,6 +8855,13 @@ class DomStringList extends NativeFieldWrapperClass1 implements List<String> {
Map<int, String> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<String> mixins.
@DomName('DOMStringList.contains')
@@ -9192,6 +9213,13 @@ class _ChildrenElementList implements List {
Map<int, Element> asMap() {
return IterableMixinWorkaround.asMapList(this);
}
+
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
}
// TODO(jacobr): this is an inefficient implementation but it is hard to see
@@ -9402,6 +9430,13 @@ class _FrozenElementList implements List {
Map<int, Element> asMap() {
return IterableMixinWorkaround.asMapList(this);
}
+
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
}
class _FrozenElementListIterator implements Iterator<Element> {
@@ -9736,6 +9771,12 @@ abstract class Element extends Node implements ElementTraversal {
}
+ /**
+ * Print out a String representation of this Element. By default, this is
+ * this Element's tagName.
+ */
+ String toString() => this.tagName;
+
Element.internal() : super.internal();
@DomName('Element.abortEvent')
@@ -11758,6 +11799,13 @@ class FileList extends NativeFieldWrapperClass1 implements List<File> {
Map<int, File> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<File> mixins.
@DomName('FileList.item')
@@ -12383,6 +12431,13 @@ class Float32Array extends ArrayBufferView implements List<double> {
Map<int, num> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<num> mixins.
@DomName('Float32Array.setElements')
@@ -12632,6 +12687,13 @@ class Float64Array extends ArrayBufferView implements List<double> {
Map<int, num> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<num> mixins.
@DomName('Float64Array.setElements')
@@ -13330,6 +13392,13 @@ class HtmlAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
Map<int, Node> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Node> mixins.
@DomName('HTMLAllCollection.item')
@@ -13553,6 +13622,13 @@ class HtmlCollection extends NativeFieldWrapperClass1 implements List<Node> {
Map<int, Node> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Node> mixins.
@DomName('HTMLCollection.item')
@@ -15923,6 +15999,13 @@ class Int16Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Int16Array.setElements')
@@ -16172,6 +16255,13 @@ class Int32Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Int32Array.setElements')
@@ -16421,6 +16511,13 @@ class Int8Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Int8Array.setElements')
@@ -19228,6 +19325,12 @@ class _ChildNodeListLazy implements List {
List<Node> getRange(int start, int rangeLength) =>
sublist(start, start + rangeLength);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
// -- end List<Node> mixins.
// TODO(jacobr): benchmark whether this is more efficient or whether caching
@@ -19797,6 +19900,13 @@ class NodeList extends NativeFieldWrapperClass1 implements List<Node> {
Map<int, Node> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Node> mixins.
@DomName('NodeList.item')
@@ -22404,6 +22514,13 @@ class SourceBufferList extends EventTarget implements List<SourceBuffer> {
Map<int, SourceBuffer> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<SourceBuffer> mixins.
@DomName('SourceBufferList.addEventListener')
@@ -22736,6 +22853,13 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List<SpeechG
Map<int, SpeechGrammar> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<SpeechGrammar> mixins.
void addFromString(String string, [num weight]) {
@@ -24483,6 +24607,13 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrac
Map<int, TextTrackCue> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<TextTrackCue> mixins.
@DomName('TextTrackCueList.getCueById')
@@ -24706,6 +24837,13 @@ class TextTrackList extends EventTarget implements List<TextTrack> {
Map<int, TextTrack> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<TextTrack> mixins.
@DomName('TextTrackList.addEventListener')
@@ -25146,6 +25284,13 @@ class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
Map<int, Touch> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Touch> mixins.
@DomName('TouchList.item')
@@ -25669,6 +25814,13 @@ class Uint16Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Uint16Array.setElements')
@@ -25918,6 +26070,13 @@ class Uint32Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Uint32Array.setElements')
@@ -26167,6 +26326,13 @@ class Uint8Array extends ArrayBufferView implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Uint8Array.setElements')
@@ -26414,6 +26580,13 @@ class Uint8ClampedArray extends Uint8Array implements List<int> {
Map<int, int> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<int> mixins.
@DomName('Uint8ClampedArray.setElements')
@@ -28804,6 +28977,13 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List<Rect> {
Map<int, Rect> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Rect> mixins.
@DomName('ClientRectList.item')
@@ -29019,6 +29199,13 @@ class _CssRuleList extends NativeFieldWrapperClass1 implements List<CssRule> {
Map<int, CssRule> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<CssRule> mixins.
@DomName('CSSRuleList.item')
@@ -29234,6 +29421,13 @@ class _CssValueList extends CssValue implements List<CssValue> {
Map<int, CssValue> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<CssValue> mixins.
@DomName('CSSValueList.item')
@@ -29592,6 +29786,13 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
Map<int, Entry> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Entry> mixins.
@DomName('EntryArray.item')
@@ -29807,6 +30008,13 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List<EntrySync
Map<int, EntrySync> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<EntrySync> mixins.
@DomName('EntryArraySync.item')
@@ -30022,6 +30230,13 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
Map<int, Gamepad> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Gamepad> mixins.
@DomName('GamepadList.item')
@@ -30328,6 +30543,13 @@ class _NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
Map<int, Node> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<Node> mixins.
@DomName('NamedNodeMap.getNamedItem')
@@ -30567,6 +30789,13 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<Sp
Map<int, SpeechInputResult> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<SpeechInputResult> mixins.
@DomName('SpeechInputResultList.item')
@@ -30782,6 +31011,13 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L
Map<int, SpeechRecognitionResult> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<SpeechRecognitionResult> mixins.
@DomName('SpeechRecognitionResultList.item')
@@ -30997,6 +31233,13 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleShee
Map<int, StyleSheet> asMap() =>
IterableMixinWorkaround.asMapList(this);
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
// -- end List<StyleSheet> mixins.
@DomName('StyleSheetList.item')
@@ -33474,6 +33717,13 @@ class _WrappedList<E> implements List<E> {
}
Map<int, E> asMap() => IterableMixinWorkaround.asMapList(_list);
+
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
}
/**
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698