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

Unified Diff: tools/dom/scripts/generator.py

Issue 12330174: Revert "Revert "Converting dart:html to use DateTime rather than Date."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « tests/html/input_element_test.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 1a9ee7fff5c15cd580107557de828dec1c202b00..a2ee92e06c09f63a166ad02f2eb12cbb74ee0856 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -421,6 +421,10 @@ _serialize_SSV = Conversion('convertDartToNative_SerializedScriptValue',
'dynamic', 'dynamic')
dart2js_conversions = monitored.Dict('generator.dart2js_conversions', {
+ 'Date get':
+ Conversion('_convertNativeToDart_DateTime', 'dynamic', 'DateTime'),
+ 'Date set':
+ Conversion('_convertDartToNative_DateTime', 'DateTime', 'dynamic'),
# Wrap non-local Windows. We need to check EventTarget (the base type)
# as well. Note, there are no functions that take a non-local Window
# as a parameter / setter.
@@ -1332,7 +1336,7 @@ _idl_type_registry = monitored.Dict('generator._idl_type_registry', {
'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptValue'),
'Array': TypeData(clazz='Primitive', dart_type='List'),
'custom': TypeData(clazz='Primitive', dart_type='dynamic'),
- 'Date': TypeData(clazz='Primitive', dart_type='Date', native_type='double'),
+ 'Date': TypeData(clazz='Primitive', dart_type='DateTime', native_type='double'),
'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptValue'),
'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='String'),
# TODO(vsm): This won't actually work until we convert the Map to
« no previous file with comments | « tests/html/input_element_test.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698