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

* feat: route deprecated clipboard commands through permission checks

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* docs: address review feedback

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fix: enable checks for child windows

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
trop[bot] 2025-02-05 14:10:43 -05:00 committed by GitHub
parent 51170c3652
commit 46c9ed61da
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);