refactor: remove experimentalCanvasFeatures property (#13684)
This commit is contained in:
parent
cc03213b62
commit
6045d1218a
6 changed files with 4 additions and 12 deletions
|
@ -53,7 +53,6 @@ WebContentsPreferences::WebContentsPreferences(
|
|||
// Set WebPreferences defaults onto the JS object
|
||||
SetDefaultBoolIfUndefined(options::kPlugins, false);
|
||||
SetDefaultBoolIfUndefined(options::kExperimentalFeatures, false);
|
||||
SetDefaultBoolIfUndefined(options::kExperimentalCanvasFeatures, false);
|
||||
bool node = SetDefaultBoolIfUndefined(options::kNodeIntegration, true);
|
||||
SetDefaultBoolIfUndefined(options::kNodeIntegrationInWorker, false);
|
||||
SetDefaultBoolIfUndefined(options::kWebviewTag, node);
|
||||
|
@ -139,8 +138,6 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
|||
if (dict_.GetBoolean(options::kExperimentalFeatures, &b) && b)
|
||||
command_line->AppendSwitch(
|
||||
::switches::kEnableExperimentalWebPlatformFeatures);
|
||||
if (dict_.GetBoolean(options::kExperimentalCanvasFeatures, &b) && b)
|
||||
command_line->AppendSwitch(::switches::kEnableExperimentalCanvasFeatures);
|
||||
|
||||
// Check if we have node integration specified.
|
||||
bool node_integration = true;
|
||||
|
|
|
@ -118,7 +118,6 @@ const char kGuestInstanceID[] = "guestInstanceId";
|
|||
|
||||
// Web runtime features.
|
||||
const char kExperimentalFeatures[] = "experimentalFeatures";
|
||||
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
|
||||
|
||||
// Opener window's ID.
|
||||
const char kOpenerID[] = "openerId";
|
||||
|
|
|
@ -61,7 +61,6 @@ extern const char kNodeIntegration[];
|
|||
extern const char kContextIsolation[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kExperimentalFeatures[];
|
||||
extern const char kExperimentalCanvasFeatures[];
|
||||
extern const char kOpenerID[];
|
||||
extern const char kScrollBounce[];
|
||||
extern const char kEnableBlinkFeatures[];
|
||||
|
|
|
@ -305,8 +305,6 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
|||
* `plugins` Boolean (optional) - Whether plugins should be enabled. Default is `false`.
|
||||
* `experimentalFeatures` Boolean (optional) - Enables Chromium's experimental features.
|
||||
Default is `false`.
|
||||
* `experimentalCanvasFeatures` Boolean (optional) - Enables Chromium's experimental
|
||||
canvas features. Default is `false`.
|
||||
* `scrollBounce` Boolean (optional) - Enables scroll bounce (rubber banding) effect on
|
||||
macOS. Default is `false`.
|
||||
* `enableBlinkFeatures` String (optional) - A list of feature strings separated by `,`, like
|
||||
|
|
|
@ -445,7 +445,7 @@ const mainWindow = new BrowserWindow({})
|
|||
_Recommendation is Electron's default_
|
||||
|
||||
Advanced users of Electron can enable experimental Chromium features using the
|
||||
`experimentalFeatures` and `experimentalCanvasFeatures` properties.
|
||||
`experimentalFeatures` property.
|
||||
|
||||
### Why?
|
||||
|
||||
|
|
|
@ -210,8 +210,7 @@ module.exports = {
|
|||
*/
|
||||
warnAboutExperimentalFeatures: () => {
|
||||
const webPreferences = getWebPreferences()
|
||||
if (!webPreferences || (!webPreferences.experimentalFeatures &&
|
||||
!webPreferences.experimentalCanvasFeatures)) {
|
||||
if (!webPreferences || (!webPreferences.experimentalFeatures)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue