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

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

Issue 442523003: Add property to CssStyleDeclaration to detect if a CSS value is available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 cpp_type_name = interface_name 372 cpp_type_name = interface_name
373 return cpp_type_name 373 return cpp_type_name
374 374
375 def DeriveQualifiedName(library_name, name): 375 def DeriveQualifiedName(library_name, name):
376 return library_name + "." + name 376 return library_name + "." + name
377 377
378 def DeriveBlinkClassName(name): 378 def DeriveBlinkClassName(name):
379 return "Blink" + name 379 return "Blink" + name
380 380
381 def DeriveResolverString(interface_id, operation_id, native_suffix, type_ids, da tabase, is_custom): 381 def DeriveResolverString(interface_id, operation_id, native_suffix, type_ids, da tabase, is_custom):
382 if interface_id == 'CSSStyleDeclaration' and operation_id == '__getter__':
383 # Dirty hack to be more nicely implemented with new generator scripts.
384 return "CSSStyleDeclaration___getter___Callback_RESOLVER_STRING_1_DOMStrin g"
Leaf 2014/08/06 17:53:49 Is it possible to use the pre-existing dirty-hack
382 type_string = \ 385 type_string = \
383 "_".join(map(lambda type_id : TypeIdToBlinkName(type_id, database), type _ids)) 386 "_".join(map(lambda type_id : TypeIdToBlinkName(type_id, database), type _ids))
384 if native_suffix: 387 if native_suffix:
385 operation_id = "%s_%s" % (operation_id, native_suffix) 388 operation_id = "%s_%s" % (operation_id, native_suffix)
386 if is_custom: 389 if is_custom:
387 components = \ 390 components = \
388 [TypeIdToBlinkName(interface_id, database), operation_id] 391 [TypeIdToBlinkName(interface_id, database), operation_id]
389 else: 392 else:
390 components = \ 393 components = \
391 [TypeIdToBlinkName(interface_id, database), operation_id, 394 [TypeIdToBlinkName(interface_id, database), operation_id,
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 e.Emit("};\n"); 2033 e.Emit("};\n");
2031 e.Emit('\n'); 2034 e.Emit('\n');
2032 e.Emit('} // namespace WebCore\n'); 2035 e.Emit('} // namespace WebCore\n');
2033 2036
2034 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): 2037 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
2035 return ( 2038 return (
2036 interface.id.endswith('Event') and 2039 interface.id.endswith('Event') and
2037 operation.id.startswith('init') and 2040 operation.id.startswith('init') and
2038 argument.ext_attrs.get('Default') == 'Undefined' and 2041 argument.ext_attrs.get('Default') == 'Undefined' and
2039 argument.type.id == 'DOMString') 2042 argument.type.id == 'DOMString')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698