#767 fix bug introduced by the 121

This commit is contained in:
Carmelo Messina
2024-02-01 16:32:16 +01:00
parent 172d20dc88
commit 274d6792a7
+16 -8
View File
@@ -31,9 +31,9 @@ Require: Content-settings-infrastructure.patch
.../common/content_settings_mojom_traits.h | 5 +
.../core/common/pref_names.cc | 3 +
.../content_settings/core/common/pref_names.h | 2 +
.../renderer/content_settings_agent_impl.cc | 80 +++++++
.../renderer/content_settings_agent_impl.cc | 81 +++++++-
.../renderer/content_settings_agent_impl.h | 11 +
23 files changed, 682 insertions(+), 1 deletion(-)
23 files changed, 682 insertions(+), 2 deletions(-)
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
@@ -849,18 +849,26 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings.mojom.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
@@ -355,6 +357,10 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
@@ -355,6 +357,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
allow = allow || IsAllowlistedForContentSettings();
cached_script_permissions_[frame] = allow;
+
+ if (allow)
+ UpdateOverrides();
+
+ if (allow) UpdateOverrides();
return allow;
}
@@ -470,4 +476,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
@@ -370,7 +373,9 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource(
content_setting_rules_->script_rules, script_url);
allow = setting != CONTENT_SETTING_BLOCK;
}
- return allow || IsAllowlistedForContentSettings();
+ allow = allow || IsAllowlistedForContentSettings();
+ if (allow) UpdateOverrides();
+ return allow;
}
bool ContentSettingsAgentImpl::AllowReadFromClipboard(bool default_value) {
@@ -470,4 +475,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
return false;
}