Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| index 0d7cd47f41e340f40b4a8b5d036798361a978d82..4da821ed65ca661c9b5fd9adcf210957643d01a8 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
| @@ -315,7 +315,7 @@ WebInspector.DeviceModeView.Toolbar = function(model, showMediaInspectorSetting, |
| this._lastMode = new Map(); |
| /** @type {?WebInspector.EmulatedDevice} */ |
| this._lastDevice = null; |
| - /** @type {!Array<!WebInspector.ToolbarLabel>} */ |
| + /** @type {!Array<!WebInspector.ToolbarButton>} */ |
| this._appliedSizeItems = []; |
| /** @type {!Array<!WebInspector.ToolbarMenuButton>} */ |
| this._scaleItems = []; |
| @@ -346,11 +346,11 @@ WebInspector.DeviceModeView.Toolbar = function(model, showMediaInspectorSetting, |
| rightContainer.createChild("div", "device-mode-toolbar-spacer"); |
| var rightToolbar = new WebInspector.Toolbar("", rightContainer); |
| rightToolbar.makeWrappable(true); |
| - this._uaItem = new WebInspector.ToolbarLabel(); |
| + this._uaItem = new WebInspector.ToolbarText(); |
| this._uaItem.setVisible(false); |
| this._uaItem.setTitle(WebInspector.UIString("User agent type")); |
| rightToolbar.appendToolbarItem(this._uaItem); |
| - this._deviceScaleItem = new WebInspector.ToolbarLabel(); |
| + this._deviceScaleItem = new WebInspector.ToolbarText(); |
| this._deviceScaleItem.setVisible(false); |
| this._deviceScaleItem.setTitle(WebInspector.UIString("Device pixel ratio")); |
| rightToolbar.appendToolbarItem(this._deviceScaleItem); |
| @@ -455,7 +455,7 @@ WebInspector.DeviceModeView.Toolbar.prototype = { |
| */ |
| _appendAppliedSizeItems: function(toolbar) |
| { |
| - var item = new WebInspector.ToolbarLabel(); |
| + var item = new WebInspector.ToolbarText(""); |
| this._appliedSizeItems.push(item); |
| toolbar.appendToolbarItem(item); |
| }, |
| @@ -468,8 +468,6 @@ WebInspector.DeviceModeView.Toolbar.prototype = { |
| var scaleItem = new WebInspector.ToolbarMenuButton(this._appendScaleMenuItems.bind(this)); |
| scaleItem.setTitle(WebInspector.UIString("Zoom")); |
| scaleItem.setGlyph(""); |
| - scaleItem.setBold(false); |
| - scaleItem.setDimmed(true); |
| scaleItem.addDropDownArrow(); |
| toolbar.appendToolbarItem(scaleItem); |
| this._scaleItems.push(scaleItem); |
| @@ -814,11 +812,8 @@ WebInspector.DeviceModeView.Toolbar.prototype = { |
| } |
| var offscreen = this._model.screenRect().width > this._model.visiblePageRect().width || this._model.screenRect().height > this._model.visiblePageRect().height; |
|
dgozman
2016/01/14 22:05:21
Remove the whole offscreen code then.
|
| - if (offscreen !== this._cachedOffscreen) { |
| - for (var item of this._scaleItems) |
| - item.setDimmed(!offscreen); |
| + if (offscreen !== this._cachedOffscreen) |
| this._cachedOffscreen = offscreen; |
| - } |
| var deviceScale = this._model.deviceScaleFactorSetting().get(); |
| if (deviceScale !== this._cachedDeviceScale) { |