diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-06 09:16:15 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-01-13 16:12:06 +0100 |
commit | c9d902ca6ca3b1aa2e2762329d18c226d26520af (patch) | |
tree | 199fdd7b3f0d0ad21597fafa086729dc2e75d4e1 /src/core/web_engine_settings.cpp | |
parent | 7869ec5823da36a3ce33b379d3d664204756cad5 (diff) |
Adaptations for Chromium 87
Change-Id: Ic4ffd98e02f986dbaf986405360e727c813e696e
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r-- | src/core/web_engine_settings.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp index 957fe2b7d..ffa2b615e 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -49,9 +49,9 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" -#include "content/public/common/web_preferences.h" #include "media/base/media_switches.h" #include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h" +#include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/mojom/renderer_preferences.mojom.h" #include "ui/base/ui_base_switches.h" #include "ui/events/event_switches.h" @@ -116,7 +116,7 @@ WebEngineSettings::~WebEngineSettings() settings->parentSettings = nullptr; } -void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents, content::WebPreferences *prefs) +void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents, blink::web_pref::WebPreferences *prefs) { // Apply our settings on top of those. applySettingsToWebPreferences(prefs); @@ -124,7 +124,7 @@ void WebEngineSettings::overrideWebPreferences(content::WebContents *webContents // as the host process already overides some of the default WebPreferences values // before we get here (e.g. number_of_cpu_cores). if (webPreferences.isNull()) - webPreferences.reset(new content::WebPreferences(*prefs)); + webPreferences.reset(new blink::web_pref::WebPreferences(*prefs)); if (webContents && applySettingsToRendererPreferences(webContents->GetMutableRendererPrefs())) { @@ -347,7 +347,7 @@ void WebEngineSettings::doApply() m_adapter->webContents()->SyncRendererPrefs(); } -void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *prefs) +void WebEngineSettings::applySettingsToWebPreferences(blink::web_pref::WebPreferences *prefs) { // Override for now prefs->touch_event_feature_detection_enabled = isTouchEventsAPIEnabled(); @@ -385,20 +385,20 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p prefs->hide_scrollbars = !testAttribute(ShowScrollBars); if (isAttributeExplicitlySet(PlaybackRequiresUserGesture)) { prefs->autoplay_policy = testAttribute(PlaybackRequiresUserGesture) - ? content::AutoplayPolicy::kUserGestureRequired - : content::AutoplayPolicy::kNoUserGestureRequired; + ? blink::web_pref::AutoplayPolicy::kUserGestureRequired + : blink::web_pref::AutoplayPolicy::kNoUserGestureRequired; } prefs->dom_paste_enabled = testAttribute(JavascriptCanPaste); prefs->dns_prefetching_enabled = testAttribute(DnsPrefetchEnabled); // Fonts settings. - prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont)); - prefs->fixed_font_family_map[content::kCommonScript] = toString16(fontFamily(FixedFont)); - prefs->serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SerifFont)); - prefs->sans_serif_font_family_map[content::kCommonScript] = toString16(fontFamily(SansSerifFont)); - prefs->cursive_font_family_map[content::kCommonScript] = toString16(fontFamily(CursiveFont)); - prefs->fantasy_font_family_map[content::kCommonScript] = toString16(fontFamily(FantasyFont)); - prefs->pictograph_font_family_map[content::kCommonScript] = toString16(fontFamily(PictographFont)); + prefs->standard_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(StandardFont)); + prefs->fixed_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(FixedFont)); + prefs->serif_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(SerifFont)); + prefs->sans_serif_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(SansSerifFont)); + prefs->cursive_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(CursiveFont)); + prefs->fantasy_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(FantasyFont)); + prefs->pictograph_font_family_map[blink::web_pref::kCommonScript] = toString16(fontFamily(PictographFont)); prefs->default_font_size = fontSize(DefaultFontSize); prefs->default_fixed_font_size = fontSize(DefaultFixedFontSize); prefs->minimum_font_size = fontSize(MinimumFontSize); |