| Index: Source/devtools/front_end/Settings.js
|
| diff --git a/Source/devtools/front_end/Settings.js b/Source/devtools/front_end/Settings.js
|
| index 9e820cf3762e3d58de194443ee7f6a97419a321e..0593fbb08a1f299e91669c119ac92edb859160ee 100644
|
| --- a/Source/devtools/front_end/Settings.js
|
| +++ b/Source/devtools/front_end/Settings.js
|
| @@ -483,7 +483,7 @@ WebInspector.VersionController = function()
|
| {
|
| }
|
|
|
| -WebInspector.VersionController.currentVersion = 7;
|
| +WebInspector.VersionController.currentVersion = 8;
|
|
|
| WebInspector.VersionController.prototype = {
|
| updateVersion: function()
|
| @@ -646,6 +646,30 @@ WebInspector.VersionController.prototype = {
|
| }
|
| },
|
|
|
| + _updateVersionFrom7To8: function()
|
| + {
|
| + var settingName = "deviceMetrics";
|
| + if (!window.localStorage || !(settingName in window.localStorage))
|
| + return;
|
| + var setting = WebInspector.settings.createSetting(settingName, undefined);
|
| + var value = setting.get();
|
| + if (!value)
|
| + return;
|
| +
|
| + var components = value.split("x");
|
| + if (components.length >= 3) {
|
| + var width = parseInt(components[0], 10);
|
| + var height = parseInt(components[1], 10);
|
| + var deviceScaleFactor = parseFloat(components[2]);
|
| + if (deviceScaleFactor) {
|
| + components[0] = "" + Math.round(width / deviceScaleFactor);
|
| + components[1] = "" + Math.round(height / deviceScaleFactor);
|
| + }
|
| + }
|
| + value = components.join("x");
|
| + setting.set(value);
|
| + },
|
| +
|
| /**
|
| * @param {!WebInspector.Setting} breakpointsSetting
|
| * @param {number} maxBreakpointsCount
|
|
|