From 7aa71c22cf4d781eaaaaf2f0175f8a42cdcab07f Mon Sep 17 00:00:00 2001 From: "blois@google.com" Date: Thu, 17 Oct 2013 01:23:11 +0000 Subject: [PATCH] Removing dart2js's extends tag inference Since this is now required in the spec and Dartium, no longer need this lookup code for dart2js. BUG=13839 R=efortuna@google.com Review URL: https://codereview.chromium.org//27063005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28771 260f80e4-7a28-3924-810f-c04153c831b5 --- sdk/lib/html/dart2js/html_dart2js.dart | 26 ------------------- sdk/lib/html/dartium/html_dartium.dart | 6 ++--- .../dom/src/dart2js_CustomElementSupport.dart | 26 ------------------- 3 files changed, 3 insertions(+), 55 deletions(-) diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart index fca06efd7d6..45b355cda11 100644 --- a/sdk/lib/html/dart2js/html_dart2js.dart +++ b/sdk/lib/html/dart2js/html_dart2js.dart @@ -32772,30 +32772,6 @@ _makeCallbackMethod3(callback) { convertDartClosureToJS(callback, 4)); } -const _typeNameToTag = const { - 'HTMLAnchorElement': 'a', - 'HTMLAudioElement': 'audio', - 'HTMLButtonElement': 'button', - 'HTMLCanvasElement': 'canvas', - 'HTMLDivElement': 'div', - 'HTMLImageElement': 'img', - 'HTMLInputElement': 'input', - 'HTMLLIElement': 'li', - 'HTMLLabelElement': 'label', - 'HTMLMenuElement': 'menu', - 'HTMLMeterElement': 'meter', - 'HTMLOListElement': 'ol', - 'HTMLOptionElement': 'option', - 'HTMLOutputElement': 'output', - 'HTMLParagraphElement': 'p', - 'HTMLPreElement': 'pre', - 'HTMLProgressElement': 'progress', - 'HTMLSelectElement': 'select', - 'HTMLSpanElement': 'span', - 'HTMLUListElement': 'ul', - 'HTMLVideoElement': 'video', -}; - void _registerCustomElement(context, document, String tag, Type type, String extendsTagName) { // Function follows the same pattern as the following JavaScript code for @@ -32864,8 +32840,6 @@ void _registerCustomElement(context, document, String tag, Type type, if (baseClassName != 'HTMLElement') { if (extendsTagName != null) { JS('=Object', '#.extends = #', options, extendsTagName); - } else if (_typeNameToTag.containsKey(baseClassName)) { - JS('=Object', '#.extends = #', options, _typeNameToTag[baseClassName]); } } diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart index d541734fd6d..120c644332d 100644 --- a/sdk/lib/html/dartium/html_dartium.dart +++ b/sdk/lib/html/dartium/html_dartium.dart @@ -26893,13 +26893,13 @@ class Url extends NativeFieldWrapperClass1 { if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) { return _createObjectURL_1(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { return _createObjectURL_2(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { return _createObjectURL_3(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { return _createObjectURL_4(blob_OR_source_OR_stream); } throw new ArgumentError("Incorrect number or type of arguments"); diff --git a/tools/dom/src/dart2js_CustomElementSupport.dart b/tools/dom/src/dart2js_CustomElementSupport.dart index 8edecc44a8e..6f8aedb2e33 100644 --- a/tools/dom/src/dart2js_CustomElementSupport.dart +++ b/tools/dom/src/dart2js_CustomElementSupport.dart @@ -41,30 +41,6 @@ _makeCallbackMethod3(callback) { convertDartClosureToJS(callback, 4)); } -const _typeNameToTag = const { - 'HTMLAnchorElement': 'a', - 'HTMLAudioElement': 'audio', - 'HTMLButtonElement': 'button', - 'HTMLCanvasElement': 'canvas', - 'HTMLDivElement': 'div', - 'HTMLImageElement': 'img', - 'HTMLInputElement': 'input', - 'HTMLLIElement': 'li', - 'HTMLLabelElement': 'label', - 'HTMLMenuElement': 'menu', - 'HTMLMeterElement': 'meter', - 'HTMLOListElement': 'ol', - 'HTMLOptionElement': 'option', - 'HTMLOutputElement': 'output', - 'HTMLParagraphElement': 'p', - 'HTMLPreElement': 'pre', - 'HTMLProgressElement': 'progress', - 'HTMLSelectElement': 'select', - 'HTMLSpanElement': 'span', - 'HTMLUListElement': 'ul', - 'HTMLVideoElement': 'video', -}; - void _registerCustomElement(context, document, String tag, Type type, String extendsTagName) { // Function follows the same pattern as the following JavaScript code for @@ -133,8 +109,6 @@ void _registerCustomElement(context, document, String tag, Type type, if (baseClassName != 'HTMLElement') { if (extendsTagName != null) { JS('=Object', '#.extends = #', options, extendsTagName); - } else if (_typeNameToTag.containsKey(baseClassName)) { - JS('=Object', '#.extends = #', options, _typeNameToTag[baseClassName]); } }