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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11348382: Moving AudioElement back to dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library html; 1 library html;
2 2
3 import 'dart:html_common'; 3 import 'dart:html_common';
4 import 'dart:isolate'; 4 import 'dart:isolate';
5 import 'dart:json'; 5 import 'dart:json';
6 import 'dart:svg' as svg; 6 import 'dart:svg' as svg;
7 import 'dart:web_audio' as web_audio; 7 import 'dart:web_audio' as web_audio;
8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
9 // for details. All rights reserved. Use of this source code is governed by a 9 // for details. All rights reserved. Use of this source code is governed by a
10 // BSD-style license that can be found in the LICENSE file. 10 // BSD-style license that can be found in the LICENSE file.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 final bool specified; 367 final bool specified;
368 368
369 /// @domName Attr.value; @docsEditable true 369 /// @domName Attr.value; @docsEditable true
370 String value; 370 String value;
371 } 371 }
372 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 372 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
373 // for details. All rights reserved. Use of this source code is governed by a 373 // for details. All rights reserved. Use of this source code is governed by a
374 // BSD-style license that can be found in the LICENSE file. 374 // BSD-style license that can be found in the LICENSE file.
375 375
376 376
377 /// @domName HTMLAudioElement; @docsEditable true
378 class AudioElement extends MediaElement native "*HTMLAudioElement" {
379
380 factory AudioElement([String src]) {
381 if (!?src) {
382 return _AudioElementFactoryProvider.createAudioElement();
383 }
384 return _AudioElementFactoryProvider.createAudioElement(src);
385 }
386 }
387 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
388 // for details. All rights reserved. Use of this source code is governed by a
389 // BSD-style license that can be found in the LICENSE file.
390
391
377 /// @domName HTMLBRElement; @docsEditable true 392 /// @domName HTMLBRElement; @docsEditable true
378 class BRElement extends Element implements Element native "*HTMLBRElement" { 393 class BRElement extends Element implements Element native "*HTMLBRElement" {
379 394
380 factory BRElement() => document.$dom_createElement("br"); 395 factory BRElement() => document.$dom_createElement("br");
381 396
382 /// @domName HTMLBRElement.clear; @docsEditable true 397 /// @domName HTMLBRElement.clear; @docsEditable true
383 String clear; 398 String clear;
384 } 399 }
385 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 400 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
386 // for details. All rights reserved. Use of this source code is governed by a 401 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 7175 matching lines...) Expand 10 before | Expand all | Expand 10 after
7562 // Firefox 7577 // Firefox
7563 return this['DOMMouseScroll']; 7578 return this['DOMMouseScroll'];
7564 } 7579 }
7565 } 7580 }
7566 } 7581 }
7567 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 7582 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7568 // for details. All rights reserved. Use of this source code is governed by a 7583 // for details. All rights reserved. Use of this source code is governed by a
7569 // BSD-style license that can be found in the LICENSE file. 7584 // BSD-style license that can be found in the LICENSE file.
7570 7585
7571 7586
7572 /// @domName ElementTimeControl
7573 abstract class ElementTimeControl {
7574
7575 /// @domName ElementTimeControl.beginElement; @docsEditable true
7576 void beginElement();
7577
7578 /// @domName ElementTimeControl.beginElementAt; @docsEditable true
7579 void beginElementAt(num offset);
7580
7581 /// @domName ElementTimeControl.endElement; @docsEditable true
7582 void endElement();
7583
7584 /// @domName ElementTimeControl.endElementAt; @docsEditable true
7585 void endElementAt(num offset);
7586 }
7587 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7588 // for details. All rights reserved. Use of this source code is governed by a
7589 // BSD-style license that can be found in the LICENSE file.
7590
7591
7592 /// @domName ElementTraversal 7587 /// @domName ElementTraversal
7593 abstract class ElementTraversal { 7588 abstract class ElementTraversal {
7594 7589
7595 int childElementCount; 7590 int childElementCount;
7596 7591
7597 Element firstElementChild; 7592 Element firstElementChild;
7598 7593
7599 Element lastElementChild; 7594 Element lastElementChild;
7600 7595
7601 Element nextElementSibling; 7596 Element nextElementSibling;
(...skipping 10658 matching lines...) Expand 10 before | Expand all | Expand 10 after
18260 18255
18261 // WARNING: Do not edit - generated code. 18256 // WARNING: Do not edit - generated code.
18262 18257
18263 18258
18264 typedef void VoidCallback(); 18259 typedef void VoidCallback();
18265 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 18260 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
18266 // for details. All rights reserved. Use of this source code is governed by a 18261 // for details. All rights reserved. Use of this source code is governed by a
18267 // BSD-style license that can be found in the LICENSE file. 18262 // BSD-style license that can be found in the LICENSE file.
18268 18263
18269 18264
18270 /// @domName WaveTable; @docsEditable true
18271 class WaveTable native "*WaveTable" {
18272 }
18273 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
18274 // for details. All rights reserved. Use of this source code is governed by a
18275 // BSD-style license that can be found in the LICENSE file.
18276
18277
18278 /// @domName WebGLActiveInfo; @docsEditable true 18265 /// @domName WebGLActiveInfo; @docsEditable true
18279 class WebGLActiveInfo native "*WebGLActiveInfo" { 18266 class WebGLActiveInfo native "*WebGLActiveInfo" {
18280 18267
18281 /// @domName WebGLActiveInfo.name; @docsEditable true 18268 /// @domName WebGLActiveInfo.name; @docsEditable true
18282 final String name; 18269 final String name;
18283 18270
18284 /// @domName WebGLActiveInfo.size; @docsEditable true 18271 /// @domName WebGLActiveInfo.size; @docsEditable true
18285 final int size; 18272 final int size;
18286 18273
18287 /// @domName WebGLActiveInfo.type; @docsEditable true 18274 /// @domName WebGLActiveInfo.type; @docsEditable true
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after
20171 20158
20172 class _ArrayBufferFactoryProvider { 20159 class _ArrayBufferFactoryProvider {
20173 static ArrayBuffer createArrayBuffer(int length) => 20160 static ArrayBuffer createArrayBuffer(int length) =>
20174 JS('ArrayBuffer', 'new ArrayBuffer(#)', length); 20161 JS('ArrayBuffer', 'new ArrayBuffer(#)', length);
20175 } 20162 }
20176 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 20163 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20177 // for details. All rights reserved. Use of this source code is governed by a 20164 // for details. All rights reserved. Use of this source code is governed by a
20178 // BSD-style license that can be found in the LICENSE file. 20165 // BSD-style license that can be found in the LICENSE file.
20179 20166
20180 20167
20168 class _AudioElementFactoryProvider {
20169 static AudioElement createAudioElement([String src = null]) {
20170 if (src == null) return JS('AudioElement', 'new Audio()');
20171 return JS('AudioElement', 'new Audio(#)', src);
20172 }
20173 }
20174 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
20175 // for details. All rights reserved. Use of this source code is governed by a
20176 // BSD-style license that can be found in the LICENSE file.
20177
20178
20181 class _BlobFactoryProvider { 20179 class _BlobFactoryProvider {
20182 static Blob createBlob([List blobParts = null, String type, String endings]) { 20180 static Blob createBlob([List blobParts = null, String type, String endings]) {
20183 // TODO: validate that blobParts is a JS Array and convert if not. 20181 // TODO: validate that blobParts is a JS Array and convert if not.
20184 // TODO: any coercions on the elements of blobParts, e.g. coerce a typed 20182 // TODO: any coercions on the elements of blobParts, e.g. coerce a typed
20185 // array to ArrayBuffer if it is a total view. 20183 // array to ArrayBuffer if it is a total view.
20186 if (type == null && endings == null) { 20184 if (type == null && endings == null) {
20187 return _create_1(blobParts); 20185 return _create_1(blobParts);
20188 } 20186 }
20189 var bag = _create_bag(); 20187 var bag = _create_bag();
20190 if (type != null) _bag_set(bag, 'type', type); 20188 if (type != null) _bag_set(bag, 'type', type);
(...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after
25088 if (length < 0) throw new ArgumentError('length'); 25086 if (length < 0) throw new ArgumentError('length');
25089 if (start < 0) throw new RangeError.value(start); 25087 if (start < 0) throw new RangeError.value(start);
25090 int end = start + length; 25088 int end = start + length;
25091 if (end > a.length) throw new RangeError.value(end); 25089 if (end > a.length) throw new RangeError.value(end);
25092 for (int i = start; i < end; i++) { 25090 for (int i = start; i < end; i++) {
25093 accumulator.add(a[i]); 25091 accumulator.add(a[i]);
25094 } 25092 }
25095 return accumulator; 25093 return accumulator;
25096 } 25094 }
25097 } 25095 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/htmlrenamer.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698