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

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

Issue 9460061: Ignore attributes and methods with CheckSecurityForNode. (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 | « no previous file | client/tests/client/client.status » ('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 """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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 DECLARATIONS=self._cpp_declarations_emitter.Fragments()) 370 DECLARATIONS=self._cpp_declarations_emitter.Fragments())
371 371
372 def AddAttribute(self, getter, setter): 372 def AddAttribute(self, getter, setter):
373 # FIXME: Dartium does not support attribute event listeners. However, JS 373 # FIXME: Dartium does not support attribute event listeners. However, JS
374 # implementation falls back to them when addEventListener is not available. 374 # implementation falls back to them when addEventListener is not available.
375 # Make sure addEventListener is available in all EventTargets and remove 375 # Make sure addEventListener is available in all EventTargets and remove
376 # this check. 376 # this check.
377 if (getter or setter).type.id == 'EventListener': 377 if (getter or setter).type.id == 'EventListener':
378 return 378 return
379 379
380 if 'CheckSecurityForNode' in (getter or setter).ext_attrs:
381 # FIXME: exclude from interface as well.
382 return
383
380 # FIXME: support 'ImplementedBy'. 384 # FIXME: support 'ImplementedBy'.
381 if 'ImplementedBy' in (getter or setter).ext_attrs: 385 if 'ImplementedBy' in (getter or setter).ext_attrs:
382 return 386 return
383 387
384 # FIXME: these should go away. 388 # FIXME: these should go away.
385 classes_with_unsupported_custom_getters = [ 389 classes_with_unsupported_custom_getters = [
386 'Clipboard', 'Console', 'Coordinates', 'DeviceMotionEvent', 390 'Clipboard', 'Console', 'Coordinates', 'DeviceMotionEvent',
387 'DeviceOrientationEvent', 'FileReader', 'JavaScriptCallFrame', 391 'DeviceOrientationEvent', 'FileReader', 'JavaScriptCallFrame',
388 'HTMLInputElement', 'HTMLOptionsCollection', 'HTMLOutputElement', 392 'HTMLInputElement', 'HTMLOptionsCollection', 'HTMLOutputElement',
389 'ScriptProfileNode', 'WebKitAnimation'] 393 'ScriptProfileNode', 'WebKitAnimation']
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 dart_declaration = 'void operator[]=(int index, %s value)' % element_type 479 dart_declaration = 'void operator[]=(int index, %s value)' % element_type
476 self._GenerateNativeBinding('numericIndexSetter', 3, dart_declaration, 480 self._GenerateNativeBinding('numericIndexSetter', 3, dart_declaration,
477 'Callback', True) 481 'Callback', True)
478 482
479 def AddOperation(self, info): 483 def AddOperation(self, info):
480 """ 484 """
481 Arguments: 485 Arguments:
482 info: An OperationInfo object. 486 info: An OperationInfo object.
483 """ 487 """
484 488
489 if 'CheckSecurityForNode' in info.overloads[0].ext_attrs:
490 # FIXME: exclude from interface as well.
491 return
492
485 if 'Custom' in info.overloads[0].ext_attrs: 493 if 'Custom' in info.overloads[0].ext_attrs:
486 parameters = info.ParametersImplementationDeclaration() 494 parameters = info.ParametersImplementationDeclaration()
487 dart_declaration = '%s %s(%s)' % (info.type_name, info.name, parameters) 495 dart_declaration = '%s %s(%s)' % (info.type_name, info.name, parameters)
488 argument_count = 1 + len(info.arg_infos) 496 argument_count = 1 + len(info.arg_infos)
489 self._GenerateNativeBinding(info.name, argument_count, dart_declaration, 497 self._GenerateNativeBinding(info.name, argument_count, dart_declaration,
490 'Callback', True) 498 'Callback', True)
491 return 499 return
492 500
493 body = self._members_emitter.Emit( 501 body = self._members_emitter.Emit(
494 '\n' 502 '\n'
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 namespace = 'HTMLNames' 777 namespace = 'HTMLNames'
770 svg_exceptions = ['class', 'id', 'onabort', 'onclick', 'onerror', 'onload', 778 svg_exceptions = ['class', 'id', 'onabort', 'onclick', 'onerror', 'onload',
771 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 779 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover',
772 'onmouseup', 'onresize', 'onscroll', 'onunload'] 780 'onmouseup', 'onresize', 'onscroll', 'onunload']
773 if self._interface.id.startswith('SVG') and not attr.id in svg_exceptions: 781 if self._interface.id.startswith('SVG') and not attr.id in svg_exceptions:
774 namespace = 'SVGNames' 782 namespace = 'SVGNames'
775 self._cpp_impl_includes[namespace] = 1 783 self._cpp_impl_includes[namespace] = 1
776 784
777 attribute_name = attr.ext_attrs['Reflect'] or attr.id.lower() 785 attribute_name = attr.ext_attrs['Reflect'] or attr.id.lower()
778 return 'WebCore::%s::%sAttr' % (namespace, attribute_name) 786 return 'WebCore::%s::%sAttr' % (namespace, attribute_name)
OLDNEW
« no previous file with comments | « no previous file | client/tests/client/client.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698