| OLD | NEW |
| 1 #!/usr/bin/python2.6 | 1 #!/usr/bin/python2.6 |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 """Generates CSSStyleDeclaration from css property definitions defined in WebKit
.""" | 7 """Generates CSSStyleDeclaration from css property definitions defined in WebKit
.""" |
| 8 | 8 |
| 9 import tempfile, os | 9 import tempfile, os |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // %s | 102 // %s |
| 103 | 103 |
| 104 // TODO(jacobr): add versions that take numeric values in px, miliseconds, etc. | 104 // TODO(jacobr): add versions that take numeric values in px, miliseconds, etc. |
| 105 | 105 |
| 106 class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
s CSSStyleDeclaration { | 106 class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
s CSSStyleDeclaration { |
| 107 static String _cachedBrowserPrefix; | 107 static String _cachedBrowserPrefix; |
| 108 | 108 |
| 109 CSSStyleDeclarationWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | 109 CSSStyleDeclarationWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
| 110 | 110 |
| 111 static String get _browserPrefix { | 111 static String get _browserPrefix { |
| 112 if (_cachedBrowserPrefix === null) { | 112 if (_cachedBrowserPrefix == null) { |
| 113 if (_Device.isFirefox) { | 113 if (_Device.isFirefox) { |
| 114 _cachedBrowserPrefix = '-moz-'; | 114 _cachedBrowserPrefix = '-moz-'; |
| 115 } else { | 115 } else { |
| 116 _cachedBrowserPrefix = '-webkit-'; | 116 _cachedBrowserPrefix = '-webkit-'; |
| 117 } | 117 } |
| 118 // TODO(jacobr): support IE 9.0 and Opera as well. | 118 // TODO(jacobr): support IE 9.0 and Opera as well. |
| 119 } | 119 } |
| 120 return _cachedBrowserPrefix; | 120 return _cachedBrowserPrefix; |
| 121 } | 121 } |
| 122 | 122 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 interface_file.write(''.join(interface_lines)); | 210 interface_file.write(''.join(interface_lines)); |
| 211 interface_file.write('}\n') | 211 interface_file.write('}\n') |
| 212 interface_file.close() | 212 interface_file.close() |
| 213 | 213 |
| 214 class_file.write(''.join(class_lines)); | 214 class_file.write(''.join(class_lines)); |
| 215 class_file.write('}\n') | 215 class_file.write('}\n') |
| 216 class_file.close() | 216 class_file.close() |
| 217 | 217 |
| 218 if __name__ == '__main__': | 218 if __name__ == '__main__': |
| 219 main() | 219 main() |
| OLD | NEW |