mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix: corner smoothing feature gate crash (#47759)
* fix: corner smoothing feature gate crash * Fix ElectronCornerSmoothing::CSSValueFromComputedStyleInternal
This commit is contained in:
@@ -51,19 +51,17 @@ Use the `system-ui` keyword to match the smoothness to the OS design language.
|
||||
|
||||
### Controlling availibility
|
||||
|
||||
This CSS rule can be disabled by setting [the `cornerSmoothingCSS` web preference](./structures/web-preferences.md) to `false`.
|
||||
This CSS rule can be disabled using the Blink feature flag `ElectronCSSCornerSmoothing`.
|
||||
|
||||
```js
|
||||
const myWindow = new BrowserWindow({
|
||||
// [...]
|
||||
webPreferences: {
|
||||
enableCornerSmoothingCSS: false // Disables the `-electron-corner-smoothing` CSS rule
|
||||
disableBlinkFeatures: 'ElectronCSSCornerSmoothing' // Disables the `-electron-corner-smoothing` CSS rule
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
The CSS rule will still parse, but will have no visual effect.
|
||||
|
||||
### Formal reference
|
||||
|
||||
* **Initial value**: `0%`
|
||||
|
||||
@@ -149,7 +149,6 @@
|
||||
`WebContents` when the preferred size changes. Default is `false`.
|
||||
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
|
||||
* `enableDeprecatedPaste` boolean (optional) _Deprecated_ - Whether to enable the `paste` [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand). Default is `false`.
|
||||
* `enableCornerSmoothingCSS` boolean (optional) _Experimental_ - Whether the [`-electron-corner-smoothing` CSS rule](../corner-smoothing-css.md) is enabled. Default is `true`.
|
||||
|
||||
[chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment
|
||||
[runtime-enabled-features]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
|
||||
Reference in New Issue
Block a user