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

* feat: Corner Smoothing CSS rule (Reland)

Reland of #45185

Co-authored-by: Calvin <clavin@users.noreply.github.com>

* Fix patch conflicts

Co-authored-by: clavin <clavin@electronjs.org>

* fixup! Fix patch conflicts

Co-authored-by: clavin <clavin@electronjs.org>

* Update expected image

The dashed border is subtly different. The new version is correct and the old one was incorrect.

Co-authored-by: clavin <clavin@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
trop[bot] 2025-04-01 08:49:44 -05:00 committed by GitHub
parent 71e53c925e
commit 75e44e5f05
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);