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

Unified Diff: tools/dom/src/dart2js_Conversions.dart

Issue 16336022: Fixing a number of Dart2JS compiler warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dart2js_Conversions.dart
diff --git a/tools/dom/src/dart2js_Conversions.dart b/tools/dom/src/dart2js_Conversions.dart
index 86f32fb33c047eb32862af458630ca900a66d4b0..0ca42168b7a9554da64b71812185d52d73d8a705 100644
--- a/tools/dom/src/dart2js_Conversions.dart
+++ b/tools/dom/src/dart2js_Conversions.dart
@@ -51,46 +51,3 @@ EventTarget _convertDartToNative_EventTarget(e) {
return e;
}
}
-
-// Conversions for ImageData
-//
-// On Firefox, the returned ImageData is a plain object.
-
-class _TypedImageData implements ImageData {
- final Uint8ClampedList data;
- final int height;
- final int width;
-
- _TypedImageData(this.data, this.height, this.width);
-}
-
-ImageData _convertNativeToDart_ImageData(nativeImageData) {
-
- // None of the native getters that return ImageData have the type ImageData
- // since that is incorrect for FireFox (which returns a plain Object). So we
- // need something that tells the compiler that the ImageData class has been
- // instantiated.
- // TODO(sra): Remove this when all the ImageData returning APIs have been
- // annotated as returning the union ImageData + Object.
- JS('ImageData', '0');
-
- if (nativeImageData is ImageData) return nativeImageData;
-
- // On Firefox the above test fails because imagedata is a plain object.
- // So we create a _TypedImageData.
-
- return new _TypedImageData(
- JS('var', '#.data', nativeImageData),
- JS('var', '#.height', nativeImageData),
- JS('var', '#.width', nativeImageData));
-}
-
-// We can get rid of this conversion if _TypedImageData implements the fields
-// with native names.
-_convertDartToNative_ImageData(ImageData imageData) {
- if (imageData is _TypedImageData) {
- return JS('', '{data: #, height: #, width: #}',
- imageData.data, imageData.height, imageData.width);
- }
- return imageData;
-}
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698