Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js |
| index 6ff51ae00079d4066db8b8e39da074c41f6a9189..40048c0a51c18656ac73c5a8105f527fff469a77 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js |
| @@ -235,6 +235,30 @@ WebInspector.DeviceModeModel.prototype = { |
| }, |
| /** |
| + * @return {string} |
| + */ |
| + outlineImage: function() |
| + { |
| + return (this._device && this._mode) ? this._device.outlineImage(this._mode) : ""; |
| + }, |
| + |
| + /** |
| + * @return {?Insets|string|null} |
| + */ |
| + outlineInsets: function() |
| + { |
| + return (this._device && this._mode) ? this._device.outlineInsets(this._mode) : ""; |
|
dgozman
2016/02/09 21:15:10
I believe you have to scale insets by this._scale.
mmccoy
2016/02/10 20:06:34
It works well for all cases I tested, but is it ok
|
| + }, |
| + |
| + /** |
| + * @return {?Object|string|null} |
| + */ |
| + outlineDimensions: function() |
| + { |
| + return (this._device && this._mode) ? this._device.outlineDimensions(this._mode) : ""; |
| + }, |
| + |
| + /** |
| * @return {!WebInspector.Rect} |
| */ |
| screenRect: function() |
| @@ -426,7 +450,7 @@ WebInspector.DeviceModeModel.prototype = { |
| if (this._type === WebInspector.DeviceModeModel.Type.Device) { |
| var orientation = this._device.orientationByName(this._mode.orientation); |
| - this._fitScale = this._calculateFitScale(orientation.width, orientation.height); |
| + this._calculateFitScale(orientation.width, orientation.height); |
| this._applyDeviceMetrics(new Size(orientation.width, orientation.height), this._mode.insets, this._scaleSetting.get(), this._device.deviceScaleFactor, this._device.mobile(), resetPageScaleFactor); |
| this._applyUserAgent(this._device.userAgent); |
| this._applyTouch(this._device.touch(), this._device.mobile()); |