Revert "Emit static IDL members."
TBR=blois@google.com,podivilov@chromium.org,sra@google.com Review URL: https://codereview.chromium.org//10973017 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12797 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -131,7 +131,10 @@ class BaseGenerator(object):
|
||||
for id in sorted(operationsById.keys()):
|
||||
operations = operationsById[id]
|
||||
info = AnalyzeOperation(interface, operations)
|
||||
self.AddOperation(info)
|
||||
if info.IsStatic():
|
||||
self.AddStaticOperation(info)
|
||||
else:
|
||||
self.AddOperation(info)
|
||||
|
||||
def AddSecondaryMembers(self, interface):
|
||||
# With multiple inheritance, attributes and operations of non-first
|
||||
@@ -175,6 +178,9 @@ class BaseGenerator(object):
|
||||
def AddOperation(self, info):
|
||||
pass
|
||||
|
||||
def AddStaticOperation(self, info):
|
||||
pass
|
||||
|
||||
def AddSecondaryAttribute(self, interface, attribute):
|
||||
pass
|
||||
|
||||
|
||||
@@ -662,20 +662,16 @@ class HtmlDartInterfaceGenerator(BaseGenerator):
|
||||
DOMINTERFACE=info.overloads[0].doc_js_interface_name,
|
||||
DOMNAME=info.name)
|
||||
|
||||
if info.IsStatic():
|
||||
# FIXME: provide a type.
|
||||
self._members_emitter.Emit('\n'
|
||||
' static final $NAME = $IMPL_CLASS_NAME.$NAME;\n',
|
||||
IMPL_CLASS_NAME=self._backend.ImplementationClassName(),
|
||||
NAME=html_name)
|
||||
else:
|
||||
self._members_emitter.Emit('\n'
|
||||
' $TYPE $NAME($PARAMS);\n',
|
||||
TYPE=self._DartType(info.type_name),
|
||||
NAME=html_name,
|
||||
PARAMS=info.ParametersInterfaceDeclaration(self._DartType))
|
||||
self._members_emitter.Emit('\n'
|
||||
' $TYPE $NAME($PARAMS);\n',
|
||||
TYPE=self._DartType(info.type_name),
|
||||
NAME=html_name,
|
||||
PARAMS=info.ParametersInterfaceDeclaration(self._DartType))
|
||||
self._backend.AddOperation(info, html_name)
|
||||
|
||||
def AddStaticOperation(self, info):
|
||||
self.AddOperation(info, True)
|
||||
|
||||
def AddSecondaryOperation(self, interface, info):
|
||||
self._backend.SecondaryContext(interface)
|
||||
self.AddOperation(info, True)
|
||||
@@ -1013,6 +1009,10 @@ class HtmlDart2JSClassGenerator(Dart2JSInterfaceGenerator):
|
||||
if self._HasCustomImplementation(info.name):
|
||||
return
|
||||
|
||||
# FIXME: support static operations.
|
||||
if info.IsStatic():
|
||||
return
|
||||
|
||||
# Any conversions needed?
|
||||
if any(self._OperationRequiresConversions(op) for op in info.overloads):
|
||||
self._AddOperationWithConversions(info, html_name)
|
||||
|
||||
Reference in New Issue
Block a user