| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 name.replace(acronym, acronym.lower()) | 71 name.replace(acronym, acronym.lower()) |
| 72 return name | 72 return name |
| 73 return name[0].lower() + name[1:] | 73 return name[0].lower() + name[1:] |
| 74 | 74 |
| 75 | 75 |
| 76 def v8_class_name(interface): | 76 def v8_class_name(interface): |
| 77 return v8_types.v8_type(interface.name) | 77 return v8_types.v8_type(interface.name) |
| 78 | 78 |
| 79 | 79 |
| 80 # [ActivityLogging] | 80 # [ActivityLogging] |
| 81 def has_activity_logging(member, includes, access_type=None): | 81 def activity_logging_world_list(member, includes, access_type=None): |
| 82 """Returns a set of world suffixes for which a definition member has activit
y logging, for specified access type. | 82 """Returns a set of world suffixes for which a definition member has activit
y logging, for specified access type. |
| 83 | 83 |
| 84 access_type can be 'Getter' or 'Setter' if only checking getting or setting. | 84 access_type can be 'Getter' or 'Setter' if only checking getting or setting. |
| 85 """ | 85 """ |
| 86 if 'ActivityLogging' not in member.extended_attributes: | 86 if 'ActivityLogging' not in member.extended_attributes: |
| 87 return set() | 87 return set() |
| 88 activity_logging = member.extended_attributes['ActivityLogging'] | 88 activity_logging = member.extended_attributes['ActivityLogging'] |
| 89 # [ActivityLogging=Access*] means log for all access, otherwise check that | 89 # [ActivityLogging=Access*] means log for all access, otherwise check that |
| 90 # value agrees with specified access_type. | 90 # value agrees with specified access_type. |
| 91 has_logging = (activity_logging.startswith('Access') or | 91 has_logging = (activity_logging.startswith('Access') or |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 def cpp_name(definition_or_member): | 181 def cpp_name(definition_or_member): |
| 182 return definition_or_member.extended_attributes.get('ImplementedAs', definit
ion_or_member.name) | 182 return definition_or_member.extended_attributes.get('ImplementedAs', definit
ion_or_member.name) |
| 183 | 183 |
| 184 | 184 |
| 185 # [MeasureAs] | 185 # [MeasureAs] |
| 186 def generate_measure_as(definition_or_member, contents, includes): | 186 def generate_measure_as(definition_or_member, contents, includes): |
| 187 if 'MeasureAs' not in definition_or_member.extended_attributes: | 187 if 'MeasureAs' not in definition_or_member.extended_attributes: |
| 188 return | 188 return |
| 189 contents['measure_as'] = definition_or_member.extended_attributes['MeasureAs
'] | 189 contents['measure_as'] = definition_or_member.extended_attributes['MeasureAs
'] |
| 190 includes.add('core/page/UseCounter.h') | 190 includes.add('core/page/UseCounter.h') |
| OLD | NEW |