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

Side by Side Diff: lib/compiler/implementation/lib/native_helper.dart

Issue 10969073: Fixing up WheelEvent to follow W3C standards and work on all platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback Created 8 years, 2 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:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698