OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 // Namespace object for the utilities. | 6 // Namespace object for the utilities. |
7 function ImageUtil() {} | 7 function ImageUtil() {} |
8 | 8 |
9 // Performance trace. | 9 // Performance trace. |
10 ImageUtil.trace = (function() { | 10 ImageUtil.trace = (function() { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 391 } |
392 | 392 |
393 copyStrip(); | 393 copyStrip(); |
394 } | 394 } |
395 | 395 |
396 return function () { | 396 return function () { |
397 if (image) image.onload = function(){}; | 397 if (image) image.onload = function(){}; |
398 if (timeout) clearTimeout(timeout); | 398 if (timeout) clearTimeout(timeout); |
399 }; | 399 }; |
400 }; | 400 }; |
| 401 |
| 402 ImageUtil.removeChildren = function(element) { |
| 403 while (element.firstChild) { |
| 404 element.removeChild(element.firstChild); |
| 405 } |
| 406 }; |
OLD | NEW |