Index: sdk/lib/html/html_common/conversions_dartium.dart |
diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart |
index d6e606464dfd496221be385328adc28b35ebaad1..28225f089f67d3c50b89df6cf00a9db5a88c8778 100644 |
--- a/sdk/lib/html/html_common/conversions_dartium.dart |
+++ b/sdk/lib/html/html_common/conversions_dartium.dart |
@@ -66,3 +66,12 @@ Future convertNativePromiseToDartFuture(js.JsObject promise) { |
convertDartToNative_DateTime(DateTime date) { |
return new js.JsObject(js.context["Date"], [date.millisecondsSinceEpoch]); |
} |
+ |
+/// Creates a Dart Rectangle from a Javascript object with properties |
+/// left, top, width and height. Used internally in Dartium. |
+Rectangle make_dart_rectangle(r) => |
+ r == null ? null : new Rectangle( |
+ js.JsNative.getProperty(r, 'left'), |
+ js.JsNative.getProperty(r, 'top'), |
+ js.JsNative.getProperty(r, 'width'), |
+ js.JsNative.getProperty(r, 'height')); |