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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js

Issue 1929603002: [DevTools] If no device frame art is available, ensure neutral inset values are defined when applyi… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No null insets for outline Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6479e8ed1424b60b9260d6d577d419a5449adec6..e839c832bf2056ece31cd1206be63f3cf0bc8bf4 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
@@ -434,7 +434,9 @@ WebInspector.DeviceModeModel.prototype = {
if (this._type === WebInspector.DeviceModeModel.Type.Device) {
var orientation = this._device.orientationByName(this._mode.orientation);
- var outline = (this._deviceOutlineSetting.get() && Runtime.experiments.isEnabled("deviceFrames")) ? orientation.outlineInsets : new Insets(0,0,0,0);
+ var outline = new Insets(0, 0, 0, 0);
+ if (Runtime.experiments.isEnabled("deviceFrames") && this._deviceOutlineSetting.get())
+ outline = orientation.outlineInsets || outline;
this._fitScale = this._calculateFitScale(orientation.width, orientation.height);
if (this._device.mobile())
this._appliedUserAgentType = this._device.touch() ? WebInspector.DeviceModeModel.UA.Mobile : WebInspector.DeviceModeModel.UA.MobileNoTouch;
@@ -501,7 +503,7 @@ WebInspector.DeviceModeModel.prototype = {
/**
* @param {!Size} screenSize
* @param {!Insets} insets
- * @param {!Insets|null} outline
+ * @param {!Insets} outline
* @param {number} scale
* @param {number} deviceScaleFactor
* @param {boolean} mobile
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698