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

Side by Side Diff: client/dom/scripts/databasebuilder.py

Issue 9418008: Update DOM scripts after recent webkit merge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import copy 6 import copy
7 import database 7 import database
8 import idlparser 8 import idlparser
9 import logging 9 import logging
10 import os 10 import os
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 new_attributes.append(setter_attr) 122 new_attributes.append(setter_attr)
123 interface.attributes = new_attributes 123 interface.attributes = new_attributes
124 124
125 # Remove optional annotations from legacy optional arguments. 125 # Remove optional annotations from legacy optional arguments.
126 for op in interface.operations: 126 for op in interface.operations:
127 for i in range(0, len(op.arguments)): 127 for i in range(0, len(op.arguments)):
128 argument = op.arguments[i] 128 argument = op.arguments[i]
129 if argument.is_optional: 129 if argument.is_optional:
130 if 'Optional' in argument.ext_attrs: 130 if 'Optional' in argument.ext_attrs:
131 optional_value = argument.ext_attrs['Optional'] 131 optional_value = argument.ext_attrs['Optional']
132 if optional_value == 'CallWithDefaultValue': 132 if optional_value:
133 if (interface.id, op.id, argument.id) not in optional_argument_whi telist: 133 if (interface.id, op.id, argument.id) not in optional_argument_whi telist:
134 argument.is_optional = False 134 argument.is_optional = False
135 del argument.ext_attrs['Optional'] 135 del argument.ext_attrs['Optional']
136 136
137 # split operations with optional args into multiple operations 137 # split operations with optional args into multiple operations
138 new_ops = [] 138 new_ops = []
139 for op in interface.operations: 139 for op in interface.operations:
140 for i in range(0, len(op.arguments)): 140 for i in range(0, len(op.arguments)):
141 if op.arguments[i].is_optional: 141 if op.arguments[i].is_optional:
142 op.arguments[i].is_optional = False 142 op.arguments[i].is_optional = False
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 annotation = idl_node.annotations[source] 600 annotation = idl_node.annotations[source]
601 for name, value in annotation.items(): 601 for name, value in annotation.items():
602 if (name in top_level_annotation 602 if (name in top_level_annotation
603 and value == top_level_annotation[name]): 603 and value == top_level_annotation[name]):
604 del annotation[name] 604 del annotation[name]
605 605
606 map(normalize, interface.parents) 606 map(normalize, interface.parents)
607 map(normalize, interface.constants) 607 map(normalize, interface.constants)
608 map(normalize, interface.attributes) 608 map(normalize, interface.attributes)
609 map(normalize, interface.operations) 609 map(normalize, interface.operations)
OLDNEW
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698