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

Side by Side Diff: tools/dom/scripts/htmldartgenerator.py

Issue 1876363006: Fix a few strong mode errors in dart:html (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reverted the move of fullscreenEnabled, causes duplicate definitions in dart2js Created 4 years, 8 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/htmleventgenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 dart:html APIs from the IDL database.""" 7 dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 CTOR=constructor_info._ConstructorFullName(self._DartType), 580 CTOR=constructor_info._ConstructorFullName(self._DartType),
581 PARAMS=constructor_info.ParametersAsDeclaration(InputType), 581 PARAMS=constructor_info.ParametersAsDeclaration(InputType),
582 FACTORY=factory_name, 582 FACTORY=factory_name,
583 METADATA=metadata, 583 METADATA=metadata,
584 CTOR_FACTORY_NAME=factory_constructor_name, 584 CTOR_FACTORY_NAME=factory_constructor_name,
585 FACTORY_PARAMS=factory_parameters) 585 FACTORY_PARAMS=factory_parameters)
586 else: 586 else:
587 inits = self._members_emitter.Emit( 587 inits = self._members_emitter.Emit(
588 '\n $(METADATA)' 588 '\n $(METADATA)'
589 'factory $CONSTRUCTOR($PARAMS) {\n' 589 'factory $CONSTRUCTOR($PARAMS) {\n'
590 ' var e = $FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\n' 590 ' $CONSTRUCTOR e = $FACTORY.$CTOR_FACTORY_NAME($FACTORY_PARAMS);\ n'
591 '$!INITS' 591 '$!INITS'
592 ' return e;\n' 592 ' return e;\n'
593 ' }\n', 593 ' }\n',
594 CONSTRUCTOR=constructor_info._ConstructorFullName(self._DartType), 594 CONSTRUCTOR=constructor_info._ConstructorFullName(self._DartType),
595 METADATA=metadata, 595 METADATA=metadata,
596 FACTORY=factory_name, 596 FACTORY=factory_name,
597 CTOR_FACTORY_NAME=factory_constructor_name, 597 CTOR_FACTORY_NAME=factory_constructor_name,
598 PARAMS=constructor_info.ParametersAsDeclaration(InputType), 598 PARAMS=constructor_info.ParametersAsDeclaration(InputType),
599 FACTORY_PARAMS=factory_parameters) 599 FACTORY_PARAMS=factory_parameters)
600 600
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 def _InputType(self, type_name, info): 888 def _InputType(self, type_name, info):
889 conversion = self._InputConversion(type_name, info.declared_name) 889 conversion = self._InputConversion(type_name, info.declared_name)
890 if conversion: 890 if conversion:
891 return conversion.input_type 891 return conversion.input_type
892 else: 892 else:
893 # If typedef it's a union return dynamic. 893 # If typedef it's a union return dynamic.
894 if self._database.HasTypeDef(type_name): 894 if self._database.HasTypeDef(type_name):
895 return 'dynamic' 895 return 'dynamic'
896 else: 896 else:
897 return self._NarrowInputType(type_name) if type_name else 'dynamic' 897 return self._NarrowInputType(type_name) if type_name else 'dynamic'
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/htmleventgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698