| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 this._inspectModeConfig = enabled ? config : null; | 674 this._inspectModeConfig = enabled ? config : null; |
| 675 if (callback) | 675 if (callback) |
| 676 callback(null); | 676 callback(null); |
| 677 }, | 677 }, |
| 678 | 678 |
| 679 /** | 679 /** |
| 680 * @param {!CanvasRenderingContext2D} context | 680 * @param {!CanvasRenderingContext2D} context |
| 681 */ | 681 */ |
| 682 _createCheckerboardPattern: function(context) | 682 _createCheckerboardPattern: function(context) |
| 683 { | 683 { |
| 684 var pattern = /** @type {!HTMLCanvasElement} */(document.createElement("
canvas")); | 684 var pattern = /** @type {!HTMLCanvasElement} */(createElement("canvas"))
; |
| 685 const size = 32; | 685 const size = 32; |
| 686 pattern.width = size * 2; | 686 pattern.width = size * 2; |
| 687 pattern.height = size * 2; | 687 pattern.height = size * 2; |
| 688 var pctx = pattern.getContext("2d"); | 688 var pctx = pattern.getContext("2d"); |
| 689 | 689 |
| 690 pctx.fillStyle = "rgb(195, 195, 195)"; | 690 pctx.fillStyle = "rgb(195, 195, 195)"; |
| 691 pctx.fillRect(0, 0, size * 2, size * 2); | 691 pctx.fillRect(0, 0, size * 2, size * 2); |
| 692 | 692 |
| 693 pctx.fillStyle = "rgb(225, 225, 225)"; | 693 pctx.fillStyle = "rgb(225, 225, 225)"; |
| 694 pctx.fillRect(0, 0, size, size); | 694 pctx.fillRect(0, 0, size, size); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 return; | 856 return; |
| 857 this._maxDisplayedProgress = progress; | 857 this._maxDisplayedProgress = progress; |
| 858 this._displayProgress(progress); | 858 this._displayProgress(progress); |
| 859 }, | 859 }, |
| 860 | 860 |
| 861 _displayProgress: function(progress) | 861 _displayProgress: function(progress) |
| 862 { | 862 { |
| 863 this._element.style.width = (100 * progress) + "%"; | 863 this._element.style.width = (100 * progress) + "%"; |
| 864 } | 864 } |
| 865 }; | 865 }; |
| OLD | NEW |