remove setZoomLevelLimits
This commit is contained in:
parent
459a5e3a1f
commit
211b542ae4
6 changed files with 3 additions and 26 deletions
|
@ -407,9 +407,7 @@ void WebFrame::BuildPrototype(
|
||||||
.SetMethod("setIsolatedWorldHumanReadableName",
|
.SetMethod("setIsolatedWorldHumanReadableName",
|
||||||
&WebFrame::SetIsolatedWorldHumanReadableName)
|
&WebFrame::SetIsolatedWorldHumanReadableName)
|
||||||
.SetMethod("getResourceUsage", &WebFrame::GetResourceUsage)
|
.SetMethod("getResourceUsage", &WebFrame::GetResourceUsage)
|
||||||
.SetMethod("clearCache", &WebFrame::ClearCache)
|
.SetMethod("clearCache", &WebFrame::ClearCache);
|
||||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
|
||||||
.SetMethod("setZoomLevelLimits", &WebFrame::SetVisualZoomLevelLimits);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace api
|
} // namespace api
|
||||||
|
|
|
@ -842,14 +842,6 @@ limits of 300% and 50% of original size, respectively. The formula for this is
|
||||||
Sends a request to get current zoom level, the `callback` will be called with
|
Sends a request to get current zoom level, the `callback` will be called with
|
||||||
`callback(zoomLevel)`.
|
`callback(zoomLevel)`.
|
||||||
|
|
||||||
#### `contents.setZoomLevelLimits(minimumLevel, maximumLevel)`
|
|
||||||
|
|
||||||
* `minimumLevel` Number
|
|
||||||
* `maximumLevel` Number
|
|
||||||
|
|
||||||
**Deprecated:** Call `setVisualZoomLevelLimits` instead to set the visual zoom
|
|
||||||
level limits. This method will be removed in Electron 2.0.
|
|
||||||
|
|
||||||
#### `contents.setVisualZoomLevelLimits(minimumLevel, maximumLevel)`
|
#### `contents.setVisualZoomLevelLimits(minimumLevel, maximumLevel)`
|
||||||
|
|
||||||
* `minimumLevel` Number
|
* `minimumLevel` Number
|
||||||
|
|
|
@ -39,14 +39,6 @@ limits of 300% and 50% of original size, respectively.
|
||||||
|
|
||||||
Returns `Number` - The current zoom level.
|
Returns `Number` - The current zoom level.
|
||||||
|
|
||||||
### `webFrame.setZoomLevelLimits(minimumLevel, maximumLevel)`
|
|
||||||
|
|
||||||
* `minimumLevel` Number
|
|
||||||
* `maximumLevel` Number
|
|
||||||
|
|
||||||
**Deprecated:** Call `setVisualZoomLevelLimits` instead to set the visual zoom
|
|
||||||
level limits. This method will be removed in Electron 2.0.
|
|
||||||
|
|
||||||
### `webFrame.setVisualZoomLevelLimits(minimumLevel, maximumLevel)`
|
### `webFrame.setVisualZoomLevelLimits(minimumLevel, maximumLevel)`
|
||||||
|
|
||||||
* `minimumLevel` Number
|
* `minimumLevel` Number
|
||||||
|
|
|
@ -109,9 +109,7 @@ const webFrameMethods = [
|
||||||
'insertCSS',
|
'insertCSS',
|
||||||
'insertText',
|
'insertText',
|
||||||
'setLayoutZoomLevelLimits',
|
'setLayoutZoomLevelLimits',
|
||||||
'setVisualZoomLevelLimits',
|
'setVisualZoomLevelLimits'
|
||||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
|
||||||
'setZoomLevelLimits'
|
|
||||||
]
|
]
|
||||||
const webFrameMethodsWithResult = []
|
const webFrameMethodsWithResult = []
|
||||||
|
|
||||||
|
|
|
@ -375,9 +375,7 @@ const registerWebViewElement = function () {
|
||||||
'send',
|
'send',
|
||||||
'sendInputEvent',
|
'sendInputEvent',
|
||||||
'setLayoutZoomLevelLimits',
|
'setLayoutZoomLevelLimits',
|
||||||
'setVisualZoomLevelLimits',
|
'setVisualZoomLevelLimits'
|
||||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
|
||||||
'setZoomLevelLimits'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
// Forward proto.foo* method calls to WebViewImpl.foo*.
|
// Forward proto.foo* method calls to WebViewImpl.foo*.
|
||||||
|
|
|
@ -134,7 +134,6 @@ describe('webFrame module', function () {
|
||||||
|
|
||||||
it('supports setting the visual and layout zoom level limits', function () {
|
it('supports setting the visual and layout zoom level limits', function () {
|
||||||
assert.doesNotThrow(function () {
|
assert.doesNotThrow(function () {
|
||||||
webFrame.setZoomLevelLimits(1, 100)
|
|
||||||
webFrame.setVisualZoomLevelLimits(1, 50)
|
webFrame.setVisualZoomLevelLimits(1, 50)
|
||||||
webFrame.setLayoutZoomLevelLimits(0, 25)
|
webFrame.setLayoutZoomLevelLimits(0, 25)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue