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

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 16494002: Expand overloaded methods and optional parameters in the html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/indexed_db/dart2js/indexed_db_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 c31f5887f883949f57b992f7d37e546214870ba2..9acf6efc39c49af9d570f10fae81981c0e84203a 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -1455,19 +1455,13 @@ class CanvasRenderingContext2D extends CanvasRenderingContext {
@DocsEditable
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native "CanvasRenderingContext2D_createLinearGradient_Callback";
- CanvasPattern createPattern(canvas_OR_image, String repetitionType) {
- if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is CanvasElement || canvas_OR_image == null)) {
- return _createPattern_1(canvas_OR_image, repetitionType);
- }
- if ((repetitionType is String || repetitionType == null) && (canvas_OR_image is ImageElement || canvas_OR_image == null)) {
- return _createPattern_2(canvas_OR_image, repetitionType);
- }
- throw new ArgumentError("Incorrect number or type of arguments");
- }
-
- CanvasPattern _createPattern_1(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D__createPattern_1_Callback";
+ @DomName('CanvasRenderingContext2D.createPattern')
+ @DocsEditable
+ CanvasPattern createPattern(CanvasElement canvas, String repetitionType) native "CanvasRenderingContext2D_createPattern_Callback";
- CanvasPattern _createPattern_2(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D__createPattern_2_Callback";
+ @DomName('CanvasRenderingContext2D.createPatternFromImage')
+ @DocsEditable
+ CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) native "CanvasRenderingContext2D_createPatternFromImage_Callback";
@DomName('CanvasRenderingContext2D.createRadialGradient')
@DocsEditable
@@ -2301,19 +2295,13 @@ class Crypto extends NativeFieldWrapperClass1 {
class Css extends NativeFieldWrapperClass1 {
Css.internal();
- bool supports(String conditionText_OR_property, [String value]) {
- if ((value is String || value == null) && (conditionText_OR_property is String || conditionText_OR_property == null)) {
- return _supports_1(conditionText_OR_property, value);
- }
- if ((conditionText_OR_property is String || conditionText_OR_property == null) && value == null) {
- return _supports_2(conditionText_OR_property);
- }
- throw new ArgumentError("Incorrect number or type of arguments");
- }
-
- bool _supports_1(conditionText_OR_property, value) native "CSS__supports_1_Callback";
+ @DomName('CSS.supports')
+ @DocsEditable
+ bool supports(String property, String value) native "CSS_supports_Callback";
- bool _supports_2(conditionText_OR_property) native "CSS__supports_2_Callback";
+ @DomName('CSS.supportsCondition')
+ @DocsEditable
+ bool supportsCondition(String conditionText) native "CSS_supportsCondition_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6740,6 +6728,14 @@ class DataTransferItemList extends NativeFieldWrapperClass1 {
void _add_2(data_OR_file, type) native "DataTransferItemList__add_2_Callback";
+ @DomName('DataTransferItemList.addData')
+ @DocsEditable
+ void addData(String data, String type) native "DataTransferItemList_addData_Callback";
+
+ @DomName('DataTransferItemList.addFile')
+ @DocsEditable
+ void addFile(File file) native "DataTransferItemList_addFile_Callback";
+
@DomName('DataTransferItemList.clear')
@DocsEditable
void clear() native "DataTransferItemList_clear_Callback";
@@ -11281,7 +11277,11 @@ class FormData extends NativeFieldWrapperClass1 {
@DomName('FormData.append')
@DocsEditable
- void append(String name, value, [String filename]) native "FormData_append_Callback";
+ void append(String name, String value) native "FormData_append_Callback";
+
+ @DomName('FormData.appendBlob')
+ @DocsEditable
+ void appendBlob(String name, Blob value, [String filename]) native "FormData_appendBlob_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17104,7 +17104,7 @@ class Navigator extends NativeFieldWrapperClass1 {
* window.navigator.getUserMedia(audio: true, video: true).then((stream) {
* var video = new VideoElement()
* ..autoplay = true
- * ..src = Url.createObjectUrl(stream);
+ * ..src = Url.createObjectUrlFromStream(stream);
* document.body.append(video);
* });
*
@@ -19774,6 +19774,22 @@ class RtcDataChannel extends EventTarget {
void _send_4(data) native "RTCDataChannel__send_4_Callback";
+ @DomName('RTCDataChannel.sendBlob')
+ @DocsEditable
+ void sendBlob(Blob data) native "RTCDataChannel_sendBlob_Callback";
+
+ @DomName('RTCDataChannel.sendByteBuffer')
+ @DocsEditable
+ void sendByteBuffer(ByteBuffer data) native "RTCDataChannel_sendByteBuffer_Callback";
+
+ @DomName('RTCDataChannel.sendString')
+ @DocsEditable
+ void sendString(String data) native "RTCDataChannel_sendString_Callback";
+
+ @DomName('RTCDataChannel.sendTypedData')
+ @DocsEditable
+ void sendTypedData(TypedData data) native "RTCDataChannel_sendTypedData_Callback";
+
@DomName('RTCDataChannel.onclose')
@DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
@@ -23090,7 +23106,7 @@ class TextAreaElement extends _HTMLElement {
@DocsEditable
void setCustomValidity(String error) native "HTMLTextAreaElement_setCustomValidity_Callback";
- void setRangeText(String replacement, [int start, int end, String selectionMode]) {
+ void setRangeText(String replacement, {int start, int end, String selectionMode}) {
if ((replacement is String || replacement == null) && start == null && end == null && selectionMode == null) {
_setRangeText_1(replacement);
return;
@@ -24202,6 +24218,18 @@ class Url extends NativeFieldWrapperClass1 {
static String _createObjectURL_3(blob_OR_source_OR_stream) native "URL__createObjectURL_3_Callback";
+ @DomName('URL.createObjectUrlFromBlob')
+ @DocsEditable
+ static String createObjectUrlFromBlob(Blob blob) native "URL_createObjectUrlFromBlob_Callback";
+
+ @DomName('URL.createObjectUrlFromSource')
+ @DocsEditable
+ static String createObjectUrlFromSource(MediaSource source) native "URL_createObjectUrlFromSource_Callback";
+
+ @DomName('URL.createObjectUrlFromStream')
+ @DocsEditable
+ static String createObjectUrlFromStream(MediaStream stream) native "URL_createObjectUrlFromStream_Callback";
+
@DomName('URL.revokeObjectURL')
@DocsEditable
static void revokeObjectUrl(String url) native "URL_revokeObjectURL_Callback";
@@ -24561,6 +24589,22 @@ class WebSocket extends EventTarget {
@DocsEditable
void send(data) native "WebSocket_send_Callback";
+ @DomName('WebSocket.sendBlob')
+ @DocsEditable
+ void sendBlob(Blob data) native "WebSocket_sendBlob_Callback";
+
+ @DomName('WebSocket.sendByteBuffer')
+ @DocsEditable
+ void sendByteBuffer(ByteBuffer data) native "WebSocket_sendByteBuffer_Callback";
+
+ @DomName('WebSocket.sendString')
+ @DocsEditable
+ void sendString(String data) native "WebSocket_sendString_Callback";
+
+ @DomName('WebSocket.sendTypeData')
+ @DocsEditable
+ void sendTypeData(TypedData data) native "WebSocket_sendTypeData_Callback";
+
@DomName('WebSocket.onclose')
@DocsEditable
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698