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

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

Issue 10692006: Build fix for r9154. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | lib/html/dartium/html_dartium.dart » ('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 systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 ' $EVENTS_CLASS(_ptr) : super(_ptr);\n' 386 ' $EVENTS_CLASS(_ptr) : super(_ptr);\n'
387 '$!MEMBERS\n' 387 '$!MEMBERS\n'
388 '}\n', 388 '}\n',
389 EVENTS_CLASS=events_class, 389 EVENTS_CLASS=events_class,
390 PARENT_EVENTS_CLASS=parent_events_class, 390 PARENT_EVENTS_CLASS=parent_events_class,
391 EVENTS_INTERFACE='%sEvents' % html_inteface) 391 EVENTS_INTERFACE='%sEvents' % html_inteface)
392 392
393 events_attributes = DomToHtmlEvents(self._interface.id, events_attributes) 393 events_attributes = DomToHtmlEvents(self._interface.id, events_attributes)
394 for event_name in events_attributes: 394 for event_name in events_attributes:
395 events_members.Emit( 395 events_members.Emit(
396 ' EventListenerList get $HTML_NAME() => _get(\'$DOM_NAME\');\n', 396 ' EventListenerList get $HTML_NAME() => this[\'$DOM_NAME\'];\n',
397 HTML_NAME=DomToHtmlEvent(event_name), 397 HTML_NAME=DomToHtmlEvent(event_name),
398 DOM_NAME=event_name) 398 DOM_NAME=event_name)
399 399
400 def _EmitEventGetter(self, events_class): 400 def _EmitEventGetter(self, events_class):
401 self._members_emitter.Emit( 401 self._members_emitter.Emit(
402 '\n' 402 '\n'
403 ' $EVENTS_CLASS get on() {\n' 403 ' $EVENTS_CLASS get on() {\n'
404 ' if (_on === null) _on = new $EVENTS_CLASS(this);\n' 404 ' if (_on === null) _on = new $EVENTS_CLASS(this);\n'
405 ' return _on;\n' 405 ' return _on;\n'
406 ' }\n', 406 ' }\n',
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1089
1090 def _IsArgumentOptionalInWebCore(argument): 1090 def _IsArgumentOptionalInWebCore(argument):
1091 return IsOptional(argument) and not 'Callback' in argument.ext_attrs 1091 return IsOptional(argument) and not 'Callback' in argument.ext_attrs
1092 1092
1093 def _ToWebKitName(name): 1093 def _ToWebKitName(name):
1094 name = name[0].lower() + name[1:] 1094 name = name[0].lower() + name[1:]
1095 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), 1095 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(),
1096 name) 1096 name)
1097 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() , 1097 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() ,
1098 name) 1098 name)
OLDNEW
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698