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

Side by Side Diff: lib/dom/scripts/systemhtml.py

Issue 10445011: Events operator [] shouldn't convert event name to lower case. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
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 from systemfrog import * 9 from systemfrog import *
10 from systeminterface import * 10 from systeminterface import *
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 ' $CLASSNAME(_ptr) : super(_ptr);\n' 1213 ' $CLASSNAME(_ptr) : super(_ptr);\n'
1214 '$!MEMBERS}\n', 1214 '$!MEMBERS}\n',
1215 CLASSNAME=events_class, 1215 CLASSNAME=events_class,
1216 INTERFACE=events_interface, 1216 INTERFACE=events_interface,
1217 SUPER='_' + parent_event_class + 'Impl') 1217 SUPER='_' + parent_event_class + 'Impl')
1218 1218
1219 for event_name in event_attrs: 1219 for event_name in event_attrs:
1220 if event_name in _html_event_names: 1220 if event_name in _html_event_names:
1221 events_members.Emit( 1221 events_members.Emit(
1222 "\n" 1222 "\n"
1223 " EventListenerList get $NAME() => _get('$RAWNAME');\n", 1223 " EventListenerList get $NAME() => this['$RAWNAME'];\n",
1224 RAWNAME=event_name, 1224 RAWNAME=event_name,
1225 NAME=_html_event_names[event_name]) 1225 NAME=_html_event_names[event_name])
1226 else: 1226 else:
1227 raise Exception('No known html even name for event: ' + event_name) 1227 raise Exception('No known html even name for event: ' + event_name)
1228 1228
1229 def _EmitEventGetter(self, events_class): 1229 def _EmitEventGetter(self, events_class):
1230 self._members_emitter.Emit( 1230 self._members_emitter.Emit(
1231 '\n $TYPE get on() =>\n new $TYPE(this);\n', 1231 '\n $TYPE get on() =>\n new $TYPE(this);\n',
1232 TYPE=events_class) 1232 TYPE=events_class)
1233 1233
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 Collect(database.GetInterface(parent.type.id), 1693 Collect(database.GetInterface(parent.type.id),
1694 seen, collected) 1694 seen, collected)
1695 1695
1696 inheritance_closure = {} 1696 inheritance_closure = {}
1697 for interface in database.GetInterfaces(): 1697 for interface in database.GetInterfaces():
1698 seen = set() 1698 seen = set()
1699 collected = [] 1699 collected = []
1700 Collect(interface, seen, collected) 1700 Collect(interface, seen, collected)
1701 inheritance_closure[interface.id] = collected 1701 inheritance_closure[interface.id] = collected
1702 return inheritance_closure 1702 return inheritance_closure
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698