| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Templates used for the HTML visualization of source map information. | 5 /// Templates used for the HTML visualization of source map information. |
| 6 | 6 |
| 7 library sourcemap.html.templates; | 7 library sourcemap.html.templates; |
| 8 | 8 |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 .buffer, .js-buffer, .dart-buffer, .js-trace-buffer { | 172 .buffer, .js-buffer, .dart-buffer, .js-trace-buffer { |
| 173 position:fixed; | 173 position:fixed; |
| 174 top:0px; | 174 top:0px; |
| 175 height:100%; | 175 height:100%; |
| 176 overflow:auto; | 176 overflow:auto; |
| 177 } | 177 } |
| 178 $css, | 178 $css, |
| 179 .code { | 179 .code { |
| 180 font-family: monospace; | 180 font-family: monospace; |
| 181 } | 181 } |
| 182 td,.code { |
| 183 font-family: monospace; |
| 184 max-width: 400px; |
| 185 overflow: hidden; |
| 186 } |
| 182 </style> | 187 </style> |
| 183 </head> | 188 </head> |
| 184 <body> | 189 <body> |
| 185 <script> | 190 <script> |
| 186 function setAll(name, property, value) { | 191 function setAll(name, property, value) { |
| 187 var elements = document.getElementsByName(name); | 192 var elements = document.getElementsByName(name); |
| 188 for (var i = 0; i < elements.length; i++) { | 193 for (var i = 0; i < elements.length; i++) { |
| 189 elements[i].style[property] = value; | 194 elements[i].style[property] = value; |
| 190 } | 195 } |
| 191 } | 196 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 </html> | 238 </html> |
| 234 '''); | 239 '''); |
| 235 } | 240 } |
| 236 | 241 |
| 237 /// Outputs [html] in [uri]. | 242 /// Outputs [html] in [uri]. |
| 238 void output(Uri uri, | 243 void output(Uri uri, |
| 239 String html) { | 244 String html) { |
| 240 File outputFile = new File.fromUri(uri); | 245 File outputFile = new File.fromUri(uri); |
| 241 outputFile.writeAsStringSync(html); | 246 outputFile.writeAsStringSync(html); |
| 242 } | 247 } |
| OLD | NEW |