summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_settings.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-12-08 18:07:06 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-05 09:23:53 +0000
commit1ed88bc02510d2d49548d291a6e38973774e7b35 (patch)
tree1b0f8843a357c06b12684b0651953fdc6ae7a1e0 /src/core/web_engine_settings.cpp
parent423f7ab80f814c5f4e4784e70bd3c36c44497314 (diff)
Respect --enable-smooth-scrolling
Change the scroll animator default to follow the same flags as used in Chromium. Change-Id: Ic6a9d23950f2ac6a18bd9b4e58cbedf560943717 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r--src/core/web_engine_settings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 160ed9693..539caed5f 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -215,7 +215,6 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
s_defaultAttributes.insert(SpatialNavigationEnabled, false);
s_defaultAttributes.insert(LocalContentCanAccessFileUrls, true);
s_defaultAttributes.insert(HyperlinkAuditingEnabled, false);
- s_defaultAttributes.insert(ScrollAnimatorEnabled, false);
s_defaultAttributes.insert(ErrorPageEnabled, true);
s_defaultAttributes.insert(PluginsEnabled, false);
s_defaultAttributes.insert(FullScreenSupportEnabled, false);
@@ -225,11 +224,13 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
// But first we must ensure the WebContext has been initialized
QtWebEngineCore::WebEngineContext::current();
base::CommandLine* commandLine = base::CommandLine::ForCurrentProcess();
+ bool smoothScrolling = commandLine->HasSwitch(switches::kEnableSmoothScrolling);
bool webGL = content::GpuProcessHost::gpu_enabled() &&
!commandLine->HasSwitch(switches::kDisable3DAPIs) &&
!commandLine->HasSwitch(switches::kDisableExperimentalWebGL);
bool accelerated2dCanvas = content::GpuProcessHost::gpu_enabled() &&
!commandLine->HasSwitch(switches::kDisableAccelerated2dCanvas);
+ s_defaultAttributes.insert(ScrollAnimatorEnabled, smoothScrolling);
s_defaultAttributes.insert(WebGLEnabled, webGL);
s_defaultAttributes.insert(Accelerated2dCanvasEnabled, accelerated2dCanvas);
}