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

Side by Side Diff: lib/dom/scripts/systemnative.py

Issue 10014028: Remove EventListener attributes from Dart DOM API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Create real IDLParentInterface. Created 8 years, 8 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
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 """This module provides shared functionality for the systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 ' RefPtr<ScriptCallStack> scriptCallStack(DartUtilities::create ScriptCallStack());\n' 432 ' RefPtr<ScriptCallStack> scriptCallStack(DartUtilities::create ScriptCallStack());\n'
433 ' if (!scriptCallStack->size())\n' 433 ' if (!scriptCallStack->size())\n'
434 ' return;\n', 434 ' return;\n',
435 INDEX=len(node.arguments)) 435 INDEX=len(node.arguments))
436 arguments.extend(['scriptArguments', 'scriptCallStack']) 436 arguments.extend(['scriptArguments', 'scriptCallStack'])
437 return True 437 return True
438 438
439 return False 439 return False
440 440
441 def AddAttribute(self, getter, setter): 441 def AddAttribute(self, getter, setter):
442 # FIXME: Dartium does not support attribute event listeners. However, JS
443 # implementation falls back to them when addEventListener is not available.
444 # Make sure addEventListener is available in all EventTargets and remove
445 # this check.
446 if (getter or setter).type.id == 'EventListener':
447 return
448
449 if 'CheckSecurityForNode' in (getter or setter).ext_attrs: 442 if 'CheckSecurityForNode' in (getter or setter).ext_attrs:
450 # FIXME: exclude from interface as well. 443 # FIXME: exclude from interface as well.
451 return 444 return
452 445
453 # FIXME: these should go away. 446 # FIXME: these should go away.
454 classes_with_unsupported_custom_getters = [ 447 classes_with_unsupported_custom_getters = [
455 'Clipboard', 'Console', 'Coordinates', 'DeviceMotionEvent', 448 'Clipboard', 'Console', 'Coordinates', 'DeviceMotionEvent',
456 'DeviceOrientationEvent', 'FileReader', 'JavaScriptCallFrame', 449 'DeviceOrientationEvent', 'FileReader', 'JavaScriptCallFrame',
457 'HTMLInputElement', 'HTMLOptionsCollection', 'HTMLOutputElement', 450 'HTMLInputElement', 'HTMLOptionsCollection', 'HTMLOutputElement',
458 'ScriptProfileNode', 'WebKitAnimation'] 451 'ScriptProfileNode', 'WebKitAnimation']
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 def _InstanceOfNode(database, interface): 843 def _InstanceOfNode(database, interface):
851 if interface.id == 'Node': 844 if interface.id == 'Node':
852 return True 845 return True
853 for parent in interface.parents: 846 for parent in interface.parents:
854 if not database.HasInterface(parent.type.id): 847 if not database.HasInterface(parent.type.id):
855 continue 848 continue
856 parent_interface = database.GetInterface(parent.type.id) 849 parent_interface = database.GetInterface(parent.type.id)
857 if _InstanceOfNode(database, parent_interface): 850 if _InstanceOfNode(database, parent_interface):
858 return True 851 return True
859 return False 852 return False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698