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

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

Issue 961073004: IDL: Add [LegacyInterfaceTypeChecking] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 feature_name = extended_attributes['RuntimeEnabled'] 400 feature_name = extended_attributes['RuntimeEnabled']
401 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) 401 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name)
402 402
403 403
404 # [Unforgeable] 404 # [Unforgeable]
405 def is_unforgeable(interface, member): 405 def is_unforgeable(interface, member):
406 return ('Unforgeable' in interface.extended_attributes or 406 return ('Unforgeable' in interface.extended_attributes or
407 'Unforgeable' in member.extended_attributes) 407 'Unforgeable' in member.extended_attributes)
408 408
409 409
410 # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking]
411 def is_legacy_interface_type_checking(interface, member):
412 if not ('TypeChecking' in interface.extended_attributes or
413 'TypeChecking' in member.extended_attributes):
414 return True
415 if 'LegacyInterfaceTypeChecking' in member.extended_attributes:
416 return True
417 return False
418
410 ################################################################################ 419 ################################################################################
411 # Indexed properties 420 # Indexed properties
412 # http://heycam.github.io/webidl/#idl-indexed-properties 421 # http://heycam.github.io/webidl/#idl-indexed-properties
413 ################################################################################ 422 ################################################################################
414 423
415 def indexed_property_getter(interface): 424 def indexed_property_getter(interface):
416 try: 425 try:
417 # Find indexed property getter, if present; has form: 426 # Find indexed property getter, if present; has form:
418 # getter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1) 427 # getter TYPE [OPTIONAL_IDENTIFIER](unsigned long ARG1)
419 return next( 428 return next(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 except StopIteration: 511 except StopIteration:
503 return None 512 return None
504 513
505 514
506 IdlInterface.indexed_property_getter = property(indexed_property_getter) 515 IdlInterface.indexed_property_getter = property(indexed_property_getter)
507 IdlInterface.indexed_property_setter = property(indexed_property_setter) 516 IdlInterface.indexed_property_setter = property(indexed_property_setter)
508 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) 517 IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
509 IdlInterface.named_property_getter = property(named_property_getter) 518 IdlInterface.named_property_getter = property(named_property_getter)
510 IdlInterface.named_property_setter = property(named_property_setter) 519 IdlInterface.named_property_setter = property(named_property_setter)
511 IdlInterface.named_property_deleter = property(named_property_deleter) 520 IdlInterface.named_property_deleter = property(named_property_deleter)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/tests/idls/core/TestInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698