@@ -50,22 +50,12 @@ def attribute_context(interface, attribute):
50
50
51
51
idl_type .add_includes_for_type ()
52
52
53
- # [CustomElementCallbacks], [Reflect]
54
- is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attributes
55
- is_reflect = 'Reflect' in extended_attributes
56
- if is_custom_element_callbacks or is_reflect :
57
- includes .add ('sky/engine/core/dom/custom/custom_element_callback_scope.h' )
58
53
# [TypeChecking]
59
54
has_type_checking_unrestricted = (
60
55
(has_extended_attribute_value (interface , 'TypeChecking' , 'Unrestricted' ) or
61
56
has_extended_attribute_value (attribute , 'TypeChecking' , 'Unrestricted' )) and
62
57
idl_type .name in ('Float' , 'Double' ))
63
58
64
- if (base_idl_type == 'EventHandler' and
65
- interface .name in ['Window' ] and
66
- attribute .name == 'onerror' ):
67
- includes .add ('bindings/core/v8/V8ErrorHandler.h' )
68
-
69
59
context = {
70
60
'argument_cpp_type' : idl_type .cpp_type_args (used_as_rvalue_type = True ),
71
61
'cached_attribute_validation_method' : extended_attributes .get ('CachedAttribute' ),
@@ -82,7 +72,6 @@ def attribute_context(interface, attribute):
82
72
'idl_type' : str (idl_type ), # need trailing [] on array for Dictionary::ConversionContext::setConversionType
83
73
'is_call_with_execution_context' : v8_utilities .has_extended_attribute_value (attribute , 'CallWith' , 'ExecutionContext' ),
84
74
'is_call_with_script_state' : v8_utilities .has_extended_attribute_value (attribute , 'CallWith' , 'ScriptState' ),
85
- 'is_custom_element_callbacks' : is_custom_element_callbacks ,
86
75
'is_getter_raises_exception' : # [RaisesException]
87
76
'RaisesException' in extended_attributes and
88
77
extended_attributes ['RaisesException' ] in (None , 'Getter' ),
@@ -94,16 +83,11 @@ def attribute_context(interface, attribute):
94
83
'is_partial_interface_member' :
95
84
'PartialInterfaceImplementedAs' in extended_attributes ,
96
85
'is_read_only' : attribute .is_read_only ,
97
- 'is_reflect' : is_reflect ,
98
86
'is_replaceable' : 'Replaceable' in attribute .extended_attributes ,
99
87
'is_static' : attribute .is_static ,
100
88
'is_url' : 'URL' in extended_attributes ,
101
89
'name' : attribute .name ,
102
90
'put_forwards' : 'PutForwards' in extended_attributes ,
103
- 'reflect_empty' : extended_attributes .get ('ReflectEmpty' ),
104
- 'reflect_invalid' : extended_attributes .get ('ReflectInvalid' , '' ),
105
- 'reflect_missing' : extended_attributes .get ('ReflectMissing' ),
106
- 'reflect_only' : extended_attribute_value_as_list (attribute , 'ReflectOnly' ),
107
91
'setter_callback' : setter_callback_name (interface , attribute ),
108
92
}
109
93
@@ -161,10 +145,9 @@ def getter_expression(interface, attribute, context):
161
145
def getter_base_name (interface , attribute , arguments ):
162
146
extended_attributes = attribute .extended_attributes
163
147
164
- if 'Reflect' not in extended_attributes :
165
- return uncapitalize (cpp_name (attribute ))
148
+ return uncapitalize (cpp_name (attribute ))
166
149
167
- content_attribute_name = extended_attributes [ 'Reflect' ] or attribute .name .lower ()
150
+ content_attribute_name = attribute .name .lower ()
168
151
if content_attribute_name in ['class' , 'id' ]:
169
152
# Special-case for performance optimization.
170
153
return 'get%sAttribute' % content_attribute_name .capitalize ()
@@ -254,18 +237,11 @@ def setter_context(interface, attribute, context):
254
237
255
238
256
239
def setter_base_name (interface , attribute , arguments ):
257
- if 'Reflect' not in attribute .extended_attributes :
258
- return 'set%s' % capitalize (cpp_name (attribute ))
259
- arguments .append (scoped_content_attribute_name (interface , attribute ))
260
-
261
- base_idl_type = attribute .idl_type .base_type
262
- if base_idl_type in CONTENT_ATTRIBUTE_SETTER_NAMES :
263
- return CONTENT_ATTRIBUTE_SETTER_NAMES [base_idl_type ]
264
- return 'setAttribute'
240
+ return 'set%s' % capitalize (cpp_name (attribute ))
265
241
266
242
267
243
def scoped_content_attribute_name (interface , attribute ):
268
- content_attribute_name = attribute .extended_attributes [ 'Reflect' ] or attribute . name .lower ()
244
+ content_attribute_name = attribute .name .lower ()
269
245
namespace = 'HTMLNames'
270
246
includes .add ('gen/sky/core/%s.h' % namespace )
271
247
return '%s::%sAttr' % (namespace , content_attribute_name )
0 commit comments