feat: Corner Smoothing CSS rule (Reland) (#46278)

* feat: Corner Smoothing CSS rule (Reland)

Reland of #45185

* Fix patch conflicts

* fixup! Fix patch conflicts

* Update expected image

The dashed border is subtly different. The new version is correct and the old one was incorrect.
This commit is contained in:
Calvin 2025-03-31 10:22:23 -06:00 committed by GitHub
parent fcd836e34f
commit 09135443a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1276 additions and 1 deletions

View file

@ -149,6 +149,7 @@ void WebContentsPreferences::Clear() {
preload_path_ = std::nullopt;
v8_cache_options_ = blink::mojom::V8CacheOptions::kDefault;
deprecated_paste_enabled_ = false;
corner_smoothing_css_ = true;
#if BUILDFLAG(IS_MAC)
scroll_bounce_ = false;
@ -228,6 +229,8 @@ void WebContentsPreferences::SetFromDictionary(
if (web_preferences.Get(options::kDisableBlinkFeatures,
&disable_blink_features))
disable_blink_features_ = disable_blink_features;
web_preferences.Get(options::kEnableCornerSmoothingCSS,
&corner_smoothing_css_);
base::FilePath::StringType preload_path;
if (web_preferences.Get(options::kPreloadScript, &preload_path)) {
@ -478,6 +481,8 @@ void WebContentsPreferences::OverrideWebkitPrefs(
prefs->v8_cache_options = v8_cache_options_;
prefs->dom_paste_enabled = deprecated_paste_enabled_;
renderer_prefs->electron_corner_smoothing_css = corner_smoothing_css_;
}
WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPreferences);