Skip to content

Commit

Permalink
#767 fix bug introduced by the 121
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Feb 1, 2024
1 parent 172d20d commit 274d679
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions build/patches/Timezone-customization.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 274d679

Please sign in to comment.