| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |