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

Side by Side Diff: Source/bindings/scripts/v8_attributes.py

Issue 1003683002: bindings: Moves WorkerGlobalScope's attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 # 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 'Unforgeable' in extended_attributes or 484 'Unforgeable' in extended_attributes or
485 'OverrideBuiltins' in interface.extended_attributes): 485 'OverrideBuiltins' in interface.extended_attributes):
486 return False 486 return False
487 487
488 # FIXME: We should move all of the following DOM attributes to prototype 488 # FIXME: We should move all of the following DOM attributes to prototype
489 # chains. 489 # chains.
490 if (is_constructor_attribute(attribute) or 490 if (is_constructor_attribute(attribute) or
491 has_custom_getter(attribute) or 491 has_custom_getter(attribute) or
492 has_custom_setter(attribute) or 492 has_custom_setter(attribute) or
493 interface.name == 'Window' or 493 interface.name == 'Window' or
494 interface.name == 'WorkerGlobalScope' or
495 v8_utilities.indexed_property_getter(interface) or 494 v8_utilities.indexed_property_getter(interface) or
496 v8_utilities.indexed_property_setter(interface) or 495 v8_utilities.indexed_property_setter(interface) or
497 v8_utilities.indexed_property_deleter(interface) or 496 v8_utilities.indexed_property_deleter(interface) or
498 v8_utilities.named_property_getter(interface) or 497 v8_utilities.named_property_getter(interface) or
499 v8_utilities.named_property_setter(interface) or 498 v8_utilities.named_property_setter(interface) or
500 v8_utilities.named_property_deleter(interface)): 499 v8_utilities.named_property_deleter(interface)):
501 return False 500 return False
502 501
503 return True 502 return True
504 503
505 504
506 ################################################################################ 505 ################################################################################
507 # Constructors 506 # Constructors
508 ################################################################################ 507 ################################################################################
509 508
510 idl_types.IdlType.constructor_type_name = property( 509 idl_types.IdlType.constructor_type_name = property(
511 # FIXME: replace this with a [ConstructorAttribute] extended attribute 510 # FIXME: replace this with a [ConstructorAttribute] extended attribute
512 lambda self: strip_suffix(self.base_type, 'Constructor')) 511 lambda self: strip_suffix(self.base_type, 'Constructor'))
513 512
514 513
515 def is_constructor_attribute(attribute): 514 def is_constructor_attribute(attribute):
516 # FIXME: replace this with [ConstructorAttribute] extended attribute 515 # FIXME: replace this with [ConstructorAttribute] extended attribute
517 return attribute.idl_type.name.endswith('Constructor') 516 return attribute.idl_type.name.endswith('Constructor')
518 517
519 518
520 def constructor_getter_context(interface, attribute, context): 519 def constructor_getter_context(interface, attribute, context):
521 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 520 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698