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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 # Note that [ImplementedAs] is used with different meanings on interfaces | 163 # Note that [ImplementedAs] is used with different meanings on interfaces |
164 # and members: | 164 # and members: |
165 # for Blink class name and function name (or constant name), respectively. | 165 # for Blink class name and function name (or constant name), respectively. |
166 # Thus we do not want to copy this from the interface to the member, but | 166 # Thus we do not want to copy this from the interface to the member, but |
167 # instead extract it and handle it separately. | 167 # instead extract it and handle it separately. |
168 implemented_by = dependency_interface.extended_attributes.get('ImplementedAs
', dependency_interface_basename) | 168 implemented_by = dependency_interface.extended_attributes.get('ImplementedAs
', dependency_interface_basename) |
169 | 169 |
170 def merge_lists(source_list, target_list): | 170 def merge_lists(source_list, target_list): |
171 for member in source_list: | 171 for member in source_list: |
172 member.extended_attributes.update(merged_extended_attributes) | 172 member.extended_attributes.update(merged_extended_attributes) |
173 # FIXME: remove check for LegacyImplementedInBaseClass when this | 173 member.extended_attributes['ImplementedBy'] = implemented_by |
174 # attribute is removed | |
175 if 'LegacyImplementedInBaseClass' not in dependency_interface.extend
ed_attributes: | |
176 member.extended_attributes['ImplementedBy'] = implemented_by | |
177 target_list.append(member) | 174 target_list.append(member) |
178 | 175 |
179 merge_lists(dependency_interface.attributes, target_interface.attributes) | 176 merge_lists(dependency_interface.attributes, target_interface.attributes) |
180 merge_lists(dependency_interface.constants, target_interface.constants) | 177 merge_lists(dependency_interface.constants, target_interface.constants) |
181 merge_lists(dependency_interface.operations, target_interface.operations) | 178 merge_lists(dependency_interface.operations, target_interface.operations) |
OLD | NEW |