| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 String typeNameInChrome(obj) { | 5 String typeNameInChrome(obj) { |
| 6 String name = JS('String', "#.constructor.name", obj); | 6 String name = JS('String', "#.constructor.name", obj); |
| 7 if (name == 'Window') return 'DOMWindow'; | 7 if (name == 'Window') return 'DOMWindow'; |
| 8 if (name == 'CanvasPixelArray') return 'Uint8ClampedArray'; | 8 if (name == 'CanvasPixelArray') return 'Uint8ClampedArray'; |
| 9 if (name == 'WebKitMutationObserver') return 'MutationObserver'; | 9 if (name == 'WebKitMutationObserver') return 'MutationObserver'; |
| 10 if (name == 'FormData') return 'DOMFormData'; | 10 if (name == 'FormData') return 'DOMFormData'; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 String typeNameInFirefox(obj) { | 31 String typeNameInFirefox(obj) { |
| 32 String name = JS('String', '#', constructorNameFallback(obj)); | 32 String name = JS('String', '#', constructorNameFallback(obj)); |
| 33 if (name == 'Window') return 'DOMWindow'; | 33 if (name == 'Window') return 'DOMWindow'; |
| 34 if (name == 'Document') return 'HTMLDocument'; | 34 if (name == 'Document') return 'HTMLDocument'; |
| 35 if (name == 'XMLDocument') return 'Document'; | 35 if (name == 'XMLDocument') return 'Document'; |
| 36 if (name == 'WorkerMessageEvent') return 'MessageEvent'; | 36 if (name == 'WorkerMessageEvent') return 'MessageEvent'; |
| 37 if (name == 'DragEvent') return 'MouseEvent'; | 37 if (name == 'DragEvent') return 'MouseEvent'; |
| 38 if (name == 'DataTransfer') return 'Clipboard'; | 38 if (name == 'DataTransfer') return 'Clipboard'; |
| 39 if (name == 'FormData') return 'DOMFormData'; | 39 if (name == 'FormData') return 'DOMFormData'; |
| 40 if (name == 'MouseScrollEvent') return 'WheelEvent'; |
| 40 return name; | 41 return name; |
| 41 } | 42 } |
| 42 | 43 |
| 43 String typeNameInIE(obj) { | 44 String typeNameInIE(obj) { |
| 44 String name = JS('String', '#', constructorNameFallback(obj)); | 45 String name = JS('String', '#', constructorNameFallback(obj)); |
| 45 if (name == 'Window') return 'DOMWindow'; | 46 if (name == 'Window') return 'DOMWindow'; |
| 46 if (name == 'Document') { | 47 if (name == 'Document') { |
| 47 // IE calls both HTML and XML documents 'Document', so we check for the | 48 // IE calls both HTML and XML documents 'Document', so we check for the |
| 48 // xmlVersion property, which is the empty string on HTML documents. | 49 // xmlVersion property, which is the empty string on HTML documents. |
| 49 if (JS('bool', '!!#.xmlVersion', obj)) return 'Document'; | 50 if (JS('bool', '!!#.xmlVersion', obj)) return 'Document'; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 333 } |
| 333 return result; | 334 return result; |
| 334 } | 335 } |
| 335 | 336 |
| 336 /** | 337 /** |
| 337 * Called by the compiler to setup [_dynamicMetadata]. | 338 * Called by the compiler to setup [_dynamicMetadata]. |
| 338 */ | 339 */ |
| 339 void dynamicSetMetadata(List<List<String>> inputTable) { | 340 void dynamicSetMetadata(List<List<String>> inputTable) { |
| 340 _dynamicMetadata = buildDynamicMetadata(inputTable); | 341 _dynamicMetadata = buildDynamicMetadata(inputTable); |
| 341 } | 342 } |
| OLD | NEW |