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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 INCLUDES_FOR_TYPE = { | 287 INCLUDES_FOR_TYPE = { |
288 'object': set(), | 288 'object': set(), |
289 'CompareHow': set(), | 289 'CompareHow': set(), |
290 'Dictionary': set(['bindings/v8/Dictionary.h']), | 290 'Dictionary': set(['bindings/v8/Dictionary.h']), |
291 'EventHandler': set(['bindings/v8/V8AbstractEventListener.h', | 291 'EventHandler': set(['bindings/v8/V8AbstractEventListener.h', |
292 'bindings/v8/V8EventListenerList.h']), | 292 'bindings/v8/V8EventListenerList.h']), |
293 'EventListener': set(['bindings/v8/BindingSecurity.h', | 293 'EventListener': set(['bindings/v8/BindingSecurity.h', |
294 'bindings/v8/V8EventListenerList.h', | 294 'bindings/v8/V8EventListenerList.h', |
295 'core/frame/DOMWindow.h']), | 295 'core/frame/DOMWindow.h']), |
| 296 'HTMLCollection': set(['bindings/core/v8/V8HTMLCollection.h', |
| 297 'core/dom/ClassCollection.h', |
| 298 'core/dom/TagCollection.h', |
| 299 'core/html/HTMLCollection.h', |
| 300 'core/html/HTMLFormControlsCollection.h', |
| 301 'core/html/HTMLTableRowsCollection.h']), |
296 'MediaQueryListListener': set(['core/css/MediaQueryListListener.h']), | 302 'MediaQueryListListener': set(['core/css/MediaQueryListListener.h']), |
| 303 'NodeList': set(['bindings/core/v8/V8NodeList.h', |
| 304 'core/dom/NameNodeList.h', |
| 305 'core/dom/NodeList.h', |
| 306 'core/dom/StaticNodeList.h', |
| 307 'core/html/LabelsNodeList.h']), |
297 'Promise': set(['bindings/v8/ScriptPromise.h']), | 308 'Promise': set(['bindings/v8/ScriptPromise.h']), |
298 'SerializedScriptValue': set(['bindings/v8/SerializedScriptValue.h']), | 309 'SerializedScriptValue': set(['bindings/v8/SerializedScriptValue.h']), |
299 'ScriptValue': set(['bindings/v8/ScriptValue.h']), | 310 'ScriptValue': set(['bindings/v8/ScriptValue.h']), |
300 } | 311 } |
301 | 312 |
302 | 313 |
303 def includes_for_type(idl_type): | 314 def includes_for_type(idl_type): |
304 idl_type = idl_type.preprocessed_type | 315 idl_type = idl_type.preprocessed_type |
305 | 316 |
306 # Composite types | 317 # Composite types |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 def cpp_value_to_v8_value(idl_type, cpp_value, isolate='info.GetIsolate()', crea
tion_context='info.Holder()', extended_attributes=None): | 677 def cpp_value_to_v8_value(idl_type, cpp_value, isolate='info.GetIsolate()', crea
tion_context='info.Holder()', extended_attributes=None): |
667 """Returns an expression that converts a C++ value to a V8 value.""" | 678 """Returns an expression that converts a C++ value to a V8 value.""" |
668 # the isolate parameter is needed for callback interfaces | 679 # the isolate parameter is needed for callback interfaces |
669 idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, ext
ended_attributes) | 680 idl_type, cpp_value = preprocess_idl_type_and_value(idl_type, cpp_value, ext
ended_attributes) |
670 this_v8_conversion_type = idl_type.v8_conversion_type(extended_attributes) | 681 this_v8_conversion_type = idl_type.v8_conversion_type(extended_attributes) |
671 format_string = CPP_VALUE_TO_V8_VALUE[this_v8_conversion_type] | 682 format_string = CPP_VALUE_TO_V8_VALUE[this_v8_conversion_type] |
672 statement = format_string.format(cpp_value=cpp_value, isolate=isolate, creat
ion_context=creation_context) | 683 statement = format_string.format(cpp_value=cpp_value, isolate=isolate, creat
ion_context=creation_context) |
673 return statement | 684 return statement |
674 | 685 |
675 IdlType.cpp_value_to_v8_value = cpp_value_to_v8_value | 686 IdlType.cpp_value_to_v8_value = cpp_value_to_v8_value |
OLD | NEW |