refactor: remove experimentalCanvasFeatures property (#13684)

This commit is contained in:
Shelley Vohr 2018-07-16 13:32:42 -07:00 committed by GitHub
parent cc03213b62
commit 6045d1218a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 12 deletions

View file

@ -53,7 +53,6 @@ WebContentsPreferences::WebContentsPreferences(
// Set WebPreferences defaults onto the JS object // Set WebPreferences defaults onto the JS object
SetDefaultBoolIfUndefined(options::kPlugins, false); SetDefaultBoolIfUndefined(options::kPlugins, false);
SetDefaultBoolIfUndefined(options::kExperimentalFeatures, false); SetDefaultBoolIfUndefined(options::kExperimentalFeatures, false);
SetDefaultBoolIfUndefined(options::kExperimentalCanvasFeatures, false);
bool node = SetDefaultBoolIfUndefined(options::kNodeIntegration, true); bool node = SetDefaultBoolIfUndefined(options::kNodeIntegration, true);
SetDefaultBoolIfUndefined(options::kNodeIntegrationInWorker, false); SetDefaultBoolIfUndefined(options::kNodeIntegrationInWorker, false);
SetDefaultBoolIfUndefined(options::kWebviewTag, node); SetDefaultBoolIfUndefined(options::kWebviewTag, node);
@ -139,8 +138,6 @@ void WebContentsPreferences::AppendCommandLineSwitches(
if (dict_.GetBoolean(options::kExperimentalFeatures, &b) && b) if (dict_.GetBoolean(options::kExperimentalFeatures, &b) && b)
command_line->AppendSwitch( command_line->AppendSwitch(
::switches::kEnableExperimentalWebPlatformFeatures); ::switches::kEnableExperimentalWebPlatformFeatures);
if (dict_.GetBoolean(options::kExperimentalCanvasFeatures, &b) && b)
command_line->AppendSwitch(::switches::kEnableExperimentalCanvasFeatures);
// Check if we have node integration specified. // Check if we have node integration specified.
bool node_integration = true; bool node_integration = true;

View file

@ -118,7 +118,6 @@ const char kGuestInstanceID[] = "guestInstanceId";
// Web runtime features. // Web runtime features.
const char kExperimentalFeatures[] = "experimentalFeatures"; const char kExperimentalFeatures[] = "experimentalFeatures";
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
// Opener window's ID. // Opener window's ID.
const char kOpenerID[] = "openerId"; const char kOpenerID[] = "openerId";

View file

@ -61,7 +61,6 @@ extern const char kNodeIntegration[];
extern const char kContextIsolation[]; extern const char kContextIsolation[];
extern const char kGuestInstanceID[]; extern const char kGuestInstanceID[];
extern const char kExperimentalFeatures[]; extern const char kExperimentalFeatures[];
extern const char kExperimentalCanvasFeatures[];
extern const char kOpenerID[]; extern const char kOpenerID[];
extern const char kScrollBounce[]; extern const char kScrollBounce[];
extern const char kEnableBlinkFeatures[]; extern const char kEnableBlinkFeatures[];

View file

@ -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`. * `plugins` Boolean (optional) - Whether plugins should be enabled. Default is `false`.
* `experimentalFeatures` Boolean (optional) - Enables Chromium's experimental features. * `experimentalFeatures` Boolean (optional) - Enables Chromium's experimental features.
Default is `false`. 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 * `scrollBounce` Boolean (optional) - Enables scroll bounce (rubber banding) effect on
macOS. Default is `false`. macOS. Default is `false`.
* `enableBlinkFeatures` String (optional) - A list of feature strings separated by `,`, like * `enableBlinkFeatures` String (optional) - A list of feature strings separated by `,`, like

View file

@ -355,7 +355,7 @@ Content-Security-Policy: script-src 'self' https://apis.mydomain.com
### CSP HTTP Header ### CSP HTTP Header
Electron respects the [`Content-Security-Policy` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) Electron respects the [`Content-Security-Policy` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)
which can be set using Electron's which can be set using Electron's
[`webRequest.onHeadersReceived`](../api/web-request.md#webrequestonheadersreceivedfilter-listener) [`webRequest.onHeadersReceived`](../api/web-request.md#webrequestonheadersreceivedfilter-listener)
handler: handler:
@ -369,7 +369,7 @@ session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
### CSP Meta Tag ### CSP Meta Tag
CSP's preferred delivery mechanism is an HTTP header. It can be useful, however, CSP's preferred delivery mechanism is an HTTP header. It can be useful, however,
to set a policy on a page directly in the markup using a `<meta>` tag: to set a policy on a page directly in the markup using a `<meta>` tag:
```html ```html
@ -445,7 +445,7 @@ const mainWindow = new BrowserWindow({})
_Recommendation is Electron's default_ _Recommendation is Electron's default_
Advanced users of Electron can enable experimental Chromium features using the Advanced users of Electron can enable experimental Chromium features using the
`experimentalFeatures` and `experimentalCanvasFeatures` properties. `experimentalFeatures` property.
### Why? ### Why?

View file

@ -210,8 +210,7 @@ module.exports = {
*/ */
warnAboutExperimentalFeatures: () => { warnAboutExperimentalFeatures: () => {
const webPreferences = getWebPreferences() const webPreferences = getWebPreferences()
if (!webPreferences || (!webPreferences.experimentalFeatures && if (!webPreferences || (!webPreferences.experimentalFeatures)) {
!webPreferences.experimentalCanvasFeatures)) {
return return
} }