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
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user