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

Unified Diff: sdk/lib/html/html_common/conversions_dartium.dart

Issue 1402233002: Move make_dart_rectangle to html_common (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove the dart2js version. It's never called Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dartium/html_dartium.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'));
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dartium/html_dartium.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698