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

Unified Diff: sdk/lib/html/scripts/systemhtml.py

Issue 11419300: Dartifying dart:html type names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
Index: sdk/lib/html/scripts/systemhtml.py
diff --git a/sdk/lib/html/scripts/systemhtml.py b/sdk/lib/html/scripts/systemhtml.py
index 00ade082c11833481c476990fd6fc3e5d7692390..2fd61b1155878b9ed361621d4a3b0d9b858398d8 100644
--- a/sdk/lib/html/scripts/systemhtml.py
+++ b/sdk/lib/html/scripts/systemhtml.py
@@ -41,6 +41,7 @@ _js_custom_members = set([
'Window.requestAnimationFrame',
'Window.webkitCancelAnimationFrame',
'Window.webkitRequestAnimationFrame',
+ 'WorkerContext.indexedDB',
])
@@ -202,6 +203,7 @@ _svg_element_constructors = {
_element_constructors = {
'html': _html_element_constructors,
+ 'indexed_db': {},
'svg': _svg_element_constructors,
'web_audio': {},
}
@@ -211,6 +213,10 @@ _factory_ctr_strings = {
'provider_name': 'document',
'constructor_name': '$dom_createElement'
},
+ 'indexed_db': {
+ 'provider_name': 'document',
+ 'constructor_name': '$dom_createElement'
+ },
'svg': {
'provider_name': '_SvgElementFactoryProvider',
'constructor_name': 'createSvgElement_tag',
@@ -269,6 +275,8 @@ class HtmlDartInterfaceGenerator(object):
code = self._library_emitter.FileEmitter(self._interface.id,
self._library_name)
code.Emit(self._template_loader.Load('callback.darttemplate'))
+
+ typedef_name = self._renamer.RenameInterface(self._interface)
code.Emit('typedef void $NAME($PARAMS);\n',
NAME=self._interface.id,
PARAMS=info.ParametersDeclaration(self._DartType))
@@ -450,7 +458,7 @@ class Dart2JSBackend(HtmlDartGenerator):
FACTORYPROVIDER=factory_provider,
CONSTRUCTOR=interface_name,
PARAMETERS=constructor_info.ParametersDeclaration(self._DartType),
- NAMED_CONSTRUCTOR=constructor_info.name or interface_name,
+ NAMED_CONSTRUCTOR=constructor_info.name or self._interface.doc_js_name,
ARGUMENTS=arguments,
PRE_ARGUMENTS_COMMA=comma,
ARGUMENTS_PATTERN=','.join(['#'] * len(constructor_info.param_infos)))

Powered by Google App Engine
This is Rietveld 408576698