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

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

Issue 291053002: Add additional constructor renames (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
11 from generator import * 11 from generator import *
12 from htmldartgenerator import * 12 from htmldartgenerator import *
13 from idlnode import IDLArgument, IDLAttribute 13 from idlnode import IDLArgument, IDLAttribute
14 from systemhtml import js_support_checks, GetCallbackInfo, HTML_LIBRARY_NAMES 14 from systemhtml import js_support_checks, GetCallbackInfo, HTML_LIBRARY_NAMES
15 15
16 # This is an ugly hack to get things working on the M35 roll. Once we 16 # This is an ugly hack to get things working on the M35 roll. Once we
17 # generate dart:blink from the new scripts, this shouldn't be needed. 17 # generate dart:blink from the new scripts, this shouldn't be needed.
18 _cpp_resolver_string_map = { 18 _cpp_resolver_string_map = {
19 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_0_': 19 # These custom constructors all resolve to a common entry, so choosing any
20 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_1_XMLHttpRequestOption s', 20 # of the generated strings works.
21 'Blob_constructorCallback_RESOLVER_STRING_3_Array_DOMString_DOMString':
22 'Blob_constructorCallback_RESOLVER_STRING_0_',
23 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_0_':
24 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_1_XMLHttpRequestOpti ons',
21 } 25 }
22 26
23 # TODO(vsm): This logic needs to pulled from the source IDL. These tables are 27 # TODO(vsm): This logic needs to pulled from the source IDL. These tables are
24 # an ugly workaround. 28 # an ugly workaround.
25 _cpp_callback_map = { 29 _cpp_callback_map = {
26 ('DataTransferItem', 'webkitGetAsEntry'): 'DataTransferItemFileSystem', 30 ('DataTransferItem', 'webkitGetAsEntry'): 'DataTransferItemFileSystem',
27 ('Document', 'fonts'): 'DocumentFontFaceSet', 31 ('Document', 'fonts'): 'DocumentFontFaceSet',
28 ('Document', 'webkitIsFullScreen'): 'DocumentFullscreen', 32 ('Document', 'webkitIsFullScreen'): 'DocumentFullscreen',
29 ('Document', 'webkitFullScreenKeyboardInputAllowed'): 'DocumentFullscreen', 33 ('Document', 'webkitFullScreenKeyboardInputAllowed'): 'DocumentFullscreen',
30 ('Document', 'webkitCurrentFullScreenElement'): 'DocumentFullscreen', 34 ('Document', 'webkitCurrentFullScreenElement'): 'DocumentFullscreen',
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 e.Emit("};\n"); 1955 e.Emit("};\n");
1952 e.Emit('\n'); 1956 e.Emit('\n');
1953 e.Emit('} // namespace WebCore\n'); 1957 e.Emit('} // namespace WebCore\n');
1954 1958
1955 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): 1959 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
1956 return ( 1960 return (
1957 interface.id.endswith('Event') and 1961 interface.id.endswith('Event') and
1958 operation.id.startswith('init') and 1962 operation.id.startswith('init') and
1959 argument.ext_attrs.get('Default') == 'Undefined' and 1963 argument.ext_attrs.get('Default') == 'Undefined' and
1960 argument.type.id == 'DOMString') 1964 argument.type.id == 'DOMString')
OLDNEW
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | tools/dom/src/blink_native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698