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

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

Issue 11968047: Fixing formatting of dart:html's dart2js annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: CR feedback. Created 7 years, 11 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 | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/templates/dart2js_impl.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 2b34db46894a9fcc0618110831053f7d93ae7952..729e84a7668405fee1344499b4de03c4dd9ca19c 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -754,18 +754,15 @@ class DartiumBackend(HtmlDartGenerator):
def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
native_suffix, is_custom):
- annotations = FindCommonAnnotations(self._interface.id, idl_name)
- if annotations:
- annotation_str = '\n ' + '\n '.join(annotations)
- else:
- annotation_str = ''
+ annotations = FormatAnnotations(
+ FindCommonAnnotations(self._interface.id, idl_name), ' ')
native_binding = '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
self._members_emitter.Emit(
- '$ANNOTATIONS'
- '\n $DART_DECLARATION native "$NATIVE_BINDING";\n',
+ '\n'
+ ' $ANNOTATIONS$DART_DECLARATION native "$NATIVE_BINDING";\n',
DOMINTERFACE=self._interface.id,
- ANNOTATIONS=annotation_str,
+ ANNOTATIONS=annotations,
DART_DECLARATION=dart_declaration,
NATIVE_BINDING=native_binding)
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/templates/dart2js_impl.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698