feat: route deprecated sync clipboard read through permission checks (#45377)

* feat: route deprecated clipboard commands through permission checks

* docs: address review feedback

* fix: enable checks for child windows
This commit is contained in:
Robo 2025-02-05 15:13:29 +09:00 committed by GitHub
parent e9d5eeb118
commit bec6ddda70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 441 additions and 35 deletions

View file

@ -148,6 +148,7 @@ void WebContentsPreferences::Clear() {
blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAllowed;
preload_path_ = std::nullopt;
v8_cache_options_ = blink::mojom::V8CacheOptions::kDefault;
deprecated_paste_enabled_ = false;
#if BUILDFLAG(IS_MAC)
scroll_bounce_ = false;
@ -245,6 +246,9 @@ void WebContentsPreferences::SetFromDictionary(
web_preferences.Get("v8CacheOptions", &v8_cache_options_);
web_preferences.Get(options::kEnableDeprecatedPaste,
&deprecated_paste_enabled_);
#if BUILDFLAG(IS_MAC)
web_preferences.Get(options::kScrollBounce, &scroll_bounce_);
#endif
@ -472,6 +476,8 @@ void WebContentsPreferences::OverrideWebkitPrefs(
prefs->webview_tag = webview_tag_;
prefs->v8_cache_options = v8_cache_options_;
prefs->dom_paste_enabled = deprecated_paste_enabled_;
}
WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPreferences);