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

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

Issue 18182010: Make html metadata follow the spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed DocsEditable, Experimental, Unstable Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/systemnative.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 else: 45 else:
46 signature = check[0] 46 signature = check[0]
47 check = check[1] 47 check = check[1]
48 self._members_emitter.Emit('\n' 48 self._members_emitter.Emit('\n'
49 ' /// Checks if this type is supported on the current platform.\n' 49 ' /// Checks if this type is supported on the current platform.\n'
50 ' static bool $SIGNATURE => $SUPPORT_CHECK;\n', 50 ' static bool $SIGNATURE => $SUPPORT_CHECK;\n',
51 SIGNATURE=signature, SUPPORT_CHECK=check) 51 SIGNATURE=signature, SUPPORT_CHECK=check)
52 52
53 def EmitEventGetter(self, events_class_name): 53 def EmitEventGetter(self, events_class_name):
54 self._members_emitter.Emit( 54 self._members_emitter.Emit(
55 "\n @DocsEditable" 55 "\n @DocsEditable()"
56 "\n @DomName('EventTarget.addEventListener, " 56 "\n @DomName('EventTarget.addEventListener, "
57 "EventTarget.removeEventListener, EventTarget.dispatchEvent')" 57 "EventTarget.removeEventListener, EventTarget.dispatchEvent')"
58 "\n @deprecated" 58 "\n @deprecated"
59 "\n $TYPE get on =>\n new $TYPE(this);\n", 59 "\n $TYPE get on =>\n new $TYPE(this);\n",
60 TYPE=events_class_name) 60 TYPE=events_class_name)
61 61
62 def AddMembers(self, interface, declare_only=False): 62 def AddMembers(self, interface, declare_only=False):
63 for const in sorted(interface.constants, ConstantOutputOrder): 63 for const in sorted(interface.constants, ConstantOutputOrder):
64 self.AddConstant(const) 64 self.AddConstant(const)
65 65
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 if interface.parents: 593 if interface.parents:
594 parent = interface.parents[0] 594 parent = interface.parents[0]
595 if IsPureInterface(parent.type.id): 595 if IsPureInterface(parent.type.id):
596 walk(interface.parents) 596 walk(interface.parents)
597 else: 597 else:
598 walk(interface.parents[1:]) 598 walk(interface.parents[1:])
599 return result 599 return result
600 600
601 def _DartType(self, type_name): 601 def _DartType(self, type_name):
602 return self._type_registry.DartType(type_name) 602 return self._type_registry.DartType(type_name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698