feat: remove deprecated setLayoutZoomLevelLimits (#21383)
This commit is contained in:
parent
4ac575416f
commit
dc9beda182
6 changed files with 8 additions and 39 deletions
|
@ -20,6 +20,14 @@ const { remote } = require('electron')
|
||||||
remote.webContents.fromId(webview.getWebContentsId())
|
remote.webContents.fromId(webview.getWebContentsId())
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `webFrame.setLayoutZoomLevelLimits()`
|
||||||
|
|
||||||
|
Chromium has removed support for changing the layout zoom level limits, and it
|
||||||
|
is beyond Electron's capacity to maintain it. The function was deprecated in
|
||||||
|
Electron 8.x, and has been removed in Electron 9.x. The layout zoom level limits
|
||||||
|
are now fixed at a minimum of 0.25 and a maximum of 5.0, as defined
|
||||||
|
[here](https://chromium.googlesource.com/chromium/src/+/938b37a6d2886bf8335fc7db792f1eb46c65b2ae/third_party/blink/common/page/page_zoom.cc#11).
|
||||||
|
|
||||||
## Planned Breaking API Changes (8.0)
|
## Planned Breaking API Changes (8.0)
|
||||||
|
|
||||||
### Values sent over IPC are now serialized with Structured Clone Algorithm
|
### Values sent over IPC are now serialized with Structured Clone Algorithm
|
||||||
|
|
|
@ -1113,17 +1113,6 @@ Sets the maximum and minimum pinch-to-zoom level.
|
||||||
> contents.setVisualZoomLevelLimits(1, 3)
|
> contents.setVisualZoomLevelLimits(1, 3)
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
#### `contents.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)` _Deprecated_
|
|
||||||
|
|
||||||
* `minimumLevel` Number
|
|
||||||
* `maximumLevel` Number
|
|
||||||
|
|
||||||
Returns `Promise<void>`
|
|
||||||
|
|
||||||
Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
|
|
||||||
|
|
||||||
**Deprecated:** This API is no longer supported by Chromium.
|
|
||||||
|
|
||||||
#### `contents.undo()`
|
#### `contents.undo()`
|
||||||
|
|
||||||
Executes the editing command `undo` in web page.
|
Executes the editing command `undo` in web page.
|
||||||
|
|
|
@ -56,15 +56,6 @@ Sets the maximum and minimum pinch-to-zoom level.
|
||||||
> webFrame.setVisualZoomLevelLimits(1, 3)
|
> webFrame.setVisualZoomLevelLimits(1, 3)
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
### `webFrame.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)` _Deprecated_
|
|
||||||
|
|
||||||
* `minimumLevel` Number
|
|
||||||
* `maximumLevel` Number
|
|
||||||
|
|
||||||
Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
|
|
||||||
|
|
||||||
**Deprecated:** This API is no longer supported by Chromium.
|
|
||||||
|
|
||||||
### `webFrame.setSpellCheckProvider(language, provider)`
|
### `webFrame.setSpellCheckProvider(language, provider)`
|
||||||
|
|
||||||
* `language` String
|
* `language` String
|
||||||
|
|
|
@ -635,17 +635,6 @@ Returns `Promise<void>`
|
||||||
|
|
||||||
Sets the maximum and minimum pinch-to-zoom level.
|
Sets the maximum and minimum pinch-to-zoom level.
|
||||||
|
|
||||||
### `<webview>.setLayoutZoomLevelLimits(minimumLevel, maximumLevel)` _Deprecated_
|
|
||||||
|
|
||||||
* `minimumLevel` Number
|
|
||||||
* `maximumLevel` Number
|
|
||||||
|
|
||||||
Returns `Promise<void>`
|
|
||||||
|
|
||||||
Sets the maximum and minimum layout-based (i.e. non-visual) zoom level.
|
|
||||||
|
|
||||||
**Deprecated:** This API is no longer supported by Chromium.
|
|
||||||
|
|
||||||
### `<webview>.showDefinitionForSelection()` _macOS_
|
### `<webview>.showDefinitionForSelection()` _macOS_
|
||||||
|
|
||||||
Shows pop-up dictionary that searches the selected word on the page.
|
Shows pop-up dictionary that searches the selected word on the page.
|
||||||
|
|
|
@ -173,7 +173,6 @@ const webFrameMethods = [
|
||||||
'insertCSS',
|
'insertCSS',
|
||||||
'insertText',
|
'insertText',
|
||||||
'removeInsertedCSS',
|
'removeInsertedCSS',
|
||||||
'setLayoutZoomLevelLimits',
|
|
||||||
'setVisualZoomLevelLimits'
|
'setVisualZoomLevelLimits'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import { deprecate } from 'electron'
|
|
||||||
|
|
||||||
const binding = process.electronBinding('web_frame')
|
const binding = process.electronBinding('web_frame')
|
||||||
|
|
||||||
const setLayoutZoomLevelLimitsWarning = deprecate.warnOnce('setLayoutZoomLevelLimits')
|
|
||||||
|
|
||||||
class WebFrame extends EventEmitter {
|
class WebFrame extends EventEmitter {
|
||||||
constructor (public context: Window) {
|
constructor (public context: Window) {
|
||||||
super()
|
super()
|
||||||
|
@ -48,10 +45,6 @@ class WebFrame extends EventEmitter {
|
||||||
get routingId () {
|
get routingId () {
|
||||||
return binding._getRoutingId(this.context)
|
return binding._getRoutingId(this.context)
|
||||||
}
|
}
|
||||||
|
|
||||||
setLayoutZoomLevelLimits () {
|
|
||||||
setLayoutZoomLevelLimitsWarning()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate the methods.
|
// Populate the methods.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue