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

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

Issue 11962049: Revert "Fixing formatting of dart:html's dart2js annotations." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 729e84a7668405fee1344499b4de03c4dd9ca19c..2b34db46894a9fcc0618110831053f7d93ae7952 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -754,15 +754,18 @@ class DartiumBackend(HtmlDartGenerator):
def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
native_suffix, is_custom):
- annotations = FormatAnnotations(
- FindCommonAnnotations(self._interface.id, idl_name), ' ')
+ annotations = FindCommonAnnotations(self._interface.id, idl_name)
+ if annotations:
+ annotation_str = '\n ' + '\n '.join(annotations)
+ else:
+ annotation_str = ''
native_binding = '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
self._members_emitter.Emit(
- '\n'
- ' $ANNOTATIONS$DART_DECLARATION native "$NATIVE_BINDING";\n',
+ '$ANNOTATIONS'
+ '\n $DART_DECLARATION native "$NATIVE_BINDING";\n',
DOMINTERFACE=self._interface.id,
- ANNOTATIONS=annotations,
+ ANNOTATIONS=annotation_str,
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