OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 359 |
360 base_idl_type = attribute.idl_type.base_type | 360 base_idl_type = attribute.idl_type.base_type |
361 if base_idl_type in CONTENT_ATTRIBUTE_SETTER_NAMES: | 361 if base_idl_type in CONTENT_ATTRIBUTE_SETTER_NAMES: |
362 return CONTENT_ATTRIBUTE_SETTER_NAMES[base_idl_type] | 362 return CONTENT_ATTRIBUTE_SETTER_NAMES[base_idl_type] |
363 return 'setAttribute' | 363 return 'setAttribute' |
364 | 364 |
365 | 365 |
366 def scoped_content_attribute_name(interface, attribute): | 366 def scoped_content_attribute_name(interface, attribute): |
367 content_attribute_name = attribute.extended_attributes['Reflect'] or attribu
te.name.lower() | 367 content_attribute_name = attribute.extended_attributes['Reflect'] or attribu
te.name.lower() |
368 namespace = 'SVGNames' if interface.name.startswith('SVG') else 'HTMLNames' | 368 namespace = 'SVGNames' if interface.name.startswith('SVG') else 'HTMLNames' |
369 includes.add('%s.h' % namespace) | 369 includes.add('core/%s.h' % namespace) |
370 return '%s::%sAttr' % (namespace, content_attribute_name) | 370 return '%s::%sAttr' % (namespace, content_attribute_name) |
371 | 371 |
372 | 372 |
373 ################################################################################ | 373 ################################################################################ |
374 # Attribute configuration | 374 # Attribute configuration |
375 ################################################################################ | 375 ################################################################################ |
376 | 376 |
377 # [Replaceable] | 377 # [Replaceable] |
378 def setter_callback_name(interface, attribute): | 378 def setter_callback_name(interface, attribute): |
379 cpp_class_name = cpp_name(interface) | 379 cpp_class_name = cpp_name(interface) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 lambda self: strip_suffix(self.base_type, 'Constructor')) | 427 lambda self: strip_suffix(self.base_type, 'Constructor')) |
428 | 428 |
429 | 429 |
430 def is_constructor_attribute(attribute): | 430 def is_constructor_attribute(attribute): |
431 # FIXME: replace this with [ConstructorAttribute] extended attribute | 431 # FIXME: replace this with [ConstructorAttribute] extended attribute |
432 return attribute.idl_type.base_type.endswith('Constructor') | 432 return attribute.idl_type.base_type.endswith('Constructor') |
433 | 433 |
434 | 434 |
435 def generate_constructor_getter(interface, attribute, contents): | 435 def generate_constructor_getter(interface, attribute, contents): |
436 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 436 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
OLD | NEW |