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

Side by Side Diff: chrome/renderer/resources/offline.js

Issue 952563003: Reinstate the error code to main content area + bug fixes on security / network interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust vertical alignment of details button, remove net error string prefix Created 5 years, 9 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
« no previous file with comments | « chrome/renderer/resources/neterror.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 (function() { 4 (function() {
5 'use strict'; 5 'use strict';
6 /** 6 /**
7 * T-Rex runner. 7 * T-Rex runner.
8 * @param {string} outerContainerId Outer containing element id. 8 * @param {string} outerContainerId Outer containing element id.
9 * @param {object} opt_config 9 * @param {object} opt_config
10 * @constructor 10 * @constructor
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 canvas.width = oldWidth * ratio; 786 canvas.width = oldWidth * ratio;
787 canvas.height = oldHeight * ratio; 787 canvas.height = oldHeight * ratio;
788 788
789 canvas.style.width = oldWidth + 'px'; 789 canvas.style.width = oldWidth + 'px';
790 canvas.style.height = oldHeight + 'px'; 790 canvas.style.height = oldHeight + 'px';
791 791
792 // Scale the context to counter the fact that we've manually scaled 792 // Scale the context to counter the fact that we've manually scaled
793 // our canvas element. 793 // our canvas element.
794 context.scale(ratio, ratio); 794 context.scale(ratio, ratio);
795 return true; 795 return true;
796 } else if (devicePixelRatio == 1) {
797 // Reset the canvas width / height. Fixes scaling bug when the page is
798 // zoomed and the devicePixelRatio changes accordingly.
799 canvas.style.width = canvas.width + 'px';
800 canvas.style.height = canvas.height + 'px';
796 } 801 }
797 return false; 802 return false;
798 }; 803 };
799 804
800 805
801 /** 806 /**
802 * Get random number. 807 * Get random number.
803 * @param {number} min 808 * @param {number} min
804 * @param {number} max 809 * @param {number} max
805 * @param {number} 810 * @param {number}
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2249
2245 /** 2250 /**
2246 * Add a new cloud to the horizon. 2251 * Add a new cloud to the horizon.
2247 */ 2252 */
2248 addCloud: function() { 2253 addCloud: function() {
2249 this.clouds.push(new Cloud(this.canvas, this.cloudImg, 2254 this.clouds.push(new Cloud(this.canvas, this.cloudImg,
2250 this.dimensions.WIDTH)); 2255 this.dimensions.WIDTH));
2251 } 2256 }
2252 }; 2257 };
2253 })(); 2258 })();
OLDNEW
« no previous file with comments | « chrome/renderer/resources/neterror.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698