Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: Source/devtools/front_end/screencast/ScreencastView.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/resources/ResourcesPanel.js ('k') | Source/devtools/front_end/settings/EditFileSystemDialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698