OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 # Methods | 249 # Methods |
250 methods = [v8_methods.method_context(interface, method) | 250 methods = [v8_methods.method_context(interface, method) |
251 for method in interface.operations | 251 for method in interface.operations |
252 if method.name] # Skip anonymous special operations (methods) | 252 if method.name] # Skip anonymous special operations (methods) |
253 compute_method_overloads_context(methods) | 253 compute_method_overloads_context(methods) |
254 | 254 |
255 # Stringifier | 255 # Stringifier |
256 if interface.stringifier: | 256 if interface.stringifier: |
257 stringifier = interface.stringifier | 257 stringifier = interface.stringifier |
258 method = IdlOperation() | 258 method = IdlOperation(interface.idl_name) |
259 method.name = 'toString' | 259 method.name = 'toString' |
260 method.idl_type = IdlType('DOMString') | 260 method.idl_type = IdlType('DOMString') |
261 method.extended_attributes.update(stringifier.extended_attributes) | 261 method.extended_attributes.update(stringifier.extended_attributes) |
262 if stringifier.attribute: | 262 if stringifier.attribute: |
263 method.extended_attributes['ImplementedAs'] = stringifier.attribute.
name | 263 method.extended_attributes['ImplementedAs'] = stringifier.attribute.
name |
264 elif stringifier.operation: | 264 elif stringifier.operation: |
265 method.extended_attributes['ImplementedAs'] = stringifier.operation.
name | 265 method.extended_attributes['ImplementedAs'] = stringifier.operation.
name |
266 methods.append(v8_methods.method_context(interface, method)) | 266 methods.append(v8_methods.method_context(interface, method)) |
267 | 267 |
268 conditionally_enabled_methods = [] | 268 conditionally_enabled_methods = [] |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 deleter = next( | 1108 deleter = next( |
1109 method | 1109 method |
1110 for method in interface.operations | 1110 for method in interface.operations |
1111 if ('deleter' in method.specials and | 1111 if ('deleter' in method.specials and |
1112 len(method.arguments) == 1 and | 1112 len(method.arguments) == 1 and |
1113 str(method.arguments[0].idl_type) == 'DOMString')) | 1113 str(method.arguments[0].idl_type) == 'DOMString')) |
1114 except StopIteration: | 1114 except StopIteration: |
1115 return None | 1115 return None |
1116 | 1116 |
1117 return property_deleter(deleter) | 1117 return property_deleter(deleter) |
OLD | NEW |