summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_settings.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-01-22 10:55:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-01-25 15:41:53 +0100
commitcde72003881c6b5680ac8ac0fe6d6971bb43e0d5 (patch)
treefcb50002765c1cb179dd6f62054380c3fed85e80 /src/core/web_engine_settings.cpp
parent3fb215dab139fd7b61473ce3fe1058b87a6b4fe3 (diff)
parent75d061bbc68875c08b3dc243e464e32a80da71df (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Including update to 87-based Change-Id: I36b6054e00de97ab055d0bc800cff08d0408fac6
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r--src/core/web_engine_settings.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 693c6f6fb..218053e47 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())) {
@@ -352,7 +352,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();
@@ -396,26 +396,26 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->hide_scrollbars = !testAttribute(QWebEngineSettings::ShowScrollBars);
if (isAttributeExplicitlySet(QWebEngineSettings::PlaybackRequiresUserGesture)) {
prefs->autoplay_policy = testAttribute(QWebEngineSettings::PlaybackRequiresUserGesture)
- ? content::AutoplayPolicy::kUserGestureRequired
- : content::AutoplayPolicy::kNoUserGestureRequired;
+ ? blink::web_pref::AutoplayPolicy::kUserGestureRequired
+ : blink::web_pref::AutoplayPolicy::kNoUserGestureRequired;
}
prefs->dom_paste_enabled = testAttribute(QWebEngineSettings::JavascriptCanPaste);
prefs->dns_prefetching_enabled = testAttribute(QWebEngineSettings::DnsPrefetchEnabled);
// Fonts settings.
- prefs->standard_font_family_map[content::kCommonScript] =
+ prefs->standard_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::StandardFont));
- prefs->fixed_font_family_map[content::kCommonScript] =
+ prefs->fixed_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::FixedFont));
- prefs->serif_font_family_map[content::kCommonScript] =
+ prefs->serif_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::SerifFont));
- prefs->sans_serif_font_family_map[content::kCommonScript] =
+ prefs->sans_serif_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::SansSerifFont));
- prefs->cursive_font_family_map[content::kCommonScript] =
+ prefs->cursive_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::CursiveFont));
- prefs->fantasy_font_family_map[content::kCommonScript] =
+ prefs->fantasy_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::FantasyFont));
- prefs->pictograph_font_family_map[content::kCommonScript] =
+ prefs->pictograph_font_family_map[blink::web_pref::kCommonScript] =
toString16(fontFamily(QWebEngineSettings::PictographFont));
prefs->default_font_size = fontSize(QWebEngineSettings::DefaultFontSize);
prefs->default_fixed_font_size = fontSize(QWebEngineSettings::DefaultFixedFontSize);