Version 1.7.0-dev.4.5

Apply patch from:
https://codereview.chromium.org/640743003

git-svn-id: http://dart.googlecode.com/svn/trunk@41004 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_blink/dartium/_blink_dartium.dart b/sdk/lib/_blink/dartium/_blink_dartium.dart
index f219ba8..98e55d8 100644
--- a/sdk/lib/_blink/dartium/_blink_dartium.dart
+++ b/sdk/lib/_blink/dartium/_blink_dartium.dart
@@ -1073,6 +1073,8 @@
 
   static data_Getter(mthis) native "CompositionEvent_data_Getter";
 
+  static getSegments_Callback(mthis) native "CompositionEvent_getSegments_Callback";
+
   static initCompositionEvent_Callback_DOMString_boolean_boolean_Window_DOMString(mthis, typeArg, canBubbleArg, cancelableArg, viewArg, dataArg) native "CompositionEvent_initCompositionEvent_Callback_DOMString_boolean_boolean_Window_DOMString";
 }
 
@@ -4047,9 +4049,13 @@
 }
 
 class BlinkMIDIOutput {
+  static send_Callback_Uint8Array(mthis, data) native "MIDIOutput_send_Callback_Uint8Array";
+
   static send_Callback_Uint8Array_double(mthis, data, timestamp) native "MIDIOutput_send_Callback_Uint8Array_double";
 
-  static send_Callback_Uint8Array(mthis, data) native "MIDIOutput_send_Callback_Uint8Array";
+  static send_Callback_SEQ_ul_SEQ(mthis, data) native "MIDIOutput_send_Callback_sequence<unsigned long>";
+
+  static send_Callback_SEQ_ul_SEQ_double(mthis, data, timestamp) native "MIDIOutput_send_Callback_sequence<unsigned long>_double";
 }
 
 class BlinkMediaController {
@@ -7860,7 +7866,9 @@
 
 class BlinkWebGLDepthTexture {}
 
-class BlinkWebGLDrawBuffers {}
+class BlinkWebGLDrawBuffers {
+  static drawBuffersWEBGL_Callback_SEQ_ul_SEQ(mthis, buffers) native "WebGLDrawBuffers_drawBuffersWEBGL_Callback_sequence<unsigned long>";
+}
 
 class BlinkWebGLFramebuffer {}
 
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 6373ad0..be410b0f 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -2511,6 +2511,11 @@
   @DocsEditable()
   final String data;
 
+  @DomName('CompositionEvent.getSegments')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getSegments() native;
+
   @JSName('initCompositionEvent')
   @DomName('CompositionEvent.initCompositionEvent')
   @DocsEditable()
@@ -19860,7 +19865,7 @@
 
   @DomName('MIDIOutput.send')
   @DocsEditable()
-  void send(Uint8List data, [num timestamp]) native;
+  void send(data, [num timestamp]) native;
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index edb3411..09e7df7 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -3366,6 +3366,11 @@
   @DocsEditable()
   String get data => _blink.BlinkCompositionEvent.data_Getter(this);
 
+  @DomName('CompositionEvent.getSegments')
+  @DocsEditable()
+  @Experimental() // untriaged
+  List<int> getSegments() => _blink.BlinkCompositionEvent.getSegments_Callback(this);
+
   @DomName('CompositionEvent.initCompositionEvent')
   @DocsEditable()
   void _initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) => _blink.BlinkCompositionEvent.initCompositionEvent_Callback_DOMString_boolean_boolean_Window_DOMString(this, typeArg, canBubbleArg, cancelableArg, viewArg, dataArg);
@@ -21644,13 +21649,24 @@
   // To suppress missing implicit constructor warnings.
   factory MidiOutput._() { throw new UnsupportedError("Not supported"); }
 
-  void send(Uint8List data, [num timestamp]) {
-    if (timestamp != null) {
+  void send(data, [num timestamp]) {
+    if ((data is Uint8List || data == null) && timestamp == null) {
+      _blink.BlinkMIDIOutput.send_Callback_Uint8Array(this, data);
+      return;
+    }
+    if ((timestamp is num || timestamp == null) && (data is Uint8List || data == null)) {
       _blink.BlinkMIDIOutput.send_Callback_Uint8Array_double(this, data, timestamp);
       return;
     }
-    _blink.BlinkMIDIOutput.send_Callback_Uint8Array(this, data);
-    return;
+    if ((data is List<int> || data == null) && timestamp == null) {
+      _blink.BlinkMIDIOutput.send_Callback_SEQ_ul_SEQ(this, data);
+      return;
+    }
+    if ((timestamp is num || timestamp == null) && (data is List<int> || data == null)) {
+      _blink.BlinkMIDIOutput.send_Callback_SEQ_ul_SEQ_double(this, data, timestamp);
+      return;
+    }
+    throw new ArgumentError("Incorrect number or type of arguments");
   }
 
 }
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index 4beaea8..e703441 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -787,6 +787,11 @@
   @DomName('WebGLDrawBuffers.MAX_DRAW_BUFFERS_WEBGL')
   @DocsEditable()
   static const int MAX_DRAW_BUFFERS_WEBGL = 0x8824;
+
+  @JSName('drawBuffersWEBGL')
+  @DomName('WebGLDrawBuffers.drawBuffersWEBGL')
+  @DocsEditable()
+  void drawBuffersWebgl(List<int> buffers) native;
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
diff --git a/sdk/lib/web_gl/dartium/web_gl_dartium.dart b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
index 182750d..5c73dc9 100644
--- a/sdk/lib/web_gl/dartium/web_gl_dartium.dart
+++ b/sdk/lib/web_gl/dartium/web_gl_dartium.dart
@@ -873,6 +873,10 @@
   @DocsEditable()
   static const int MAX_DRAW_BUFFERS_WEBGL = 0x8824;
 
+  @DomName('WebGLDrawBuffers.drawBuffersWEBGL')
+  @DocsEditable()
+  void drawBuffersWebgl(List<int> buffers) => _blink.BlinkWebGLDrawBuffers.drawBuffersWEBGL_Callback_SEQ_ul_SEQ(this, buffers);
+
 }
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
diff --git a/tools/VERSION b/tools/VERSION
index 9ab4e59..24181fb 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
 MINOR 7
 PATCH 0
 PRERELEASE 4
-PRERELEASE_PATCH 4
+PRERELEASE_PATCH 5
diff --git a/tools/dom/dom.json b/tools/dom/dom.json
index b0feb5b..b7106b9 100644
--- a/tools/dom/dom.json
+++ b/tools/dom/dom.json
@@ -1256,6 +1256,9 @@
         "support_level": "untriaged"
       },
       "data": {},
+      "getSegments": {
+        "support_level": "untriaged"
+      },
       "initCompositionEvent": {}
     },
     "support_level": "stable"
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index 7cb718a..3e1bf31 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -28,7 +28,7 @@
 
   def __init__(self, logging_level=logging.WARNING):
     self._auxiliary_files = {}
-    self._dart_templates_re = re.compile(r'[\w.:]+<([\w\.<>:]+)>')
+    self._dart_templates_re = re.compile(r'[\w.:]+<([\w \.<>:]+)>')
     _logger.setLevel(logging_level)
 
   def _StripModules(self, type_name):
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 59c5458..04a6455 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -1273,7 +1273,7 @@
     return self.TypeInfo(type_name).dart_type()
 
   def _TypeInfo(self, type_name):
-    match = re.match(r'(?:sequence<(\w+)>|(\w+)\[\])$', type_name)
+    match = re.match(r'(?:sequence<([\w ]+)>|(\w+)\[\])$', type_name)
     if match:
       type_data = TypeData('Sequence')
       item_info = self.TypeInfo(match.group(1) or match.group(2))