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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js

Issue 2387353005: DevTools: disable smoothing and correct nexus device frame dimensions for screenshots (Closed)
Patch Set: Use optimized svg format Created 4 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.DeviceModeView = function() 9 WebInspector.DeviceModeView = function()
10 { 10 {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 if (error) { 413 if (error) {
414 console.error(error); 414 console.error(error);
415 return; 415 return;
416 } 416 }
417 417
418 // Create a canvas to splice the images together. 418 // Create a canvas to splice the images together.
419 var canvas = createElement("canvas"); 419 var canvas = createElement("canvas");
420 var ctx = canvas.getContext("2d"); 420 var ctx = canvas.getContext("2d");
421 canvas.width = outlineRect.width; 421 canvas.width = outlineRect.width;
422 canvas.height = outlineRect.height; 422 canvas.height = outlineRect.height;
423 ctx.imageSmoothingEnabled = false;
423 424
424 var promise = Promise.resolve(); 425 var promise = Promise.resolve();
425 if (this._model.outlineImage()) 426 if (this._model.outlineImage())
426 promise = promise.then(paintImage.bind(null, this._model.outline Image(), outlineRect)); 427 promise = promise.then(paintImage.bind(null, this._model.outline Image(), outlineRect));
427 promise = promise.then(drawBorder); 428 promise = promise.then(drawBorder);
428 if (this._model.screenImage()) 429 if (this._model.screenImage())
429 promise = promise.then(paintImage.bind(null, this._model.screenI mage(), screenRect)); 430 promise = promise.then(paintImage.bind(null, this._model.screenI mage(), screenRect));
430 promise.then(paintScreenshot.bind(this)); 431 promise.then(paintScreenshot.bind(this));
431 432
432 /** 433 /**
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 /** 587 /**
587 * @param {number} size 588 * @param {number} size
588 */ 589 */
589 _onMarkerClick: function(size) 590 _onMarkerClick: function(size)
590 { 591 {
591 this._applyCallback.call(null, size); 592 this._applyCallback.call(null, size);
592 }, 593 },
593 594
594 __proto__: WebInspector.VBox.prototype 595 __proto__: WebInspector.VBox.prototype
595 } 596 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698