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

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

Issue 424163002: Enable the WebIDL [Exposed] annotation on an interface's members. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments 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 # 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e xtended_attributes, # [ActivityLogging] 93 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e xtended_attributes, # [ActivityLogging]
94 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] 94 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging]
95 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), 95 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
96 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'), 96 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'),
97 'conditional_string': v8_utilities.conditional_string(attribute), 97 'conditional_string': v8_utilities.conditional_string(attribute),
98 'constructor_type': idl_type.constructor_type_name 98 'constructor_type': idl_type.constructor_type_name
99 if is_constructor_attribute(attribute) else None, 99 if is_constructor_attribute(attribute) else None,
100 'cpp_name': cpp_name(attribute), 100 'cpp_name': cpp_name(attribute),
101 'cpp_type': idl_type.cpp_type, 101 'cpp_type': idl_type.cpp_type,
102 'cpp_type_initializer': idl_type.cpp_type_initializer, 102 'cpp_type_initializer': idl_type.cpp_type_initializer,
103 'custom_exposed_rules': v8_utilities.exposed(attribute, interface), # [ Exposed]
haraken 2014/07/30 16:32:03 custom_exposed_rules => exposed_rules
Jens Widell 2014/07/30 16:48:45 Or maybe 'exposed_tests'? Or maybe better yet, 'ex
Peter Beverloo 2014/07/31 19:02:21 I agree that |exposed_test| represents the content
103 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 104 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
104 'enum_validation_expression': idl_type.enum_validation_expression, 105 'enum_validation_expression': idl_type.enum_validation_expression,
105 'has_custom_getter': has_custom_getter, 106 'has_custom_getter': has_custom_getter,
106 'has_custom_setter': has_custom_setter, 107 'has_custom_setter': has_custom_setter,
107 'has_type_checking_unrestricted': has_type_checking_unrestricted, 108 'has_type_checking_unrestricted': has_type_checking_unrestricted,
108 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType 109 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType
109 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), 110 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'),
110 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'), 111 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'),
111 'is_check_security_for_node': is_check_security_for_node, 112 'is_check_security_for_node': is_check_security_for_node,
112 'is_custom_element_callbacks': is_custom_element_callbacks, 113 'is_custom_element_callbacks': is_custom_element_callbacks,
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 lambda self: strip_suffix(self.base_type, 'Constructor')) 483 lambda self: strip_suffix(self.base_type, 'Constructor'))
483 484
484 485
485 def is_constructor_attribute(attribute): 486 def is_constructor_attribute(attribute):
486 # FIXME: replace this with [ConstructorAttribute] extended attribute 487 # FIXME: replace this with [ConstructorAttribute] extended attribute
487 return attribute.idl_type.base_type.endswith('Constructor') 488 return attribute.idl_type.base_type.endswith('Constructor')
488 489
489 490
490 def constructor_getter_context(interface, attribute, context): 491 def constructor_getter_context(interface, attribute, context):
491 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 492 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698