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

Side by Side Diff: tools/dom/src/native_DOMImplementation.dart

Issue 12383053: Implement necessary support. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | no next file » | 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 part of html; 5 part of html;
6 6
7 class _Utils { 7 class _Utils {
8 static double dateTimeToDouble(DateTime dateTime) =>
9 dateTime.millisecondsSinceEpoch.toDouble();
10 static DateTime doubleToDateTime(double dateTime) =>
11 new DateTime.fromMillisecondsSinceEpoch(dateTime.toInt());
12
8 static List convertToList(List list) { 13 static List convertToList(List list) {
9 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it. 14 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
10 final length = list.length; 15 final length = list.length;
11 List result = new List(length); 16 List result = new List(length);
12 result.setRange(0, length, list); 17 result.setRange(0, length, list);
13 return result; 18 return result;
14 } 19 }
15 20
16 static List convertMapToList(Map map) { 21 static List convertMapToList(Map map) {
17 List result = []; 22 List result = [];
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool get isEmpty => Maps.isEmpty(this); 112 bool get isEmpty => Maps.isEmpty(this);
108 } 113 }
109 114
110 get _printClosure => (s) { 115 get _printClosure => (s) {
111 try { 116 try {
112 window.console.log(s); 117 window.console.log(s);
113 } catch (_) { 118 } catch (_) {
114 _Utils.print(s); 119 _Utils.print(s);
115 } 120 }
116 }; 121 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698