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

Side by Side Diff: lib/html/scripts/htmlrenamer.py

Issue 11065039: Remove window.length and window.frames (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « lib/html/dartium/html_dartium.dart ('k') | lib/html/src/CrossFrameTypes.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, 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 html_interface_renames = { 6 html_interface_renames = {
7 'DOMCoreException': 'DOMException', 7 'DOMCoreException': 'DOMException',
8 'DOMFormData': 'FormData', 8 'DOMFormData': 'FormData',
9 'DOMWindow': 'LocalWindow', 9 'DOMWindow': 'LocalWindow',
10 'History': 'LocalHistory', 10 'History': 'LocalHistory',
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 "Node.get:CDATA_SECTION_NODE", 274 "Node.get:CDATA_SECTION_NODE",
275 "Node.get:nodeName", 275 "Node.get:nodeName",
276 "Node.lookupPrefix", 276 "Node.lookupPrefix",
277 "Node.get:PROCESSING_INSTRUCTION_NODE", 277 "Node.get:PROCESSING_INSTRUCTION_NODE",
278 'ShadowRoot.getElementsByTagNameNS', 278 'ShadowRoot.getElementsByTagNameNS',
279 "IFrameElement.get:contentDocument", 279 "IFrameElement.get:contentDocument",
280 "WheelEvent.wheelDelta", 280 "WheelEvent.wheelDelta",
281 "WheelEvent.wheelDeltaX", 281 "WheelEvent.wheelDeltaX",
282 "WheelEvent.wheelDeltaY", 282 "WheelEvent.wheelDeltaY",
283 "LocalWindow.get:frameElement", 283 "LocalWindow.get:frameElement",
284 "LocalWindow.get:frames",
285 "LocalWindow.get:length",
284 "LocalWindow.webkitCancelRequestAnimationFrame", 286 "LocalWindow.webkitCancelRequestAnimationFrame",
285 ]) 287 ])
286 288
287 class HtmlRenamer(object): 289 class HtmlRenamer(object):
288 def __init__(self, database): 290 def __init__(self, database):
289 self._database = database 291 self._database = database
290 292
291 def RenameInterface(self, interface): 293 def RenameInterface(self, interface):
292 if interface.id.startswith('HTML'): 294 if interface.id.startswith('HTML'):
293 if any(interface.id in ['Element', 'Document'] 295 if any(interface.id in ['Element', 'Document']
(...skipping 23 matching lines...) Expand all
317 319
318 def _FindMatch(self, interface, member, member_prefix, candidates): 320 def _FindMatch(self, interface, member, member_prefix, candidates):
319 for interface in self._database.Hierarchy(interface): 321 for interface in self._database.Hierarchy(interface):
320 html_interface_name = self.RenameInterface(interface) 322 html_interface_name = self.RenameInterface(interface)
321 member_name = html_interface_name + '.' + member 323 member_name = html_interface_name + '.' + member
322 if member_name in candidates: 324 if member_name in candidates:
323 return member_name 325 return member_name
324 member_name = html_interface_name + '.' + member_prefix + member 326 member_name = html_interface_name + '.' + member_prefix + member
325 if member_name in candidates: 327 if member_name in candidates:
326 return member_name 328 return member_name
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/src/CrossFrameTypes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698