Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js |
| index 1011869d43cfadd91cb1bb3dcb82be56943f25cf..b09cfb58ce48fa2ae51f7357e08c3851f58c2081 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js |
| @@ -83,7 +83,7 @@ WebInspector.DeviceModeToolbar.prototype = { |
| widthInput.maxLength = 4; |
| widthInput.type = "text"; |
| widthInput.title = WebInspector.UIString("Width"); |
| - this._updateWidthInput = WebInspector.bindInput(widthInput, applyWidth.bind(this), WebInspector.DeviceModeModel.deviceSizeValidator, true); |
| + this._updateWidthInput = WebInspector.bindInput(widthInput, this._applyWidth.bind(this), WebInspector.DeviceModeModel.deviceSizeValidator, true); |
| this._widthInput = widthInput; |
| this._widthItem = this._wrapToolbarItem(widthInput); |
| toolbar.appendToolbarItem(this._widthItem); |
| @@ -97,7 +97,7 @@ WebInspector.DeviceModeToolbar.prototype = { |
| heightInput.maxLength = 4; |
| heightInput.type = "text"; |
| heightInput.title = WebInspector.UIString("Height (leave empty for full)"); |
| - this._updateHeightInput = WebInspector.bindInput(heightInput, applyHeight.bind(this), validateHeight, true); |
| + this._updateHeightInput = WebInspector.bindInput(heightInput, this._applyHeight.bind(this), validateHeight, true); |
| this._heightInput = heightInput; |
| this._heightItem = this._wrapToolbarItem(heightInput); |
| toolbar.appendToolbarItem(this._heightItem); |
| @@ -110,26 +110,26 @@ WebInspector.DeviceModeToolbar.prototype = { |
| { |
| return !value || WebInspector.DeviceModeModel.deviceSizeValidator(value); |
| } |
| + }, |
| - /** |
| - * @param {string} value |
| - * @this {WebInspector.DeviceModeToolbar} |
| - */ |
| - function applyWidth(value) |
| - { |
| - var width = value ? Number(value) : 0; |
| - this._model.setWidthAndScaleToFit(width); |
| - } |
| + /** |
| + * @param {string} value |
| + * @this {WebInspector.DeviceModeToolbar} |
|
dgozman
2016/10/26 18:35:22
Don't need @this annotations on prototype function
luoe
2016/10/26 18:56:51
Done.
|
| + */ |
| + _applyWidth: function(value) |
| + { |
| + var width = value ? Number(value) : 0; |
| + this._model.setWidthAndScaleToFit(width); |
| + }, |
| - /** |
| - * @param {string} value |
| - * @this {WebInspector.DeviceModeToolbar} |
| - */ |
| - function applyHeight(value) |
| - { |
| - var height = value ? Number(value) : 0; |
| - this._model.setHeightAndScaleToFit(height); |
| - } |
| + /** |
| + * @param {string} value |
| + * @this {WebInspector.DeviceModeToolbar} |
| + */ |
| + _applyHeight: function(value) |
| + { |
| + var height = value ? Number(value) : 0; |
| + this._model.setHeightAndScaleToFit(height); |
| }, |
| /** |