| OLD | NEW |
| 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 system to generate | 6 """This module provides shared functionality for the system to generate |
| 7 Dart:html APIs from the IDL database.""" | 7 Dart:html APIs from the IDL database.""" |
| 8 | 8 |
| 9 import emitter | 9 import emitter |
| 10 import logging | 10 import logging |
| 11 import monitored | 11 import monitored |
| 12 import os | 12 import os |
| 13 import re | 13 import re |
| 14 from generator import * | 14 from generator import * |
| 15 from htmldartgenerator import * | 15 from htmldartgenerator import * |
| 16 | 16 |
| 17 _logger = logging.getLogger('systemhtml') | 17 _logger = logging.getLogger('systemhtml') |
| 18 | 18 |
| 19 HTML_LIBRARY_NAMES = ['chrome', 'html', 'indexed_db', 'svg', | 19 HTML_LIBRARY_NAMES = ['chrome', 'html', 'indexed_db', 'svg', |
| 20 'web_audio', 'web_gl', 'web_sql'] | 20 'web_audio', 'web_gl', 'web_sql'] |
| 21 | 21 |
| 22 _js_custom_members = monitored.Set('systemhtml._js_custom_members', [ | 22 _js_custom_members = monitored.Set('systemhtml._js_custom_members', [ |
| 23 'AudioBufferSourceNode.start', | 23 'AudioBufferSourceNode.start', |
| 24 'AudioBufferSourceNode.stop', | 24 'AudioBufferSourceNode.stop', |
| 25 'AudioContext.createGain', | 25 'AudioContext.createGain', |
| 26 'AudioContext.createScriptProcessor', | 26 'AudioContext.createScriptProcessor', |
| 27 'CanvasRenderingContext2D.drawImage', | 27 'CanvasRenderingContext2D.drawImage', |
| 28 'CanvasRenderingContext2D.lineDashOffset', | 28 'CanvasRenderingContext2D.lineDashOffset', |
| 29 'Console.memory', | 29 'Console.memory', |
| 30 'Console.assertCondition', | 30 'ConsoleBase.assertCondition', |
| 31 'Console.count', | 31 'ConsoleBase.clear', |
| 32 'Console.debug', | 32 'ConsoleBase.count', |
| 33 'Console.dir', | 33 'ConsoleBase.debug', |
| 34 'Console.dirxml', | 34 'ConsoleBase.dir', |
| 35 'Console.error', | 35 'ConsoleBase.dirxml', |
| 36 'Console.group', | 36 'ConsoleBase.error', |
| 37 'Console.groupCollapsed', | 37 'ConsoleBase.group', |
| 38 'Console.groupEnd', | 38 'ConsoleBase.groupCollapsed', |
| 39 'Console.info', | 39 'ConsoleBase.groupEnd', |
| 40 'Console.log', | 40 'ConsoleBase.info', |
| 41 'Console.markTimeline', | 41 'ConsoleBase.log', |
| 42 'Console.profile', | 42 'ConsoleBase.markTimeline', |
| 43 'Console.profileEnd', | 43 'ConsoleBase.profile', |
| 44 'Console.time', | 44 'ConsoleBase.profileEnd', |
| 45 'Console.timeEnd', | 45 'ConsoleBase.table', |
| 46 'Console.timeStamp', | 46 'ConsoleBase.time', |
| 47 'Console.trace', | 47 'ConsoleBase.timeEnd', |
| 48 'Console.warn', | 48 'ConsoleBase.timeStamp', |
| 49 'ConsoleBase.trace', |
| 50 'ConsoleBase.warn', |
| 49 'WebKitCSSKeyframesRule.insertRule', | 51 'WebKitCSSKeyframesRule.insertRule', |
| 50 'CSSStyleDeclaration.setProperty', | 52 'CSSStyleDeclaration.setProperty', |
| 51 'Element.createShadowRoot', | 53 'Element.createShadowRoot', |
| 52 'Element.insertAdjacentElement', | 54 'Element.insertAdjacentElement', |
| 53 'Element.insertAdjacentHTML', | 55 'Element.insertAdjacentHTML', |
| 54 'Element.insertAdjacentText', | 56 'Element.insertAdjacentText', |
| 55 'Element.webkitMatchesSelector', | 57 'Element.webkitMatchesSelector', |
| 56 'Element.remove', | 58 'Element.remove', |
| 57 'ElementEvents.mouseWheel', | 59 'ElementEvents.mouseWheel', |
| 58 'ElementEvents.transitionEnd', | 60 'ElementEvents.transitionEnd', |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 for library_name in libraries: | 1223 for library_name in libraries: |
| 1222 self._libraries[library_name] = DartLibrary( | 1224 self._libraries[library_name] = DartLibrary( |
| 1223 library_name, template_loader, library_type, output_dir) | 1225 library_name, template_loader, library_type, output_dir) |
| 1224 | 1226 |
| 1225 def AddFile(self, basename, library_name, path): | 1227 def AddFile(self, basename, library_name, path): |
| 1226 self._libraries[library_name].AddFile(path) | 1228 self._libraries[library_name].AddFile(path) |
| 1227 | 1229 |
| 1228 def Emit(self, emitter, auxiliary_dir): | 1230 def Emit(self, emitter, auxiliary_dir): |
| 1229 for lib in self._libraries.values(): | 1231 for lib in self._libraries.values(): |
| 1230 lib.Emit(emitter, auxiliary_dir) | 1232 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |