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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11269004: Change List.sort to not have a default parameter value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tup of tree. Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index e7ca906d9c48153ccf9b955b08a833f2211520af..136a1fbcf8742773c0e9e642915395e4c828ea45 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -5328,7 +5328,7 @@ class DOMMimeTypeArray implements JavaScriptIndexingBehavior, List<DOMMimeType>
// From List<DOMMimeType>:
- void sort([Comparator<DOMMimeType> compare = Comparable.compare]) {
+ void sort([int compare(DOMMimeType a, DOMMimeType b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -5477,7 +5477,7 @@ class DOMPluginArray implements JavaScriptIndexingBehavior, List<DOMPlugin> nati
// From List<DOMPlugin>:
- void sort([Comparator<DOMPlugin> compare = Comparable.compare]) {
+ void sort([int compare(DOMPlugin a, DOMPlugin b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6050,27 +6050,6 @@ class DirectoryReaderSync native "*DirectoryReaderSync" {
// BSD-style license that can be found in the LICENSE file.
-/**
- * Represents an HTML <div> element.
- *
- * The [DivElement] is a generic container for content and does not have any
- * special significance. It is functionally similar to [SpanElement].
- *
- * The [DivElement] is a block-level element, as opposed to [SpanElement],
- * which is an inline-level element.
- *
- * Example usage:
- *
- * DivElement div = new DivElement();
- * div.text = 'Here's my new DivElem
- * document.body.elements.add(elem);
- *
- * See also:
- *
- * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.
- * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C.
- * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.
- */
/// @domName HTMLDivElement; @docsEditable true
class DivElement extends Element implements Element native "*HTMLDivElement" {
@@ -6109,7 +6088,6 @@ class Document extends Node native "*Document"
/// @domName Document.cookie; @docsEditable true
String cookie;
- /// Returns the [Window] associated with the document.
/// @domName Document.defaultView; @docsEditable true
Window get window => _convertNativeToDart_Window(this._window);
@JSName('defaultView')
@@ -6787,7 +6765,7 @@ class _ChildrenElementList implements List {
}
}
- void sort([Comparator<Element> compare = Comparable.compare]) {
+ void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
@@ -6923,7 +6901,7 @@ class _FrozenElementList implements List {
throw new UnsupportedError('');
}
- void sort([Comparator<Element> compare = Comparable.compare]) {
+ void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('');
}
@@ -8290,7 +8268,7 @@ class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileLi
// From List<File>:
- void sort([Comparator<File> compare = Comparable.compare]) {
+ void sort([int compare(File a, File b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8611,7 +8589,7 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior
// From List<num>:
- void sort([Comparator<num> compare = Comparable.compare]) {
+ void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8730,7 +8708,7 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior
// From List<num>:
- void sort([Comparator<num> compare = Comparable.compare]) {
+ void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -9096,7 +9074,7 @@ class HTMLAllCollection implements JavaScriptIndexingBehavior, List<Node> native
// From List<Node>:
- void sort([Comparator<Node> compare = Comparable.compare]) {
+ void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -9210,7 +9188,7 @@ class HTMLCollection implements JavaScriptIndexingBehavior, List<Node> native "*
// From List<Node>:
- void sort([Comparator<Node> compare = Comparable.compare]) {
+ void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10055,7 +10033,7 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10174,7 +10152,7 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10293,7 +10271,7 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -11967,16 +11945,6 @@ class MemoryInfo native "*MemoryInfo" {
// BSD-style license that can be found in the LICENSE file.
-/**
- * An HTML <menu> element.
- *
- * A <menu> element represents an unordered list of menu commands.
- *
- * See also:
- *
- * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
- * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.
- */
/// @domName HTMLMenuElement; @docsEditable true
class MenuElement extends Element implements Element native "*HTMLMenuElement" {
@@ -12511,7 +12479,7 @@ class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*Na
// From List<Node>:
- void sort([Comparator<Node> compare = Comparable.compare]) {
+ void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -12759,7 +12727,7 @@ class _ChildNodeListLazy implements List {
// TODO(jacobr): this could be implemented for child node lists.
// The exception we throw here is misleading.
- void sort([Comparator<Node> compare = Comparable.compare]) {
+ void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -13101,7 +13069,7 @@ class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeLi
// From List<Node>:
- void sort([Comparator<Node> compare = Comparable.compare]) {
+ void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -14706,7 +14674,7 @@ class SQLResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
// From List<Map>:
- void sort([Comparator<Map> compare = Comparable.compare]) {
+ void sort([int compare(Map a, Map b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -15218,7 +15186,7 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior
// From List<SourceBuffer>:
- void sort([Comparator<SourceBuffer> compare = Comparable.compare]) {
+ void sort([int compare(SourceBuffer a, SourceBuffer b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -15384,7 +15352,7 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGramma
// From List<SpeechGrammar>:
- void sort([Comparator<SpeechGrammar> compare = Comparable.compare]) {
+ void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -16431,7 +16399,7 @@ class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior
// From List<TextTrackCue>:
- void sort([Comparator<TextTrackCue> compare = Comparable.compare]) {
+ void sort([int compare(TextTrackCue a, TextTrackCue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -16545,7 +16513,7 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L
// From List<TextTrack>:
- void sort([Comparator<TextTrack> compare = Comparable.compare]) {
+ void sort([int compare(TextTrack a, TextTrack b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -16784,7 +16752,7 @@ class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*Touc
// From List<Touch>:
- void sort([Comparator<Touch> compare = Comparable.compare]) {
+ void sort([int compare(Touch a, Touch b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -17083,7 +17051,7 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -17202,7 +17170,7 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -17321,7 +17289,7 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior,
// From List<int>:
- void sort([Comparator<int> compare = Comparable.compare]) {
+ void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19525,7 +19493,7 @@ class _CSSRuleList implements JavaScriptIndexingBehavior, List<CSSRule> native "
// From List<CSSRule>:
- void sort([Comparator<CSSRule> compare = Comparable.compare]) {
+ void sort([int compare(CSSRule a, CSSRule b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19632,7 +19600,7 @@ class _CSSValueList extends CSSValue implements List<CSSValue>, JavaScriptIndexi
// From List<CSSValue>:
- void sort([Comparator<CSSValue> compare = Comparable.compare]) {
+ void sort([int compare(CSSValue a, CSSValue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19739,7 +19707,7 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> na
// From List<ClientRect>:
- void sort([Comparator<ClientRect> compare = Comparable.compare]) {
+ void sort([int compare(ClientRect a, ClientRect b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19855,7 +19823,7 @@ class _DOMStringList implements JavaScriptIndexingBehavior, List<String> native
// From List<String>:
- void sort([Comparator<String> compare = Comparable.compare]) {
+ void sort([int compare(String a, String b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19982,7 +19950,7 @@ class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*En
// From List<Entry>:
- void sort([Comparator<Entry> compare = Comparable.compare]) {
+ void sort([int compare(Entry a, Entry b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20089,7 +20057,7 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> nat
// From List<EntrySync>:
- void sort([Comparator<EntrySync> compare = Comparable.compare]) {
+ void sort([int compare(EntrySync a, EntrySync b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20234,7 +20202,7 @@ class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "
// From List<Gamepad>:
- void sort([Comparator<Gamepad> compare = Comparable.compare]) {
+ void sort([int compare(Gamepad a, Gamepad b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20394,7 +20362,7 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream>
// From List<MediaStream>:
- void sort([Comparator<MediaStream> compare = Comparable.compare]) {
+ void sort([int compare(MediaStream a, MediaStream b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20654,7 +20622,7 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechI
// From List<SpeechInputResult>:
- void sort([Comparator<SpeechInputResult> compare = Comparable.compare]) {
+ void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20770,7 +20738,7 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<S
// From List<SpeechRecognitionResult>:
- void sort([Comparator<SpeechRecognitionResult> compare = Comparable.compare]) {
+ void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20877,7 +20845,7 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> na
// From List<StyleSheet>:
- void sort([Comparator<StyleSheet> compare = Comparable.compare]) {
+ void sort([int compare(StyleSheet a, StyleSheet b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -21008,7 +20976,7 @@ class _WebKitAnimationList implements JavaScriptIndexingBehavior, List<Animation
// From List<Animation>:
- void sort([Comparator<Animation> compare = Comparable.compare]) {
+ void sort([int compare(Animation a, Animation b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -21662,7 +21630,7 @@ class FilteredElementList implements List {
return element is Element && _childNodes.contains(element);
}
- void sort([Comparator<Element> compare = Comparable.compare]) {
+ void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}

Powered by Google App Engine
This is Rietveld 408576698