Merge pull request #11974 from electron/remove-setZoomLevelLimits

remove setZoomLevelLimits
This commit is contained in:
shelley vohr 2018-02-20 10:51:41 -05:00 committed by GitHub
commit 8d4bf3e29a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 26 deletions

View file

@ -407,9 +407,7 @@ void WebFrame::BuildPrototype(
.SetMethod("setIsolatedWorldHumanReadableName",
&WebFrame::SetIsolatedWorldHumanReadableName)
.SetMethod("getResourceUsage", &WebFrame::GetResourceUsage)
.SetMethod("clearCache", &WebFrame::ClearCache)
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
.SetMethod("setZoomLevelLimits", &WebFrame::SetVisualZoomLevelLimits);
.SetMethod("clearCache", &WebFrame::ClearCache);
}
} // namespace api

View file

@ -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
`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)`
* `minimumLevel` Number

View file

@ -39,14 +39,6 @@ limits of 300% and 50% of original size, respectively.
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)`
* `minimumLevel` Number

View file

@ -109,9 +109,7 @@ const webFrameMethods = [
'insertCSS',
'insertText',
'setLayoutZoomLevelLimits',
'setVisualZoomLevelLimits',
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
'setZoomLevelLimits'
'setVisualZoomLevelLimits'
]
const webFrameMethodsWithResult = []

View file

@ -375,9 +375,7 @@ const registerWebViewElement = function () {
'send',
'sendInputEvent',
'setLayoutZoomLevelLimits',
'setVisualZoomLevelLimits',
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
'setZoomLevelLimits'
'setVisualZoomLevelLimits'
]
// Forward proto.foo* method calls to WebViewImpl.foo*.

View file

@ -134,7 +134,6 @@ describe('webFrame module', function () {
it('supports setting the visual and layout zoom level limits', function () {
assert.doesNotThrow(function () {
webFrame.setZoomLevelLimits(1, 100)
webFrame.setVisualZoomLevelLimits(1, 50)
webFrame.setLayoutZoomLevelLimits(0, 25)
})